Hi,<br><br>I wish to implement dead code elimination as a pass in llvm. This is not the same as unreachable block. <br>For this, I plan to go ahead like this :<br>In each function<br>    Identify the store and branch operations<br>
    Identify the operands involved in these operations.<br>    Build the UD chain of these and check if there is any variable that is not used and mark its definition (the entire instruction)<br>Delete all marked instructions. <br>
<br>I have no clue how to do this using llvm. Any help would be greatly appreciated. <br><br>Regards,<br>Hersh   <br><br clear="all"><br>-- <br>HSIyer<br>