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
--
___________________________________________________
Play 100s of games for FREE! http://games.mail.com/
On Tue, 2 May 2006, Domagoj D wrote:> 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...Because they invalidate each other. Neither preserves the other. -Chris -- http://nondot.org/sabre/ http://llvm.org/
On Tue, 2006-05-02 at 20:55 -0500, Domagoj D wrote:> 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