[cfe-dev] looking for some basic backend info

John McCall rjmccall at apple.com
Fri Jun 17 00:51:25 PDT 2011


On Jun 17, 2011, at 12:31 AM, Konstantin Tokarev wrote:
> 17.06.2011, 03:58, "John McCall" <rjmccall at apple.com>:
>> On Jun 16, 2011, at 4:45 PM, Anderson, Todd A wrote:
>>> Is there anything currently in clang that creates a call graph for all the functions defined in a file?  Any other whole program optimization phases?  Where might I look in the source to find such info or inject a phase to do a whole program analysis?
>> 
>> Can you work on LLVM IR, or do you really need to work on Clang's AST?
> 
> I'm interested in similar thing and I believe I need AST because identifier names do matter for my goals.

Identifiers of local variables?

My best suggestion would be to hack Clang's IR generation code to add the metadata you need to the variables you're interested in, or even to do the optimization directly if it's really that local.

John.



More information about the cfe-dev mailing list