Edmund Grimley-Evans
2010-Jul-23 14:02 UTC
[LLVMdev] "Cannot call createPass on PassInfo without default ctor!"
While trying to add a pass to the ARM back end I'm getting quite a lot of this assertion failure: Pass.cpp:255: llvm::Pass* llvm::PassInfo::createPass() const: Assertion `NormalCtor && "Cannot call createPass on PassInfo without default ctor!"' failed. A simple way to get it is to add two lines to ARMTargetMachine.cpp: #include "llvm/Transforms/Scalar.h" and PM.add(createSinkingPass()); in addInstSelector just before this line: PM.add(createARMISelDag(*this, OptLevel)); Then run anything through the ARM back end, for example: clang -cc1 -triple thumbv7-eabi -O3 -target-cpu cortex-a8 x.c -S -o x.s The interesting thing is that the assertion failure doesn't happen during the call to createSinkingPass(), which I added, but during the call to createARMISelDag in the following line. Can anyone tell me what's going on here? (I've also tried adding the Hello pass, with the same result.) Thanks, Edmund -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Anton Korobeynikov
2010-Jul-23 14:51 UTC
[LLVMdev] "Cannot call createPass on PassInfo without default ctor!"
Hello, Edmund> PM.add(createSinkingPass());Is your pass a MachineFunctionPass or just FunctionPass ? -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State University
Reasonably Related Threads
- [LLVMdev] Accessing an empty machine function before instruction selection?
- [LLVMdev] Problem with generating Machine function analysis pass
- [LLVMdev] Problemo: createTailDuplicationPass
- [LLVMdev] PassManager again...
- [LLVMdev] Segmentation fault when traverse call graph