モジュール レベル パスを作成しており、runOnModule
関数内に次のコードが含まれています。
for (Module::iterator F = M.begin(), FEND = M.end(); F != FEND; ++F){
if (!(*F).isDeclaration()){
LoopInfo* LI = new LoopInfo();
LI->runOnFunction(*F);
lis.push_back(LI);
for(LoopInfo::iterator L = LI->begin(), LEND = LI->end(); L != LEND; ++L){
// add all functions
loops.push_back(*L);
}
}
}
これはすべてコンパイルされますが、実行すると次のエラーが発生します。
opt: /include/llvm/PassAnalysisSupport.h:200: AnalysisType
&llvm::Pass::getAnalysis() const [AnalysisType = llvm::DominatorTreeWrapperPass]:
Assertion `Resolver && "Pass has not been inserted into a PassManager object!"' failed.
以下のコードを ``lib/Transforms/IPO/PassManagerBuilder.cpp in the
populateModulePassManager` メソッドに入れてみましたが、何も起こりませんでした。
if (EnableMergeFunctions) {
MPM.add(createMergeFunctionsPass());
MPM.add(createJumpThreadingPass()); // Merge consecutive conditionals
MPM.add(createInstructionCombiningPass());
MPM.add(createCFGSimplificationPass());
}
どんな助けでも大歓迎です。