[LLVMdev] CFG using LLVM

Chris Lattner clattner at apple.com
Sat Nov 14 08:22:53 PST 2009


On Nov 14, 2009, at 7:02 AM, Hersh.S. Iyer wrote:

> Hi,
> 
> I am a new user of LLVM. I am using it as the IR for a compiler for a subset of LUA. 
> I have the .ll file ready and it executes fine when passed to the llvm interpreter.
> 
> Now, I wish to perform a few optimizations to the code starting with dead code elimination. 
> For this I would need the CFG. I am very new to all of this stuff. Please help me out guys.

Take a look at llvm/include/llvm/Support/CFG.h.  Grep lib/Transforms/*/*.cpp for uses of pred_ for example.

-Chris



More information about the llvm-dev mailing list