Commit 77eef701 authored by Matthias Braun's avatar Matthias Braun
Browse files

update testprograms to latest libfirm

[r20905]
parent 862c3177
-include config.mak
FIRM_CFLAGS ?= `pkg-config --cflags libfirm`
FIRM_LIBS ?= `pkg-config --libs libfirm`
CC ?= gcc
CPPFLAGS += $(FIRM_CFLAGS)
CFLAGS += -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Werror -pedantic
CFLAGS += -O0 -g3
LFLAGS += $(FIRM_LIBS)
SOURCES = $(wildcard *.c)
GOALS = $(basename $(SOURCES))
.PHONY: all
all: $(GOALS)
%: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(LFLAGS)
strip $@
clean:
rm -f $(GOALS)
...@@ -10,13 +10,10 @@ ...@@ -10,13 +10,10 @@
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/ */
#include <string.h>
#include <stdio.h>
# include <string.h> #include <libfirm/firm.h>
# include <stdio.h>
# include "irvrfy.h"
# include "irdump.h"
# include "firm.h"
/** /**
* variables of imperative programs. * variables of imperative programs.
...@@ -52,20 +49,22 @@ ...@@ -52,20 +49,22 @@
int int
main(void) main(void)
{ {
char *dump_file_suffix = "";
/* describes the method main */ /* describes the method main */
type *owner; ir_type *owner;
type *proc_main; ir_type *proc_main;
entity *proc_main_e; ir_entity *proc_main_e;
/* describes types defined by the language */ /* describes types defined by the language */
type *prim_t_int; ir_type *prim_t_int;
/* describes the array and its fields. */ /* describes the array and its fields. */
type *array_type; /* the type information for the array */ ir_type *array_type; /* the ir_type information for the array */
entity *array_ent; /* the entity representing a field of the array */ ir_entity *array_ent; /* the ir_entity representing a field of the array */
/* Needed while finding the element size. */ /* Needed while finding the element size. */
type *elt_type; ir_type *elt_type;
ir_mode *elt_type_mode; ir_mode *elt_type_mode;
int size; int size;
ir_node *arr_size; ir_node *arr_size;
...@@ -76,7 +75,7 @@ main(void) ...@@ -76,7 +75,7 @@ main(void)
init_firm (NULL); init_firm (NULL);
/* make basic type information for primitive type int. /* make basic ir_type information for primitive ir_type int.
In Sather primitive types are represented by a class. In Sather primitive types are represented by a class.
This is the modeling appropriate for other languages. This is the modeling appropriate for other languages.
Mode_i says that all integers shall be implemented as a Mode_i says that all integers shall be implemented as a
...@@ -88,10 +87,10 @@ main(void) ...@@ -88,10 +87,10 @@ main(void)
/* first build procedure main */ /* first build procedure main */
owner = get_glob_type(); owner = get_glob_type();
proc_main = new_type_method(new_id_from_chars("ARRAY-HEAP_EXAMPLE_main", 23), 0, 1); proc_main = new_type_method(new_id_from_chars("ARRAY-HEAP_EXAMPLE_main", 23), 0, 1);
set_method_res_type(proc_main, 0, (type *)prim_t_int); set_method_res_type(proc_main, 0, (ir_type *)prim_t_int);
proc_main_e = new_entity ((type*)owner, new_id_from_chars("ARRAY-HEAP_EXAMPLE_main", 23), (type *)proc_main); proc_main_e = new_entity ((ir_type*)owner, new_id_from_chars("ARRAY-HEAP_EXAMPLE_main", 23), (ir_type *)proc_main);
/* make type information for the array and set the bounds */ /* make ir_type information for the array and set the bounds */
# define N_DIMS 1 # define N_DIMS 1
# define L_BOUND 0 # define L_BOUND 0
# define U_BOUND 9 # define U_BOUND 9
...@@ -101,7 +100,7 @@ main(void) ...@@ -101,7 +100,7 @@ main(void)
new_Const(mode_Iu, new_tarval_from_long (L_BOUND, mode_Iu)), new_Const(mode_Iu, new_tarval_from_long (L_BOUND, mode_Iu)),
new_Const(mode_Iu, new_tarval_from_long (U_BOUND, mode_Iu))); new_Const(mode_Iu, new_tarval_from_long (U_BOUND, mode_Iu)));
/* As the array is accessed by Sel nodes, we need information about /* As the array is accessed by Sel nodes, we need information about
the entity the node selects. Entities of an array are it's elements the ir_entity the node selects. Entities of an array are it's elements
which are, in this case, integers. */ which are, in this case, integers. */
main_irg = new_ir_graph (proc_main_e, 4); main_irg = new_ir_graph (proc_main_e, 4);
array_ent = get_array_element_entity(array_type); array_ent = get_array_element_entity(array_type);
...@@ -112,20 +111,20 @@ main(void) ...@@ -112,20 +111,20 @@ main(void)
/* first compute size in bytes. */ /* first compute size in bytes. */
elt_type = get_array_element_type(array_type); elt_type = get_array_element_type(array_type);
elt_type_mode = get_type_mode(elt_type); elt_type_mode = get_type_mode(elt_type);
/* better: read bounds out of array type information */ /* better: read bounds out of array ir_type information */
size = (U_BOUND - L_BOUND + 1) * get_mode_size_bytes(elt_type_mode); size = (U_BOUND - L_BOUND + 1) * get_mode_size_bytes(elt_type_mode);
/* make constant representing the size */ /* make constant representing the size */
arr_size = new_Const(mode_Iu, new_tarval_from_long (size, mode_Iu)); arr_size = new_Const(mode_Iu, new_tarval_from_long (size, mode_Iu));
/* allocate and generate the Proj nodes. */ /* allocate and generate the Proj nodes. */
array = new_Alloc(get_store(), arr_size, (type*)array_type, stack_alloc); array = new_Alloc(get_store(), arr_size, (ir_type*)array_type, stack_alloc);
set_store(new_Proj(array, mode_M, 0)); /* make the changed memory visible */ set_store(new_Proj(array, mode_M, pn_Alloc_M)); /* make the changed memory visible */
array_ptr = new_Proj(array, mode_P, 2); /* remember the pointer to the array */ array_ptr = new_Proj(array, mode_P, pn_Alloc_res); /* remember the pointer to the array */
/* Now the "real" program: */ /* Now the "real" program: */
/* Load element 3 of the array. For this first generate the pointer to this /* Load element 3 of the array. For this first generate the pointer to this
array element by a select node. (Alternative: increase array pointer array element by a select node. (Alternative: increase array pointer
by (three * elt_size), but this complicates some optimizations. The by (three * elt_size), but this complicates some optimizations. The
type information accessible via the entity allows to generate the ir_type information accessible via the ir_entity allows to generate the
pointer increment later. */ pointer increment later. */
c3 = new_Const (mode_Iu, new_tarval_from_long (3, mode_Iu)); c3 = new_Const (mode_Iu, new_tarval_from_long (3, mode_Iu));
{ {
...@@ -134,8 +133,8 @@ main(void) ...@@ -134,8 +133,8 @@ main(void)
elt = new_Sel(get_store(), array_ptr, 1, in, array_ent); elt = new_Sel(get_store(), array_ptr, 1, in, array_ent);
} }
val = new_Load(get_store(), elt, mode_Is); val = new_Load(get_store(), elt, mode_Is);
set_store(new_Proj(val, mode_M, 0)); set_store(new_Proj(val, mode_M, pn_Load_M));
val = new_Proj(val, mode_Is, 2); val = new_Proj(val, mode_Is, pn_Load_res);
/* return the result of procedure main */ /* return the result of procedure main */
{ {
...@@ -158,13 +157,12 @@ main(void) ...@@ -158,13 +157,12 @@ main(void)
/* verify the graph */ /* verify the graph */
irg_vrfy(main_irg); irg_vrfy(main_irg);
printf("Dumping the graph and a type graph.\n"); printf("Dumping the graph and a ir_type graph.\n");
char *dump_file_suffix = "";
dump_ir_block_graph (main_irg, dump_file_suffix); dump_ir_block_graph (main_irg, dump_file_suffix);
dump_type_graph(main_irg, dump_file_suffix); dump_type_graph(main_irg, dump_file_suffix);
dump_all_types(dump_file_suffix); dump_all_types(dump_file_suffix);
printf("use xvcg to view these graphs:\n"); printf("Use ycomp to view these graphs:\n");
printf("/ben/goetz/bin/xvcg GRAPHNAME\n\n"); printf("ycomp GRAPHNAME\n\n");
return (0); return 0;
} }
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
*/ */
# include <string.h> #include <string.h>
# include <stdio.h> #include <stdio.h>
# include "irvrfy.h"
# include "irdump.h"
# include "firm.h" #include <libfirm/firm.h>
/** /**
* imperative programs. * imperative programs.
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
* end; * end;
* *
* The array is placed on the stack, i.e., a pointer to the array * The array is placed on the stack, i.e., a pointer to the array
* is obtained by selecting the entity "a" from the stack. The variables * is obtained by selecting the ir_entity "a" from the stack. The variables
* on the stack are considered to be entities of the method, as locals * on the stack are considered to be entities of the method, as locals
* of a method are only visible within the method. (An alternative to * of a method are only visible within the method. (An alternative to
* make the method owner of the stack variables is to give the ownership * make the method owner of the stack variables is to give the ownership
...@@ -45,20 +45,21 @@ ...@@ -45,20 +45,21 @@
int int
main(void) main(void)
{ {
char *dump_file_suffix = "";
/* describes the general structure of a C-file */ /* describes the general structure of a C-file */
type *owner; /* the class standing for everything in this file */ ir_type *owner; /* the class standing for everything in this file */
type *proc_main; /* Typeinformation for method main. */ ir_type *proc_main; /* Typeinformation for method main. */
entity *proc_main_e; /* The entity describing that method main is an ir_entity *proc_main_e; /* The ir_entity describing that method main is an
entity of the fake class representing the file. */ ir_entity of the fake class representing the file. */
/* describes types defined by the language */ /* describes types defined by the language */
type *prim_t_int; ir_type *prim_t_int;
/* describes the array and its fields. */ /* describes the array and its fields. */
entity *array_ent; /* the entity representing the array as member ir_entity *array_ent; /* the ir_entity representing the array as member
of the stack/method */ of the stack/method */
type *array_type; /* the type information for the array */ ir_type *array_type; /* the ir_type information for the array */
entity *field_ent; /* the entity representing a field of the ir_entity *field_ent; /* the ir_entity representing a field of the
array */ array */
/* holds the graph and nodes. */ /* holds the graph and nodes. */
...@@ -69,7 +70,7 @@ main(void) ...@@ -69,7 +70,7 @@ main(void)
printf("\nCreating an IR graph: ARRAY-STACK_EXAMPLE...\n"); printf("\nCreating an IR graph: ARRAY-STACK_EXAMPLE...\n");
/* make basic type information for primitive type int. /* make basic ir_type information for primitive ir_type int.
In Sather primitive types are represented by a class. In Sather primitive types are represented by a class.
This is the modeling appropriate for other languages. This is the modeling appropriate for other languages.
Mode_i says that all language-integers shall be implemented Mode_i says that all language-integers shall be implemented
...@@ -83,7 +84,7 @@ main(void) ...@@ -83,7 +84,7 @@ main(void)
proc_main_e = new_entity (owner, new_id_from_chars ("main", 4), proc_main); proc_main_e = new_entity (owner, new_id_from_chars ("main", 4), proc_main);
get_entity_ld_name(proc_main_e); /* force name mangling */ get_entity_ld_name(proc_main_e); /* force name mangling */
/* make type information for the array and set the bounds */ /* make ir_type information for the array and set the bounds */
# define N_DIMS 1 # define N_DIMS 1
# define L_BOUND 0 # define L_BOUND 0
# define U_BOUND 9 # define U_BOUND 9
...@@ -95,13 +96,13 @@ main(void) ...@@ -95,13 +96,13 @@ main(void)
main_irg = new_ir_graph (proc_main_e, 4); main_irg = new_ir_graph (proc_main_e, 4);
/* The array is an entity of the method, placed on the mehtod's own memory, /* The array is an ir_entity of the method, placed on the mehtod's own memory,
the stack frame. */ the stack frame. */
array_ent = new_entity(get_cur_frame_type(), new_id_from_chars("a", 1), array_type); array_ent = new_entity(get_cur_frame_type(), new_id_from_chars("a", 1), array_type);
/* As the array is accessed by Sel nodes, we need information about /* As the array is accessed by Sel nodes, we need information about
the entity the node selects. Entities of an array are it's elements the ir_entity the node selects. Entities of an array are it's elements
which are, in this case, integers. */ which are, in this case, integers. */
/* change entity owner types. */ /* change ir_entity owner types. */
field_ent = get_array_element_entity(array_type); field_ent = get_array_element_entity(array_type);
...@@ -112,7 +113,7 @@ main(void) ...@@ -112,7 +113,7 @@ main(void)
/* Load element 3 of the array. For this first generate the pointer /* Load element 3 of the array. For this first generate the pointer
to this the element by a select node. (Alternative: increase to this the element by a select node. (Alternative: increase
array pointer by (three * elt_size), but this complicates some array pointer by (three * elt_size), but this complicates some
optimizations.) The type information accessible via the entity optimizations.) The ir_type information accessible via the ir_entity
allows to generate the pointer increment later. */ allows to generate the pointer increment later. */
c3 = new_Const (mode_Iu, new_tarval_from_long (3, mode_Iu)); c3 = new_Const (mode_Iu, new_tarval_from_long (3, mode_Iu));
{ {
...@@ -121,8 +122,8 @@ main(void) ...@@ -121,8 +122,8 @@ main(void)
elt = new_Sel(get_store(), array_ptr, 1, in, field_ent); elt = new_Sel(get_store(), array_ptr, 1, in, field_ent);
} }
val = new_Load(get_store(), elt, mode_Is); val = new_Load(get_store(), elt, mode_Is);
set_store(new_Proj(val, mode_M, 0)); set_store(new_Proj(val, mode_M, pn_Load_M));
val = new_Proj(val, mode_Is, 2); val = new_Proj(val, mode_Is, pn_Load_res);
/* return the result of procedure main */ /* return the result of procedure main */
{ {
...@@ -144,14 +145,13 @@ main(void) ...@@ -144,14 +145,13 @@ main(void)
/* verify the graph */ /* verify the graph */
irg_vrfy(main_irg); irg_vrfy(main_irg);
char *dump_file_suffix = ""; printf("Dumping the graph and a ir_type graph.\n");
printf("Dumping the graph and a type graph.\n");
dump_ir_block_graph (main_irg, dump_file_suffix); dump_ir_block_graph (main_irg, dump_file_suffix);
dump_type_graph(main_irg, dump_file_suffix); dump_type_graph(main_irg, dump_file_suffix);
dump_ir_block_graph_w_types(main_irg, dump_file_suffix); dump_ir_block_graph_w_types(main_irg, dump_file_suffix);
dump_all_types(dump_file_suffix); dump_all_types(dump_file_suffix);
printf("Use xvcg to view these graphs:\n"); printf("Use ycomp to view these graphs:\n");
printf("/ben/goetz/bin/xvcg GRAPHNAME\n\n"); printf("ycomp GRAPHNAME\n\n");
return (0); return (0);
} }
...@@ -10,12 +10,10 @@ ...@@ -10,12 +10,10 @@
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/ */
# include <string.h> #include <string.h>
# include <stdio.h> #include <stdio.h>
# include "irvrfy.h" #include <libfirm/firm.h>
# include "irdump.h"
# include "firm.h"
/** /**
* This file constructs the ir for the following pseudo-program: * This file constructs the ir for the following pseudo-program:
...@@ -29,25 +27,27 @@ ...@@ -29,25 +27,27 @@
* This program demonstrates how to represent string constants. * This program demonstrates how to represent string constants.
*/ */
int main(int argc, char **argv) int main(void)
{ {
char *dump_file_suffix = "";
ir_graph *irg; /* this variable contains the irgraph */ ir_graph *irg; /* this variable contains the irgraph */
type *owner; /* the class in which this method is defined */ ir_type *owner; /* the class in which this method is defined */
type *proc_main; /* type information for the method main */ ir_type *proc_main; /* ir_type information for the method main */
type *proc_called; /* type information for called method f */ ir_type *proc_called; /* ir_type information for called method f */
type *U8, *U8array, *string_ptr; /* type for pointers to strings. */ ir_type *U8, *U8array, *string_ptr; /* ir_type for pointers to strings. */
entity *ent; /* represents this method as entity of owner */ ir_entity *ent; /* represents this method as ir_entity of owner */
entity *const_str; /* represents a constant string. */ ir_entity *const_str; /* represents a constant string. */
char *str = "Hello World\n"; /* The constant string. */ char *str = "Hello World\n"; /* The constant string. */
ir_node *x, *str_addr, *proc_ptr, *call; ir_node *x, *str_addr, *proc_ptr, *call;
int i; symconst_symbol sym;
size_t i;
printf("\nCreating an IR graph: CALL_STR_EXAMPLE...\n"); printf("\nCreating an IR graph: CALL_STR_EXAMPLE...\n");
/* init library */ /* init library */
init_firm (NULL); init_firm (NULL);
/* An unsinged 8 bit type */ /* An unsinged 8 bit ir_type */
U8 = new_type_primitive (new_id_from_chars("char", 4), mode_Bu); U8 = new_type_primitive (new_id_from_chars("char", 4), mode_Bu);
/* An array containing unsigned 8 bit elements. */ /* An array containing unsigned 8 bit elements. */
U8array = new_type_array (new_id_from_chars("char_arr", 8), 1, U8); U8array = new_type_array (new_id_from_chars("char_arr", 8), 1, U8);
...@@ -55,7 +55,7 @@ int main(int argc, char **argv) ...@@ -55,7 +55,7 @@ int main(int argc, char **argv)
string_ptr = new_type_pointer (new_id_from_chars ("ptr_to_string", 13), U8array, mode_P); string_ptr = new_type_pointer (new_id_from_chars ("ptr_to_string", 13), U8array, mode_P);
/* Make a global entity that represents the constant String. */ /* Make a global ir_entity that represents the constant String. */
const_str = new_entity(get_glob_type(), new_id_from_str("constStr"), U8array); const_str = new_entity(get_glob_type(), new_id_from_str("constStr"), U8array);
set_entity_variability(const_str, variability_constant); set_entity_variability(const_str, variability_constant);
for (i = 0; i < strlen(str); i++) { for (i = 0; i < strlen(str); i++) {
...@@ -68,7 +68,7 @@ int main(int argc, char **argv) ...@@ -68,7 +68,7 @@ int main(int argc, char **argv)
* For imperative languages like C we view a program as a large class containing * For imperative languages like C we view a program as a large class containing
* all functions of the program as methods in this class. This class is * all functions of the program as methods in this class. This class is
* automatically generated. * automatically generated.
* We use the same name for the method type as for the method entity. * We use the same name for the method ir_type as for the method ir_entity.
*/ */
#define METHODNAME "CALL_STR_EXAMPLE_main" #define METHODNAME "CALL_STR_EXAMPLE_main"
#define NRARGS 0 #define NRARGS 0
...@@ -77,8 +77,8 @@ int main(int argc, char **argv) ...@@ -77,8 +77,8 @@ int main(int argc, char **argv)
proc_main = new_type_method(new_id_from_chars(METHODNAME, strlen(METHODNAME)), proc_main = new_type_method(new_id_from_chars(METHODNAME, strlen(METHODNAME)),
NRARGS, NRES); NRARGS, NRES);
/* Make type information for called method which also belongs to the /* Make ir_type information for called method which also belongs to the
global type. */ global ir_type. */
#define F_METHODNAME "f" #define F_METHODNAME "f"
#define F_NRARGS 1 #define F_NRARGS 1
#define F_NRES 0 #define F_NRES 0
...@@ -88,12 +88,12 @@ int main(int argc, char **argv) ...@@ -88,12 +88,12 @@ int main(int argc, char **argv)
set_method_param_type(proc_called, 0, string_ptr); set_method_param_type(proc_called, 0, string_ptr);
/* Make the entity for main needed for a correct ir_graph. */ /* Make the ir_entity for main needed for a correct ir_graph. */
#define ENTITYNAME "CALL_STR_EXAMPLE_main" #define ENTITYNAME "CALL_STR_EXAMPLE_main"
ent = new_entity (owner, new_id_from_chars (ENTITYNAME, strlen(ENTITYNAME)), ent = new_entity (owner, new_id_from_chars (ENTITYNAME, strlen(ENTITYNAME)),
proc_main); proc_main);
/* Generates the basic graph for the method represented by entity ent, that /* Generates the basic graph for the method represented by ir_entity ent, that
* is, generates start and end blocks and nodes and a first, initial block. * is, generates start and end blocks and nodes and a first, initial block.
* The constructor needs to know how many local variables the method has. * The constructor needs to know how many local variables the method has.
*/ */
...@@ -101,14 +101,13 @@ int main(int argc, char **argv) ...@@ -101,14 +101,13 @@ int main(int argc, char **argv)
irg = new_ir_graph (ent, NUM_OF_LOCAL_VARS); irg = new_ir_graph (ent, NUM_OF_LOCAL_VARS);
/* get the pointer to the string constant */ /* get the pointer to the string constant */
symconst_symbol sym;
sym.entity_p = const_str; sym.entity_p = const_str;
str_addr = new_SymConst(sym, symconst_addr_ent); str_addr = new_SymConst(mode_P, sym, symconst_addr_ent);
/* get the pointer to the procedure from the class type */ /* get the pointer to the procedure from the class ir_type */
/* this is how a pointer to be fixed by the linker is represented. */ /* this is how a pointer to be fixed by the linker is represented. */
sym.ident_p = new_id_from_str (F_METHODNAME); sym.ident_p = new_id_from_str (F_METHODNAME);
proc_ptr = new_SymConst (sym, symconst_addr_name); proc_ptr = new_SymConst (mode_P, sym, symconst_addr_name);
/* call procedure set_a, first built array with parameters */ /* call procedure set_a, first built array with parameters */
{ {
...@@ -117,7 +116,7 @@ int main(int argc, char **argv) ...@@ -117,7 +116,7 @@ int main(int argc, char **argv)
call = new_Call(get_store(), proc_ptr, 1, in, proc_called); call = new_Call(get_store(), proc_ptr, 1, in, proc_called);
} }
/* make the possible changes by the called method to memory visible */ /* make the possible changes by the called method to memory visible */
set_store(new_Proj(call, mode_M, 0)); set_store(new_Proj(call, mode_M, pn_Call_M));
/* Make the return node returning the memory. */ /* Make the return node returning the memory. */
x = new_Return (get_store(), 0, NULL); x = new_Return (get_store(), 0, NULL);
...@@ -140,11 +139,10 @@ int main(int argc, char **argv) ...@@ -140,11 +139,10 @@ int main(int argc, char **argv)
irg_vrfy(irg); irg_vrfy(irg);
printf("Done building the graph. Dumping it.\n"); printf("Done building the graph. Dumping it.\n");
char *dump_file_suffix = "";
dump_ir_block_graph (irg, dump_file_suffix); dump_ir_block_graph (irg, dump_file_suffix);
dump_all_types(dump_file_suffix); dump_all_types(dump_file_suffix);
printf("Use xvcg to view this graph:\n"); printf("Use ycomp to view this graph:\n");
printf("/ben/goetz/bin/xvcg GRAPHNAME\n\n"); printf("ycomp GRAPHNAME\n\n");
return (0); return (0);
} }
...@@ -10,13 +10,10 @@ ...@@ -10,13 +10,10 @@
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/ */
#include <stdio.h> #include <stdio.h>
# include <string.h> #include <string.h>
# include "irvrfy.h" #include <libfirm/firm.h>
# include "irdump.h"
# include "firm.h"
/** /**
* This file constructs the ir for the following pseudo-program: * This file constructs the ir for the following pseudo-program:
...@@ -28,47 +25,47 @@ ...@@ -28,47 +25,47 @@
* return a; * return a;
**/ **/
int main(int argc, char **argv) int main(void)
{ {
type *prim_t_int; ir_type *prim_t_int;
ir_graph *irg; /* this variable contains the irgraph */ ir_graph *irg; /* this variable contains the irgraph */
type *owner; /* the class in which this method is defined */ ir_type *owner; /* the class in which this method is defined */
type *method; /* the type of this method */ ir_type *method; /* the ir_type of this method */
entity *ent; /* represents this method as entity of owner */ ir_entity *ent; /* represents this method as ir_entity of owner */
ir_node *x, *x_then, *arg1, *c2, *c10, *cmpGt, *cmpLt, *and, *f, *t, *b;