[LLVMdev] How to add LiveVariables pass
hasnoadditives at gmail.com
Thu Oct 2 09:15:49 PDT 2014
In LLVM 3.4 using C++ API I would like to track which physical registers
are live. Therefore I want to add a LiveVariables pass to
FunctionPassManager. However I get this failed assertion:
Pass 'Remove unreachable machine basic blocks' is not initialized.
Verify if there is a pass dependency cycle.
llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI &&
"Expected required passes to be initialized"' failed.
Looking into CodeGen/UnreachableBlockElim.cpp I find that 'Remove
unreachable machine basic blocks' is the name
of UnreachableMachineBlockElim, for which exists a function prototype 'void
InitializePasses.h. Calling that function (for which I don't see any
implementation...) with llvm::PassRegistry::getPassRegistry() before adding
LiveVariables to the pass manager still results in the same failed
assertion. Creating an instance of UnreachableMachineBlockElim is not
possible because the class is not declared in a header file and therefore
not visible to the compiler.
How can I add LiveVariables to my FunctionPassManager?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev