[PATCH] REG_EQUAL notes on cond_jumps.

Roger Sayle roger@www.eyesopen.com
Wed May 14 21:56:00 GMT 2003


Hi Dave,
> The cse pass generates the latter form for insn 25 but possibly
> it doesn't know how to use it for jump simplification.  Anyway, it
> is a puzzle why cse can simplify the jump in 20010119-1.c at -O1
> but not at -O2.

Sorry, I didn't read this part of your original post.  The reason
is that __builtin_constant_p leaves the decision as to whether a
a variable is constant or not until afer GCSE at -O2, but at -O1
and lower it decides much earlier during CSE1, as dead-code won't
get eliminated if the decision is made too late.

In 20010119-1.c, the loop calls "bar" at -O2 and higher, but calls
"baz" at -O1.  You can see why I wanted to give an reduced example
where __builtin_constant_p didn't complicate the analysis :>

Roger
--



More information about the Gcc-patches mailing list