[LLVMdev] InstructionCombining.cpp inconsistency in whether it modifies the CFG?

Michael Ilseman michael at lunarg.com
Mon May 16 08:55:27 PDT 2011


InstCombine says in its getAnalysisUsage that it preserves the CFG,
but for the 4th argument in its INITIALIZE_PASS call, it says false,
which I believe corresponds to whether it preserves the CFG. Is this a
mistake, or is there deeper meaning here?

InstructionCombining.cpp:73-82

char InstCombiner::ID = 0;
INITIALIZE_PASS(InstCombiner, "instcombine",
                "Combine redundant instructions", false, false)

void InstCombiner::getAnalysisUsage(AnalysisUsage &AU) const {
  AU.addPreservedID(LCSSAID);
  AU.setPreservesCFG();
}



More information about the llvm-dev mailing list