public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Any way to output information on compiler-generated temporary variables in gcc?
@ 2014-01-20 14:49 Michele Co
  2014-01-20 15:55 ` Jonathan Wakely
  0 siblings, 1 reply; 5+ messages in thread
From: Michele Co @ 2014-01-20 14:49 UTC (permalink / raw)
  To: gcc-help

Hello,

I'd like to gather/output information (size, offset, type -- if 
possible) of compiler-generated temporaries generated by gcc during 
compilation.  I have looked through the compiler options related to 
generating debug information but am unsure whether there is an option 
available that will already give me this information in some form.

Does anyone on this list know of a quick and relatively straightforward 
method for gathering and outputting this information if it hasn't 
already been done before?

Thanks!

Michele

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

* Re: Any way to output information on compiler-generated temporary variables in gcc?
  2014-01-20 14:49 Any way to output information on compiler-generated temporary variables in gcc? Michele Co
@ 2014-01-20 15:55 ` Jonathan Wakely
  2014-01-22 19:36   ` Michele Co
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2014-01-20 15:55 UTC (permalink / raw)
  To: Michele Co; +Cc: gcc-help

On 20 January 2014 15:00, Michele Co <mc2zk@virginia.edu> wrote:
> Hello,
>
> I'd like to gather/output information (size, offset, type -- if possible) of
> compiler-generated temporaries generated by gcc during compilation.  I have
> looked through the compiler options related to generating debug information
> but am unsure whether there is an option available that will already give me
> this information in some form.
>
> Does anyone on this list know of a quick and relatively straightforward
> method for gathering and outputting this information if it hasn't already
> been done before?

One of the -fdump-tree-xxx options might provide the information you
want, e.g. -fdump-tree-original

I don't think debug info includes temporaries that aren't named in the
source, but I could be wrong.

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

* Re: Any way to output information on compiler-generated temporary variables in gcc?
  2014-01-20 15:55 ` Jonathan Wakely
@ 2014-01-22 19:36   ` Michele Co
  2014-01-22 19:47     ` Jonathan Wakely
  0 siblings, 1 reply; 5+ messages in thread
From: Michele Co @ 2014-01-22 19:36 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

On 1/20/2014 10:55 AM, Jonathan Wakely wrote:
> One of the -fdump-tree-xxx options might provide the information you 
> want, e.g. -fdump-tree-original I don't think debug info includes 
> temporaries that aren't named in the source, but I could be wrong. 

Hi Jonathan,

Thank you very much for your pointer to the -fdump-tree-xxx options.
I tried the -fdump-tree-all which seemed to dump all the available trees 
during the various passes.
Is there any way that I can determine which tree is the "latest" tree?  
In other words, which is the tree that is the closest to the generated 
binary code?  I noticed that the naming of the output files includes a 
3-digit number.  Is that number an indicator of how far along in the 
compilation that the tree was dumped?

If there's some config/.opt file that I can refer to understand what has 
been done during each of the various tree dump versions, that 
information is welcome as well, as I'm unsure what some of the 
abbreviations mean, such as -fdump-tree-ch, -fdump-tree-dse, etc.

--Michele

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

* Re: Any way to output information on compiler-generated temporary variables in gcc?
  2014-01-22 19:36   ` Michele Co
@ 2014-01-22 19:47     ` Jonathan Wakely
  2014-01-23 16:37       ` Michele Co
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2014-01-22 19:47 UTC (permalink / raw)
  To: Michele Co; +Cc: gcc-help

> If there's some config/.opt file that I can refer to understand what has
> been done during each of the various tree dump versions, that information is
> welcome as well, as I'm unsure what some of the abbreviations mean, such as
> -fdump-tree-ch, -fdump-tree-dse, etc.

They're explained in the manual.

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

* Re: Any way to output information on compiler-generated temporary variables in gcc?
  2014-01-22 19:47     ` Jonathan Wakely
@ 2014-01-23 16:37       ` Michele Co
  0 siblings, 0 replies; 5+ messages in thread
From: Michele Co @ 2014-01-23 16:37 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

On 1/22/2014 2:47 PM, Jonathan Wakely wrote:
>> If there's some config/.opt file that I can refer to understand what has
>> been done during each of the various tree dump versions, that information is
>> welcome as well, as I'm unsure what some of the abbreviations mean, such as
>> -fdump-tree-ch, -fdump-tree-dse, etc.
> They're explained in the manual.
Thanks.  I hadn't advanced far enough through the man page, but I see it 
now.

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

end of thread, other threads:[~2014-01-23 16:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-20 14:49 Any way to output information on compiler-generated temporary variables in gcc? Michele Co
2014-01-20 15:55 ` Jonathan Wakely
2014-01-22 19:36   ` Michele Co
2014-01-22 19:47     ` Jonathan Wakely
2014-01-23 16:37       ` Michele Co

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