<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">hi,<br>
<br>
i have an instrumentation pass which i want to call with clang. However i got the following error:<br>
<br>
Pass 'DiscoPoP' is not initialized.<br>
Verify if there is a pass dependency cycle.<br>
Required Passes:<br>
clang: PassManager.cpp:646: void llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI && "Expected required passes to be initialized"' failed.<br>
<br>
My pass contains the followings:<br>
<br>
getAnalysisUsage(AnalysisUsage &Info) const {<br>
    Info.addRequired<LoopInfo>();<br>
}<br>
<br>
INITIALIZE_PASS(DiscoPoP, "DiscoPoP",<br>
    "analyze dependences",<br>
    false, false)<br>
<br>
FunctionPass *llvm::createDiscoPoPPass() {<br>
  // PassRegistry &Registry = *PassRegistry::getPassRegistry();<br>
  // initializeDiscoPoPPass(Registry); <--- it does not work <br>
  return new DiscoPoP();<br>
}<br>
<br>
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?<br>
<br>
Thanks in advance<br>
<br>
Tuan<br>
<br>
PS. Stack dump:<br>
<br>
Pass 'DiscoPoP' is not initialized.<br>
Verify if there is a pass dependency cycle.<br>
Required Passes:<br>
clang: PassManager.cpp:646: void llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI && "Expected required passes to be initialized"' failed.<br>
0  clang           0x0000000002119622 llvm::sys::PrintStackTrace(_IO_FILE*) + 34<br>
1  clang           0x00000000021192b9<br>
2  libpthread.so.0 0x00007f6624bc2cb0<br>
3  libc.so.6       0x00007f6623e0f425 gsignal + 53<br>
4  libc.so.6       0x00007f6623e12b8b abort + 379<br>
5  libc.so.6       0x00007f6623e080ee<br>
6  libc.so.6       0x00007f6623e08192<br>
7  clang           0x00000000020b1a4c llvm::PMTopLevelManager::schedulePass(llvm::Pass*) + 940<br>
8  clang           0x000000000144bbea llvm::PassManagerBuilder::addExtensionsToPM(llvm::PassManagerBuilder::ExtensionPointTy, llvm::PassManagerBase&) const + 394<br>
9  clang           0x000000000144beaa llvm::PassManagerBuilder::populateModulePassManager(llvm::PassManagerBase&) + 186<br>
10 clang           0x000000000094d1a7 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 1399<br>
11 clang           0x000000000094b3f4<br>
12 clang           0x0000000000ab39eb clang::ParseAST(clang::Sema&, bool, bool) + 507<br>
13 clang           0x0000000000949a8d clang::CodeGenAction::ExecuteAction() + 77<br>
14 clang           0x00000000007dc569 clang::FrontendAction::Execute() + 249<br>
15 clang           0x00000000007bcb95 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 357<br>
16 clang           0x00000000007a5b45 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1765<br>
17 clang           0x00000000007a00e8 cc1_main(char const**, char const**, char const*, void*) + 1256<br>
18 clang           0x000000000077a1b6 main + 998<br>
19 libc.so.6       0x00007f6623dfa76d __libc_start_main + 237<br>
20 clang           0x000000000079eead<br>
Stack dump:<br>
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
<br>
<br>
</div>
</body>
</html>