An error:Pass 'Runtime Evaluation' is not initialized

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

An error:Pass 'Runtime Evaluation' is not initialized

王长城
Hi,all:
I am a new at writing LLVM PASS, i write a pass like this :
using namespace llvm;

namespace {
  class RuntimeEval : public ModulePass {
  public:
    static char ID; // Pass identification, replacement for typeid

    RuntimeEval() : ModulePass(ID) {
    }
    
    virtual bool runOnModule(Module &M) {
      return false;  
    } 
  };
}

char HSASupportedRuntimeEval::ID = 0;
static RegisterPass<RuntimeEval> X("Eval", "Runti! me Evaluation");

it can be compiled successful, but when i run it with command: './Release+Asserts/bin/opt -load ./Release+Asserts/lib/LLVMRuntimeEval.so -Eval < code2.bc', 

i meet an error: 

Pass 'HSA Supported Runtime Evaluation' is not initialized.
Verify if there is a pass dependency cycle.
Required Passes:
opt: /home/ccwang/software/LLVM/LLVM3.2/llvm-3.2.src/lib/VMCore/PassManager.cpp:616: void llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI && "Expected req! uired passes to be initialized"' failed.
0  opt             0x00000000011a649f
1  opt             0x00000000011a69c9
2  libpthread.so.0 0x00007fc102e21cb0
3  libc.so.6       0x00007fc102073425 gsignal + 53
4  libc.so.6       0x00007fc102076b8b abort + 379
5  libc.so.6       0x00007fc10206c0ee
6  libc.so.6       0x00007fc10206c192
7  opt             0x000000000113c423 llvm::PMTopLevelManager::schedulePass(llvm::Pass*) + 1907
8  opt             0x000000000055253a main + 2874
9  libc.so.6       0x00007fc10205e76d __libc_start_main + 237
10 opt             0x00000000005687dd
Stack dump:
0. Program arguments: ./Release+Asserts/bin/opt -load ./Release+Asserts/lib/LLVMHRuntimeEval.so -Eval 
Aborted (core dumped)

If anyone can give me some advices about it? thanks!

regards,
wang




_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev