This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/23855] loop header should also be pulled out of the inner loop too
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Apr 2006 12:01:16 -0000
- Subject: [Bug tree-optimization/23855] loop header should also be pulled out of the inner loop too
- References: <bug-23855-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from rguenth at gcc dot gnu dot org 2006-04-07 12:01 -------
So what I now have is (ahh, a PROP_loops would be so nice...)
pass_ch
pass_split_crit_edges
pass_pre
[cfg_cleanup to re-merge critical edges]
pass_hoist_guards
which works nice for this scenario, still without an extra load-PRE pass we
have
memory loads that were only PREd out of the inner loop (due to the not hoisted
guard) inside the outer loop, even if they're now redundant.
Which makes me wonder, if PRE could do loop-header-FRE here? Danny? Has such
been done before? Basically you have
do {
if (*mem > 0)
{
i = 0;
do {
} while (*mem > i);
}
} while (...);
where the (*mem > 0) is (full or partially?) redundant.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dberlin at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23855