Hi all,
Why are these two passes conflicting: UnifyFunctionExitNodes and LowerSwitch?
AU.addRequired(LowerSwitchID) works, so does AU.addRequired<unifyFunctionExitNodes>(),
but the two together don't...
opt: PassManagerT.h:387: void llvm::PassManagerT<Trait>::markPassUsed(const llvm::PassInfo*, llvm::Pass*) [with Trait = llvm::MTraits]: Assertion `getAnalysisOrNullUp(P) && dynamic_cast<ImmutablePass*>(getAnalysisOrNullUp(P)) && "Pass available but not found! " "Perhaps this is a module pass requiring a function pass?"' failed.
opt((anonymous namespace)::PrintStackTrace()+0x18)[0x8706558]
opt((anonymous namespace)::SignalHandler(int)+0xfe)[0x87067e0]
and so on...
Thx.
Domagoj
Because they invalidate each other. Neither preserves the other.
-Chris
Hi all,
Why are these two passes conflicting: UnifyFunctionExitNodes and LowerSwitch?
They do not, sort of.
AU.addRequired(LowerSwitchID) works, so does AU.addRequired<unifyFunctionExitNodes>(),
but the two together don't...
opt: PassManagerT.h:387: void llvm::PassManagerT<Trait>::markPassUsed(const llvm::PassInfo*, llvm::Pass*) [with Trait = llvm::MTraits]: Assertion `getAnalysisOrNullUp(P) && dynamic_cast<ImmutablePass*>(getAnalysisOrNullUp(P)) && "Pass available but not found! " "Perhaps this is a module pass requiring a function pass?"' failed.
opt((anonymous namespace)::PrintStackTrace()+0x18)[0x8706558]
opt((anonymous namespace)::SignalHandler(int)+0xfe)[0x87067e0]
and so on...
See:
http://llvm.org/docs/WritingAnLLVMPass.html#PassFunctionPass
This should really be in the FAQ. But sufice to say if you make your pass a function pass, you will be fine.
Andrew