[LLVMdev] Help with pass ordering
Fernando Magno Quintao Pereira
fernando at CS.UCLA.EDU
Fri Jun 2 23:12:09 PDT 2006
Dear llvm guys,
I am trying to add the BreakCriticalEdges pass to my application. I
tried to add it to the PNE pass (e.g. PHIElimination.cpp -
AU.addRequiredID(BreakCriticalEdgesID); ), but I get this error:
llc -f -regalloc=simple Base1Sum.bc -o simple.s
-----------------------------------------------
llc: 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.
So, in order to remove the edges, I am first using opt, and after it, I
run my application, that is called in llc:
opt -break-crit-edges < oldFile.bc > newFile.bc
llc -f -regalloc=simple newFile.bc -o simple.s
I wish I could add the BreakCriticalEdge pass to the compiler, so it
would run when I invoked llc. How is the right way of doing this?
Thanks a lot,
Fernando
More information about the llvm-dev
mailing list