public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* What is this GIMPLE?
@ 2021-08-25  5:29 Gary Oblock
  2021-08-26  7:45 ` Richard Biener
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Oblock @ 2021-08-25  5:29 UTC (permalink / raw)
  To: gcc

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...

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What is this GIMPLE?
  2021-08-25  5:29 What is this GIMPLE? Gary Oblock
@ 2021-08-26  7:45 ` Richard Biener
  2021-08-26  7:57   ` Gary Oblock
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Biener @ 2021-08-26  7:45 UTC (permalink / raw)
  To: Gary Oblock; +Cc: gcc

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What is this GIMPLE?
  2021-08-26  7:45 ` Richard Biener
@ 2021-08-26  7:57   ` Gary Oblock
  2021-08-26  8:00     ` Richard Biener
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Oblock @ 2021-08-26  7:57 UTC (permalink / raw)
  To: Richard Biener; +Cc: gcc

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.

Thanks,

Gary


________________________________
From: Richard Biener <richard.guenther@gmail.com>
Sent: Thursday, August 26, 2021 12:45 AM
To: Gary Oblock <gary@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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: What is this GIMPLE?
  2021-08-26  7:57   ` Gary Oblock
@ 2021-08-26  8:00     ` Richard Biener
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Biener @ 2021-08-26  8:00 UTC (permalink / raw)
  To: Gary Oblock; +Cc: gcc

On Thu, Aug 26, 2021 at 9:57 AM Gary Oblock <gary@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.guenther@gmail.com>
> Sent: Thursday, August 26, 2021 12:45 AM
> To: Gary Oblock <gary@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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-26  8:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-25  5:29 What is this GIMPLE? Gary Oblock
2021-08-26  7:45 ` Richard Biener
2021-08-26  7:57   ` Gary Oblock
2021-08-26  8:00     ` Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).