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: Improve debuggability at -O0 and fix PR 29609



On Sep 3, 2007, at 11:39 AM, Richard Guenther wrote:


I don't like this approach.  From a quick check I see that gimple
lowering retains
location information for both the if and the then branch correctly in
lower_cond_expr
and the CFG created has the correct locus set on the edge already.
Right.

  So where
is this information lost?
Even if this location information were not lost, it couldn't be inserted without splitting the
conditional jump (ie inverting the condition and add an unconditional jump for the other branch).


I suppose it may be during expand where we call
do_jump via jumpif but the complete jump sequence has one location. So the
proper fix would probably to teach do_jump to take an alternate location for the
jump.
I can try to modify expand_gimple_cond_expr so that it splits the jump. Note that every conditional jumps
will be split (bad IMHO).


If explicit gotos are not tracked, forwarding optimization has to be wholly disabled (at -O0 only).

If you agree with this approach, I can implement it.

Tristan.


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