debug the LLVM instcombine pass


Anybody knows how to debug the instcombine pass? I tried to debug “opt -instcombine”, but looks like I am still not able to step into codes. Any comments are greatly appreciated here. Thanks!

Do you have a DEBUG build ?


Do you set breakpoint on InstructionCombiningPass::runOnFunction, or other functions?
Note InstCombine might not be done as some functions could be skipped.

bool InstructionCombiningPass::runOnFunction(Function &F) {
if (skipFunction(F))
return false;