projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0a1b89
)
fold all nodes in the constant code irg regardless of opt settings
author
Matthias Braun
<matze@braunis.de>
Mon, 19 Nov 2012 16:59:02 +0000
(17:59 +0100)
committer
Matthias Braun
<matze@braunis.de>
Wed, 21 Nov 2012 16:54:31 +0000
(17:54 +0100)
driver/firm_opt.c
patch
|
blob
|
history
diff --git
a/driver/firm_opt.c
b/driver/firm_opt.c
index
f535c1c
..
5145f13
100644
(file)
--- a/
driver/firm_opt.c
+++ b/
driver/firm_opt.c
@@
-700,7
+700,12
@@
static void do_firm_lowering(const char *input_filename)
do_irg_opt(irg, "parallelize-mem");
do_irg_opt(irg, "frame");
}
+ /* hack so we get global initializers constant folded even at -O0 */
+ set_opt_constant_folding(1);
+ set_opt_algebraic_simplification(1);
do_irp_opt("local-const");
+ set_opt_constant_folding(firm_opt.const_folding);
+ set_opt_algebraic_simplification(firm_opt.const_folding);
do_irp_opt("remove-unused");
do_irp_opt("opt-cc");
dump_all("low-opt");