Hi,<br><br>I am a new user of LLVM. I am using it as the IR for a compiler for a subset of LUA. <br>I have the .ll file ready and it executes fine when passed to the llvm interpreter.<br clear="all"><br>Now, I wish to perform a few optimizations to the code starting with dead code elimination. <br>
For this I would need the CFG. I am very new to all of this stuff. Please help me out guys.<br>The way I want to proceed is to start at the top of the CFG and then find out the blocks <br>reachable from here. At the end, if any basic block remains unreachable, then I would<br>
classify it as dead code. <br><br>I read a few things about llvm passes and felt this could be made a pass. Please let me<br>know what's the right and fastest way to do this.<br><br>Regards,<br>Hersh<br>