projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed warning.
[libfirm]
/
ir
/
opt
/
gvn_pre.c
diff --git
a/ir/opt/gvn_pre.c
b/ir/opt/gvn_pre.c
index
58f7efa
..
e8123ab
100644
(file)
--- a/
ir/opt/gvn_pre.c
+++ b/
ir/opt/gvn_pre.c
@@
-27,6
+27,7
@@
*/
#include "config.h"
*/
#include "config.h"
+#include "iroptimize.h"
#include "irflag.h"
#include "irdom.h"
#include "irouts.h"
#include "irflag.h"
#include "irdom.h"
#include "irouts.h"
@@
-372,11
+373,11
@@
static ir_node *phi_translate(ir_node *node, ir_node *block, int pos, ir_valuese
return node;
}
return node;
}
- arity = get_irn_
intra_
arity(node);
+ arity = get_irn_arity(node);
/* check if the node has at least one Phi predecessor */
for (i = 0; i < arity; ++i) {
/* check if the node has at least one Phi predecessor */
for (i = 0; i < arity; ++i) {
- ir_node *pred = get_irn_
intra_
n(node, i);
+ ir_node *pred = get_irn_n(node, i);
ir_node *leader = lookup(pred);
ir_node *trans;
ir_node *leader = lookup(pred);
ir_node *trans;
@@
-401,11
+402,11
@@
static ir_node *phi_translate(ir_node *node, ir_node *block, int pos, ir_valuese
get_irn_in(node));
/* We need the attribute copy here, because the Hash value of a
node might depend on that. */
get_irn_in(node));
/* We need the attribute copy here, because the Hash value of a
node might depend on that. */
- copy_node_attr(node, nn);
+ copy_node_attr(
current_ir_graph,
node, nn);
set_nodes_block(nn, get_nodes_block(node));
for (i = 0; i < arity; ++i) {
set_nodes_block(nn, get_nodes_block(node));
for (i = 0; i < arity; ++i) {
- ir_node *pred = get_irn_
intra_
n(node, i);
+ ir_node *pred = get_irn_n(node, i);
ir_node *leader = lookup(pred);
ir_node *trans;
ir_node *leader = lookup(pred);
ir_node *trans;
@@
-540,7
+541,7
@@
static void insert_nodes(ir_node *block, void *ctx)
pre_env *env = ctx;
ir_node *value, *expr, *idom, *first_s, *worklist;
block_info *curr_info, *idom_info;
pre_env *env = ctx;
ir_node *value, *expr, *idom, *first_s, *worklist;
block_info *curr_info, *idom_info;
- int pos, arity = get_irn_
intra_
arity(block);
+ int pos, arity = get_irn_arity(block);
int all_same, by_some, updated;
ir_valueset_iterator_t iter;
int all_same, by_some, updated;
ir_valueset_iterator_t iter;
@@
-660,7
+661,7
@@
static void insert_nodes(ir_node *block, void *ctx)
mode,
get_irn_arity(pred),
get_irn_in(pred) + 1);
mode,
get_irn_arity(pred),
get_irn_in(pred) + 1);
- copy_node_attr(pred, nn);
+ copy_node_attr(
current_ir_graph,
pred, nn);
DB((dbg, LEVEL_1, "New node %+F in block %+F created\n", nn, pred_blk));
proj_pred = nn;
DB((dbg, LEVEL_1, "New node %+F in block %+F created\n", nn, pred_blk));
proj_pred = nn;
@@
-673,7
+674,7
@@
static void insert_nodes(ir_node *block, void *ctx)
mode,
get_irn_arity(e_prime),
get_irn_in(e_prime) + 1);
mode,
get_irn_arity(e_prime),
get_irn_in(e_prime) + 1);
- copy_node_attr(e_prime, nn);
+ copy_node_attr(
current_ir_graph,
e_prime, nn);
if (proj_pred != NULL) {
set_Proj_pred(nn, proj_pred);
}
if (proj_pred != NULL) {
set_Proj_pred(nn, proj_pred);
}
@@
-718,7
+719,7
@@
static void eliminate(ir_node *irn, void *ctx)
{
pre_env *env = ctx;
{
pre_env *env = ctx;
- if (
is_no
_Block(irn)) {
+ if (
!is
_Block(irn)) {
ir_node *block = get_nodes_block(irn);
block_info *bl = get_block_info(block);
ir_node *value = lookup(irn);
ir_node *block = get_nodes_block(irn);
block_info *bl = get_block_info(block);
ir_node *value = lookup(irn);
@@
-762,7
+763,7
@@
static void eliminate_nodes(elim_pair *pairs)
int i;
ir_node *res = NULL;
int i;
ir_node *res = NULL;
- for (i = get_irn_
intra_
arity(p->new_node) - 1; i >= 0; --i) {
+ for (i = get_irn_arity(p->new_node) - 1; i >= 0; --i) {
ir_node *pred = get_irn_n(p->new_node, i);
if (pred != p->old_node) {
ir_node *pred = get_irn_n(p->new_node, i);
if (pred != p->old_node) {