projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8ea5207
)
fix opt/gcse_no_end
author
Andreas Zwinkau
<zwinkau@kit.edu>
Thu, 5 May 2011 08:15:19 +0000
(10:15 +0200)
committer
Andreas Zwinkau
<zwinkau@kit.edu>
Thu, 5 May 2011 08:15:19 +0000
(10:15 +0200)
jump threading must also copy Keep edges to keep End reachable.
ir/opt/jumpthreading.c
patch
|
blob
|
history
diff --git
a/ir/opt/jumpthreading.c
b/ir/opt/jumpthreading.c
index
0f519a9
..
39e07db
100644
(file)
--- a/
ir/opt/jumpthreading.c
+++ b/
ir/opt/jumpthreading.c
@@
-275,6
+275,13
@@
static void copy_and_fix(const jumpthreading_env_t *env, ir_node *block,
ir_node *copy;
ir_mode *mode;
+ if (is_End(node)) {
+ /* edge is a Keep edge. If the end block is unreachable via normal control flow,
+ * we must maintain end's reachability with Keeps.
+ */
+ keep_alive(copy_block);
+ continue;
+ }
/* ignore control flow */
mode = get_irn_mode(node);
if (mode == mode_X || is_Cond(node))