[LLVMdev] Problem with generating Machine function analysis pass

Mikael Lepistö mikael.lepisto at tut.fi
Thu Sep 3 03:40:47 PDT 2009


Hi,

I've been encountering a problem with function pass manager with 
llvm-2.6. Somehow system does not know how to create analysis pass if 
it's required by some other pass.

I got following after adding various debug prints to PassManager.cpp I 
got following results for my reduced test program which just loads 
module and then tries to make a function pass manager.

elhigu at mr-lenovo:~/temp$ g++ `llvm-config --cxxflags` -g -o test test.cc 
`llvm-config --ldflags --libs`
elhigu at mr-lenovo:~/temp$ ./test
------------------- finding usage Target Data Layout
------------------- found usage
------------------- check analysis
--------Required set ----------
--------     end     ----------
------------------- analysis checked if it was there
------------------- finding usage If Converter
------------------- found usage
------------------- check analysis
--------Required set ----------
Machine Function Analysis
--------     end     ----------
---------- finding... Machine Function Analysis
-------------------------------- Oh no no analysis pass
test: 
/home/elhigu/stow_sources/llvm-2.6-svn/include/llvm/PassSupport.h:111: 
llvm::Pass* llvm::PassInfo::createPass() const: Assertion `NormalCtor && 
"Cannot call createPass on PassInfo without default ctor!"' failed.
Aborted

When I tried to compile the same file with llc Machine Function Analysis 
pass was created with out problems. Am I missing some pass registration 
initialisation or something like that? Any ideas what I'm doing wrong?

For many other passes (*I)->createPass() does worked correctly.

I attached modified PassManager.cpp which shows, where the debug strings 
are coming from and source code of test.cc program.

Thanks, Mikael Lepistö ( for instant helping I'm hanging around on #llvm 
with elhigu nick )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cc
Type: text/x-c++src
Size: 1287 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090903/e749bd92/attachment.cc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PassManager.cpp
Type: text/x-c++src
Size: 58381 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090903/e749bd92/attachment.cpp>


More information about the llvm-dev mailing list