Change the ordering of cdce pass
Easwaran Raman
eraman@google.com
Fri Jun 15 01:41:00 GMT 2012
The conditional dead call elimination pass shrink wraps certain dead
calls to math functions. It doesn't handle case like this:
D.142420_139 = powD.549 (D.142421_138, D.142419_132);
fooD.120935.barD.113815 = D.142420_139;
# foo.bar is dead here.
This code gets cleaned up by DCE and leaves only pow, which can then
be shrink-wrapped by cdce. So it seems reasonable to do this
reordering. Bootstraps on x86_64 on linux with no test regression. OK
for trunk?
- Easwaran
----------------------
2012-06-14 Easwaran Raman <eraman@google.com>
* gcc/passes.c (init_optimization_passes): Remove pass_call_cdce
from its current position and insert after pass_dce.
Index: gcc/passes.c
===================================================================
--- gcc/passes.c (revision 188535)
+++ gcc/passes.c (working copy)
@@ -1374,7 +1374,6 @@ init_optimization_passes (void)
NEXT_PASS (pass_complete_unrolli);
NEXT_PASS (pass_ccp);
NEXT_PASS (pass_forwprop);
- NEXT_PASS (pass_call_cdce);
/* pass_build_alias is a dummy pass that ensures that we
execute TODO_rebuild_alias at this point. Re-building
alias information also rewrites no longer addressed
@@ -1387,6 +1386,7 @@ init_optimization_passes (void)
NEXT_PASS (pass_merge_phi);
NEXT_PASS (pass_vrp);
NEXT_PASS (pass_dce);
+ NEXT_PASS (pass_call_cdce);
NEXT_PASS (pass_cselim);
NEXT_PASS (pass_tree_ifcombine);
NEXT_PASS (pass_phiopt);
More information about the Gcc-patches
mailing list