PATCH: Improve debuggability at -O0 and fix PR 29609
Tristan Gingold
gingold@adacore.com
Tue Sep 4 09:01:00 GMT 2007
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.
More information about the Gcc-patches
mailing list