projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
faf4d56
)
Do not get the break block of a switch before it is sure that a jump there is actuall...
author
Christoph Mallon
<christoph.mallon@gmx.de>
Sat, 21 Apr 2012 16:39:22 +0000
(18:39 +0200)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Tue, 24 Apr 2012 12:51:59 +0000
(14:51 +0200)
Usually the inner (compound) statement of a switch ends in a break or return, so there is no normal flow out of the switch statement.
ast2firm.c
patch
|
blob
|
history
diff --git
a/ast2firm.c
b/ast2firm.c
index
ef5b89b
..
9a96478
100644
(file)
--- a/
ast2firm.c
+++ b/
ast2firm.c
@@
-4996,7
+4996,9
@@
static ir_node *switch_statement_to_firm(switch_statement_t *statement)
statement_to_firm(statement->body);
- jump_if_reachable(get_break_label());
+ if (currently_reachable()) {
+ add_immBlock_pred(get_break_label(), new_Jmp());
+ }
if (!saw_default_label && switch_node) {
ir_node *proj = new_d_Proj(dbgi, switch_node, mode_X, pn_Switch_default);