This is the mail archive of the gcc@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: How to debug ssa optimizer


On Sat, 2004-06-19 at 21:57, Richard Kenner wrote:

>   # v_30 = PHI <&version_string(0), v_3594(1)>;
> <L2>:;
>   T.211_707 = *v_30;
>   if (T.211_707 == 0) goto <L4>; else goto <L3>;
> 
> ... and from the corresponding .t28.ch:
> 
> <L191>:;
>   v_386 = &version_string;
>   T.211_530 = *v_386;
>   if (T.211_530 == 0) goto <L4>; else goto <L3>;
> 
> That's not a valid transformation.  version_string is an array and
> v is char *.
>
Hmm?  They're both compatible, v_386 is pointing to the first element of
version_string.

> I want to breakpoint at the place that does that transformation, but
> all I have is what's in the dump.
> 
Constant propagation (DOM most likely -> cprop_into_successor_phis) is
propagating &version_string into the PHI operand and then jump threading
is creating v_386.

> How do I set the breakpoint to find who's doing this?
>
Unfortunately, statements have no UIDs in GIMPLE.  You can do indirect
things like setting a breakpoint at the basic block number and then step
until you reach the statement.  Adding UIDs to GIMPLE statements would
be a fine addition for debugging.


Diego.


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