[cfe-dev] Assertion `PI && "Expected required passes to be initialized"' failed

Nguyen, Tuan Dung Dung.Nguyen at rwth-aachen.de
Thu Feb 6 09:52:45 PST 2014


hi,

i have an instrumentation pass which i want to call with clang. However i got the following error:

Pass 'DiscoPoP' is not initialized.
Verify if there is a pass dependency cycle.
Required Passes:
clang: PassManager.cpp:646: void llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI && "Expected required passes to be initialized"' failed.

My pass contains the followings:

getAnalysisUsage(AnalysisUsage &Info) const {
    Info.addRequired<LoopInfo>();
}

INITIALIZE_PASS(DiscoPoP, "DiscoPoP",
    "analyze dependences",
    false, false)

FunctionPass *llvm::createDiscoPoPPass() {
  // PassRegistry &Registry = *PassRegistry::getPassRegistry();
  // initializeDiscoPoPPass(Registry); <--- it does not work
  return new DiscoPoP();
}

i tried to initialize my pass before returning the new instance. But it doesn't work.  What should i do in order to initialize my pass?

Thanks in advance

Tuan

PS. Stack dump:

Pass 'DiscoPoP' is not initialized.
Verify if there is a pass dependency cycle.
Required Passes:
clang: PassManager.cpp:646: void llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI && "Expected required passes to be initialized"' failed.
0  clang           0x0000000002119622 llvm::sys::PrintStackTrace(_IO_FILE*) + 34
1  clang           0x00000000021192b9
2  libpthread.so.0 0x00007f6624bc2cb0
3  libc.so.6       0x00007f6623e0f425 gsignal + 53
4  libc.so.6       0x00007f6623e12b8b abort + 379
5  libc.so.6       0x00007f6623e080ee
6  libc.so.6       0x00007f6623e08192
7  clang           0x00000000020b1a4c llvm::PMTopLevelManager::schedulePass(llvm::Pass*) + 940
8  clang           0x000000000144bbea llvm::PassManagerBuilder::addExtensionsToPM(llvm::PassManagerBuilder::ExtensionPointTy, llvm::PassManagerBase&) const + 394
9  clang           0x000000000144beaa llvm::PassManagerBuilder::populateModulePassManager(llvm::PassManagerBase&) + 186
10 clang           0x000000000094d1a7 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 1399
11 clang           0x000000000094b3f4
12 clang           0x0000000000ab39eb clang::ParseAST(clang::Sema&, bool, bool) + 507
13 clang           0x0000000000949a8d clang::CodeGenAction::ExecuteAction() + 77
14 clang           0x00000000007dc569 clang::FrontendAction::Execute() + 249
15 clang           0x00000000007bcb95 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 357
16 clang           0x00000000007a5b45 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1765
17 clang           0x00000000007a00e8 cc1_main(char const**, char const**, char const*, void*) + 1256
18 clang           0x000000000077a1b6 main + 998
19 libc.so.6       0x00007f6623dfa76d __libc_start_main + 237
20 clang           0x000000000079eead
Stack dump:
0.    Program arguments: /home/maus/Desktop/Thesis/llvm-3.3.src/Release+Asserts/bin/clang -cc1 -dp -triple x86_64-unknown-linux-gnu -emit-llvm -disable-free -main-file-name test.cc -mrelocation-model static -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version 2.22 -g -coverage-file /home/maus/Desktop/Thesis/llvm-3.3.src/Release+Asserts/bin/test.ll -resource-dir /home/maus/Desktop/Thesis/llvm-3.3.src/Release+Asserts/bin/../lib/clang/3.3 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/x86_64-linux-gnu -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/backward -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8 -internal-isystem /usr/local/include -internal-isystem /home/maus/Desktop/Thesis/llvm-3.3.src/Release+Asserts/bin/../lib/clang/3.3/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/maus/Desktop/Thesis/llvm-3.3.src/Release+Asserts/bin -ferror-limit 19 -fmessage-length 170 -mstackrealign -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -o test.ll -x c++ test.cc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140206/9c16443e/attachment.html>


More information about the cfe-dev mailing list