This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] REG_EQUAL notes on cond_jumps.


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
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]