This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR 10011: Introduce gcse_constant_p
On Sun, Mar 30, 2003 at 03:56:05PM -0700, Roger Sayle wrote:
> I have to disagree with you here, moving purge_builtin_constant_p
> is just papering over the problem. Your fix doesn't address the
> example posted with my original solution.
>
> void foo()
> {
> int x = 100;
> int y = 20000;
> do {
> if (x > y)
> undef ();
> } while (x == 4);
> }
And what does this have to do with __builtin_constant_p?
> Notice that GCSE is unable to optimize away the call to undef
> on *some* platforms. If this fundamental problem is fixed, we
> can run purge_builtin_constant_p as late as previously, and even
> take advantage that the argument may be constant due to loop peeling.
I don't believe you. Please spell out in detail the sequence
of optimizations that ocurrs to make this happen.
> Your change of moving purge_builtin_constant_p just unfairly penalizes
> targets where GCSE can eliminate dead-code, such as x86 Linux.
No it doesn't. We still run purge_builtin_constant_p *after* gcse.
r~