projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some cleanup of cfopt.
[libfirm]
/
ir
/
opt
/
combo.c
diff --git
a/ir/opt/combo.c
b/ir/opt/combo.c
index
d1e3e0e
..
448d2d6
100644
(file)
--- a/
ir/opt/combo.c
+++ b/
ir/opt/combo.c
@@
-2258,11
+2258,13
@@
static void compute_Cmp(node_t *node)
} else if (r->part == l->part && !mode_is_float(get_irn_mode(l->node))) {
tv = relation & ir_relation_equal ? tarval_b_true : tarval_b_false;
} else if (r->part == l->part && !mode_is_float(get_irn_mode(l->node))) {
tv = relation & ir_relation_equal ? tarval_b_true : tarval_b_false;
- /* if the node was ONCE evaluated
by all constants
, but now
+ /* if the node was ONCE evaluated
to a constant
, but now
this breaks AND we get from the argument partitions a different
this breaks AND we get from the argument partitions a different
- result,
switch
to bottom.
+ result,
ensure monotony by fall
to bottom.
This happens because initially all nodes are in the same partition ... */
This happens because initially all nodes are in the same partition ... */
- if (node->type.tv != tv)
+ if (node->type.tv == tarval_bottom)
+ tv = tarval_bottom;
+ else if (node->type.tv != tv && is_constant_type(node->type))
tv = tarval_bottom;
node->type.tv = tv;
} else {
tv = tarval_bottom;
node->type.tv = tv;
} else {
@@
-3251,7
+3253,9
@@
static void apply_result(ir_node *irn, void *ctx)
node_t *block = get_irn_node(get_nodes_block(irn));
if (block->type.tv == tarval_unreachable) {
node_t *block = get_irn_node(get_nodes_block(irn));
if (block->type.tv == tarval_unreachable) {
- ir_node *bad = get_irg_bad(current_ir_graph);
+ ir_graph *irg = get_irn_irg(irn);
+ ir_mode *mode = get_irn_mode(node->node);
+ ir_node *bad = new_r_Bad(irg, mode);
/* here, bad might already have a node, but this can be safely ignored
as long as bad has at least ONE valid node */
/* here, bad might already have a node, but this can be safely ignored
as long as bad has at least ONE valid node */
@@
-3591,10
+3595,8
@@
void combo(ir_graph *irg)
if (env.modified) {
/* control flow might changed */
if (env.modified) {
/* control flow might changed */
- set_irg_outs_inconsistent(irg);
set_irg_extblk_inconsistent(irg);
set_irg_doms_inconsistent(irg);
set_irg_extblk_inconsistent(irg);
set_irg_doms_inconsistent(irg);
- set_irg_loopinfo_inconsistent(irg);
set_irg_entity_usage_state(irg, ir_entity_usage_not_computed);
}
set_irg_entity_usage_state(irg, ir_entity_usage_not_computed);
}