projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement -(a * const) -> a * -const.
[libfirm]
/
testprograms
/
strength_red_example.c
diff --git
a/testprograms/strength_red_example.c
b/testprograms/strength_red_example.c
index
9246f89
..
536159a
100644
(file)
--- a/
testprograms/strength_red_example.c
+++ b/
testprograms/strength_red_example.c
@@
-60,7
+60,7
@@
static int i_pos = 0;
static int arr_pos = 1;
static int i_pos = 0;
static int arr_pos = 1;
-static type *typ, *typ2;
+static
ir_
type *typ, *typ2;
static ir_node *r1, *f, *r, *c2;
static ir_node *r1, *f, *r, *c2;
@@
-83,29
+83,29
@@
typedef enum {
* @param fct_name the name of the function
* @param loop_dir the loop direction
*/
* @param fct_name the name of the function
* @param loop_dir the loop direction
*/
-static void function_begin(
type *owner,
type *mtp, char *fct_name, loop_dir_t loop_dir) {
+static void function_begin(
ir_type *owner, ir_
type *mtp, char *fct_name, loop_dir_t loop_dir) {
symconst_symbol sym;
ir_node *x, *t, *cmp;
int start_value, end_value;
symconst_symbol sym;
ir_node *x, *t, *cmp;
int start_value, end_value;
- pn
c_number
cmp_dir;
+ pn
_Cmp
cmp_dir;
if (loop_dir == loop_forward) {
start_value = 0;
end_value = 10;
if (loop_dir == loop_forward) {
start_value = 0;
end_value = 10;
- cmp_dir = Gt;
+ cmp_dir =
pn_Cmp_
Gt;
}
else {
start_value = 10;
end_value = 0;
}
else {
start_value = 10;
end_value = 0;
- cmp_dir = Lt;
+ cmp_dir =
pn_Cmp_
Lt;
}
/* The entity for the procedure */
entity *ent = new_entity (owner, new_id_from_str(fct_name), mtp);
/* make type infromation for the array */
}
/* The entity for the procedure */
entity *ent = new_entity (owner, new_id_from_str(fct_name), mtp);
/* make type infromation for the array */
- type *array_type = new_type_array(new_id_from_str("array"), N_DIMS, typ);
+
ir_
type *array_type = new_type_array(new_id_from_str("array"), N_DIMS, typ);
/* set the bounds for the array */
set_array_bounds_int(array_type, 0, L_BOUND, U_BOUND);
/* set the bounds for the array */
set_array_bounds_int(array_type, 0, L_BOUND, U_BOUND);
@@
-152,7
+152,6
@@
static void function_begin(type *owner, type *mtp, char *fct_name, loop_dir_t lo
}
int x;
}
int x;
-static int y;
/**
* finishes a builded function.
/**
* finishes a builded function.
@@
-187,9
+186,9
@@
int
main(void)
{
ir_graph *irg;
main(void)
{
ir_graph *irg;
- type *owner;
+
ir_
type *owner;
entity *ent, *array_ent, *array_ent2;
entity *ent, *array_ent, *array_ent2;
- type *proc_tp, *array_type, *array_type2; /* type information for the method main */
+
ir_
type *proc_tp, *array_type, *array_type2; /* type information for the method main */
ir_node *x,*x1 , *r, *t, *f, *f1, *t1, *cmp, *r1, *r2;
int i_pos;
ir_node *x,*x1 , *r, *t, *f, *f1, *t1, *cmp, *r1, *r2;
int i_pos;
@@
-199,7
+198,7
@@
main(void)
arch_dep_set_opts(arch_dep_none);
arch_dep_set_opts(arch_dep_none);
- do_node_verification(
NODE
_VERIFICATION_REPORT);
+ do_node_verification(
FIRM
_VERIFICATION_REPORT);
typ = new_type_primitive(new_id_from_chars(PRIM_NAME, strlen(PRIM_NAME)), mode_Is);
typ = new_type_primitive(new_id_from_chars(PRIM_NAME, strlen(PRIM_NAME)), mode_Is);
@@
-259,7
+258,7
@@
main(void)
r1 = new_immBlock();
add_immBlock_pred(get_irg_current_block(irg), x);
cmp = new_Cmp(new_Const_int(10), get_value(i_pos, mode_Is));
r1 = new_immBlock();
add_immBlock_pred(get_irg_current_block(irg), x);
cmp = new_Cmp(new_Const_int(10), get_value(i_pos, mode_Is));
- x = new_Cond(new_Proj(cmp, mode_b, Gt));
+ x = new_Cond(new_Proj(cmp, mode_b,
pn_Cmp_
Gt));
f = new_Proj(x, mode_X, 0);
t = new_Proj(x, mode_X, 1);
f = new_Proj(x, mode_X, 0);
t = new_Proj(x, mode_X, 1);
@@
-298,7
+297,7
@@
main(void)
ir_node *b1 = new_Const_int(45);
add_immBlock_pred(get_irg_current_block(irg), f);
cmp = new_Cmp(new_Const_int(0), b1);
ir_node *b1 = new_Const_int(45);
add_immBlock_pred(get_irg_current_block(irg), f);
cmp = new_Cmp(new_Const_int(0), b1);
- x = new_Cond (new_Proj(cmp, mode_b, Lt));
+ x = new_Cond (new_Proj(cmp, mode_b,
pn_Cmp_
Lt));
f1 = new_Proj (x, mode_X, 0);
t1 = new_Proj (x, mode_X, 1);
f1 = new_Proj (x, mode_X, 0);
t1 = new_Proj (x, mode_X, 1);
@@
-454,7
+453,7
@@
main(void)
for (i = 0; i < n_irgs; ++i) {
current_ir_graph = get_irp_irg(i);
irg_vrfy(current_ir_graph);
for (i = 0; i < n_irgs; ++i) {
current_ir_graph = get_irp_irg(i);
irg_vrfy(current_ir_graph);
- finalize_cons (current_ir_graph);
+
irg_
finalize_cons (current_ir_graph);
/* output the vcg file */
//dump_ir_block_graph (current_ir_graph, "-early");
/* output the vcg file */
//dump_ir_block_graph (current_ir_graph, "-early");