On Thu, Aug 26, 2021 at 9:57 AM Gary Oblock <g...@amperecomputing.com> wrote:
>
> Richard,
>
> It sure looked a label but I had code that would bail out on
> a label before it ever got where I was seeing a problem.
>
> I finally printed out the gimple code and it was a GIMPLE_DEBUG!
> When I bailed out on debugs my pass worked again. Of course
> expanding debugging info failed in cfgexpand. It looks like "-g"
> and my stuff real don't play nice together. Any thoughts on
> what to do? I'm thing about simply disabling my stuff if "-g"
> is specified. This is not the macho thing to do but anything is likely
> a very deep rathole.

For analysis you should ignore GIMPLE_DEBUG.  During transform
you should transform debugs like other stmts - if you run into
debug stmts that you can't transform because you didn't analyze
them and doing so would have changed analysis/transform the
reasonable thing to do is to reset them (gimple_debug_bind_reset_value).

The only "special" thing about the debug stmts is that they do not
have GIMPLE-like RHS but instead they have GENERIC trees
on the RHS.

Richard.

>
> Thanks,
>
> Gary
>
>
> ________________________________
> From: Richard Biener <richard.guent...@gmail.com>
> Sent: Thursday, August 26, 2021 12:45 AM
> To: Gary Oblock <g...@amperecomputing.com>
> Cc: gcc@gcc.gnu.org <gcc@gcc.gnu.org>
> Subject: Re: What is this GIMPLE?
>
> [EXTERNAL EMAIL NOTICE: This email originated from an external sender. Please 
> be mindful of safe email handling and proprietary information protection 
> practices.]
>
>
> On Wed, Aug 25, 2021 at 7:30 AM Gary Oblock via Gcc <gcc@gcc.gnu.org> wrote:
> >
> > I print out a bit of GIMPLE for a program and it looks like this:
> >
> >   <bb 3> [local count: 13634385]:
> >   # a_1 = PHI <a_320(D)(2), a_318(118)>
> >   # n_11 = PHI <n_321(D)(2), n_319(118)>
> > loop:
> >   # DEBUG n => n_11
> >   # DEBUG a => a_1
> >   _2 = (long unsigned int) a_1;
> >   _3 = _2 & 7;
> >   _347 = _3 != 0;
> >
> > That bit that says "loop:" isn't a GIMPLE_LABEL and
> > it has operands, the first of which is "size_t n = size_t;"
> > and I find that a bit odd...
>
> I'm sure it is a GIMPLE_LABEL.
>
> > What is this thing and what does it do? Note, I'm trying to
> > parse and transform some GIMPLE and this is confusing my
> > code (and me.) I looked in the internals doc and grepped the
> > code but I'm still in the dark.
> >
> > Note,I'd like be able to detect and ignore this if it's just informational.
> >
> > Thanks,
> >
> > Gary
> >
> > Gary
> >
> >
> > CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is 
> > for the sole use of the intended recipient(s) and contains information that 
> > is confidential and proprietary to Ampere Computing or its subsidiaries. It 
> > is to be used solely for the purpose of furthering the parties' business 
> > relationship. Any unauthorized review, copying, or distribution of this 
> > email (or any attachments thereto) is strictly prohibited. If you are not 
> > the intended recipient, please contact the sender immediately and 
> > permanently delete the original and any copies of this email and any 
> > attachments thereto.

Reply via email to