[LLVMdev] extracting data and operands

Hersh.S. Iyer coolhersh at gmail.com
Mon Nov 16 11:25:25 PST 2009


Hi,

I wish to implement dead code elimination as a pass in llvm. This is not the
same as unreachable block.
For this, I plan to go ahead like this :
In each function
    Identify the store and branch operations
    Identify the operands involved in these operations.
    Build the UD chain of these and check if there is any variable that is
not used and mark its definition (the entire instruction)
Delete all marked instructions.

I have no clue how to do this using llvm. Any help would be greatly
appreciated.

Regards,
Hersh


-- 
HSIyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091116/d009cf05/attachment.html>


More information about the llvm-dev mailing list