public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Existing tree functionality?
@ 2005-07-06 12:32 Michael Tegtmeyer
  2005-07-06 12:46 ` Daniel Berlin
  2005-07-06 12:47 ` Diego Novillo
  0 siblings, 2 replies; 16+ messages in thread
From: Michael Tegtmeyer @ 2005-07-06 12:32 UTC (permalink / raw)
  To: gcc

Hello,

Is there existing functionality somewhere to sweep a function and collect 
all externally visible variables at the tree level or do I need to roll my 
own? I've looked in tree.h and grepped around as much as I could but I 
haven't found anything obvious.

Thanks in advance,
Mike Tegtmeyer

^ permalink raw reply	[flat|nested] 16+ messages in thread
* Re: Existing tree functionality?
@ 2005-07-07 14:47 Michael Tegtmeyer
  2005-07-07 14:46 ` Diego Novillo
  2005-07-07 15:23 ` Daniel Berlin
  0 siblings, 2 replies; 16+ messages in thread
From: Michael Tegtmeyer @ 2005-07-07 14:47 UTC (permalink / raw)
  To: dnovillo; +Cc: gcc

I'm using gcc initially to do some static analysis with the resuts being 
sent somewhere else for the time being. I basically just need to gather 
the variables with visibility outside of the current function. In addition 
I need as little tree transformation prior to this collection as 
possible-ie introduction of new temporaries etc. I scheduled a new pass 
before pass_all_optimizations that simply has pass_referenced_vars and 
pass_foo as subpasses where pass_foo does the analysis (simply calls 
debug_referenced_vars() for the moment). Things seem to work for the most 
part but I'm getting crashes for non-trivial code-mostly templates-that 
otherwise compiles fine. Am I missing something? Does something else need 
to be scheduled before pass_reference_vars? I'm using the release version 
of gcc-4 because I didn't feel like chasing a moving target but is this a 
known issue where I should be building against the snapshot?

Thanks again,
Mike Tegtmeyer

BTW Diego, I spent about a year doing OpenMP work using your CSSAME 
library. Small world eh?

>> Thanks-intraprocedural is all I need.
>>
>> Sorry, bit new to gcc internals (coming from SUIF), is anything missing
>> from referenced_vars list or is it complete? docs in tree-dfa.c state
>> that it doesn't look in statement operands. Does it just collect this 
>from
>> the symbol tables?
>>
>No.  It collects only the variables that are actually referenced
>in the function body.

>If you give us a few details of what you're looking for, we can
>probably help you better.
>
>
>Diego.

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

end of thread, other threads:[~2005-07-07 17:53 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-06 12:32 Existing tree functionality? Michael Tegtmeyer
2005-07-06 12:46 ` Daniel Berlin
2005-07-06 13:06   ` Daniel Berlin
2005-07-06 13:40     ` Michael Tegtmeyer
2005-07-06 13:49       ` Diego Novillo
2005-07-06 13:53       ` Daniel Berlin
2005-07-06 14:43   ` Kenneth Zadeck
2005-07-06 12:47 ` Diego Novillo
2005-07-07 14:47 Michael Tegtmeyer
2005-07-07 14:46 ` Diego Novillo
2005-07-07 15:23 ` Daniel Berlin
2005-07-07 16:42   ` Michael Tegtmeyer
2005-07-07 16:48     ` Diego Novillo
2005-07-07 16:51     ` Daniel Berlin
2005-07-07 17:28       ` Michael Tegtmeyer
2005-07-07 17:53         ` Diego Novillo

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