Call DeadCodeElimination pass of LLVM

Hi,
Please let me know how to follow my pass in LLVM by Dead Code Elimination pass of LLVM. getAnalysisUsage(…) only allows me to run passes before my pass. I want to run Dead Code Elimination pass after my pass.

Regards,
Adarsh

Adarsh HV wrote:

Hi,
Please let me know how to follow my pass in LLVM by Dead Code
Elimination pass of LLVM. getAnalysisUsage(...) only allows me to run
passes before my pass. I want to run Dead Code Elimination pass after my
pass.

Your pass does not control that; where the PassManager is created, insert your pass, then insert the DCE pass.

Nick

Adarsh,
I believe you want to look at lib/Transforms/IPO/PassManagerBuilder.cpp

Chad