This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to debug ssa optimizer
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: Daniel Berlin <dberlin at dberlin dot org>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Sat, 19 Jun 2004 22:19:55 -0400
- Subject: Re: How to debug ssa optimizer
- Organization: Red Hat Canada
- References: <10406200157.AA17659@vlsi1.ultra.nyu.edu>
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.