projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix for const commit
[libfirm]
/
ir
/
ana
/
irconsconfirm.c
diff --git
a/ir/ana/irconsconfirm.c
b/ir/ana/irconsconfirm.c
index
6ccc21e
..
3a3375a
100644
(file)
--- a/
ir/ana/irconsconfirm.c
+++ b/
ir/ana/irconsconfirm.c
@@
-43,9
+43,9
@@
* Walker environment.
*/
typedef struct _env_t {
* Walker environment.
*/
typedef struct _env_t {
- unsigned num_confirms; /**< number of inserted Confirm nodes */
- unsigned num_consts; /**< number of constants placed */
- unsigned num_eq; /**< number of equalities placed */
+
unsigned num_confirms; /**< number of inserted Confirm nodes */
+
unsigned num_consts; /**< number of constants placed */
+
unsigned num_eq; /**< number of equalities placed */
} env_t;
/**
} env_t;
/**
@@
-59,8
+59,9
@@
typedef struct _env_t {
*/
static ir_node *get_effective_use_block(ir_node *node, int pos) {
if (is_Phi(node)) {
*/
static ir_node *get_effective_use_block(ir_node *node, int pos) {
if (is_Phi(node)) {
- /* the effective use of a Phi is in its predecessor block */
- node = get_irn_n(node, pos);
+ /* the effective use of a Phi argument is in its predecessor block */
+ node = get_nodes_block(node);
+ return get_Block_cfgpred_block(node, pos);
}
return get_nodes_block(node);
}
}
return get_nodes_block(node);
}
@@
-172,7
+173,7
@@
static void handle_modeb(ir_node *block, ir_node *selector, pn_Cond pnc, env_t *
* block. In that case the other_block is the user_blk itself and pred_block
* is the cond_block ...
*
* block. In that case the other_block is the user_blk itself and pred_block
* is the cond_block ...
*
- * Best would be to in
d
roduce a block here, removing this critical edge.
+ * Best would be to in
t
roduce a block here, removing this critical edge.
* For some reasons I cannot repair dominance here, so I have to remove
* ALL critical edges...
* FIXME: This should not be needed if we could repair dominance ...
* For some reasons I cannot repair dominance here, so I have to remove
* ALL critical edges...
* FIXME: This should not be needed if we could repair dominance ...
@@
-380,11
+381,11
@@
static void insert_Confirm(ir_node *block, void *env) {
handle_modeb(block, selector, get_Proj_proj(proj), env);
/* this should be an IF, check this */
handle_modeb(block, selector, get_Proj_proj(proj), env);
/* this should be an IF, check this */
- if (
get_irn_op(selector) != op_Proj
)
+ if (
! is_Proj(selector)
)
return;
cmp = get_Proj_pred(selector);
return;
cmp = get_Proj_pred(selector);
- if (
get_irn_op(cmp) != op_Cmp
)
+ if (
! is_Cmp(cmp)
)
return;
pnc = get_Proj_proj(selector);
return;
pnc = get_Proj_proj(selector);
@@
-453,12
+454,13
@@
void construct_confirms(ir_graph *irg) {
edges_deactivate(irg);
} /* construct_confirms */
edges_deactivate(irg);
} /* construct_confirms */
+#if 0
/**
* Post-walker: Remove Confirm nodes
*/
static void rem_Confirm(ir_node *n, void *env) {
(void) env;
/**
* Post-walker: Remove Confirm nodes
*/
static void rem_Confirm(ir_node *n, void *env) {
(void) env;
- if (
get_irn_op(n) == op_Confirm
) {
+ if (
is_Confirm(n)
) {
ir_node *value = get_Confirm_value(n);
if (value != n)
exchange(n, value);
ir_node *value = get_Confirm_value(n);
if (value != n)
exchange(n, value);
@@
-471,6
+473,7
@@
static void rem_Confirm(ir_node *n, void *env) {
}
}
} /* rem_Confirm */
}
}
} /* rem_Confirm */
+#endif
/*
* Remove all Confirm nodes from a graph.
/*
* Remove all Confirm nodes from a graph.