[LLVMdev] runtime assert failure when trying to obtain analysis pass info within a transformation pass
Chuck Zhao
czhao at eecg.toronto.edu
Tue Jul 6 13:48:05 PDT 2010
I am having problems passing analysis results to transformation
passes, so I reduced my testcase into the following bare bone:
Pass1: simple FunctionPass, counting functions
Pass2: transformation pass, for now, just trying to obtain a reference
of Pass1 using AU.getAnalysis<Pass1>() inside its runOnFunction().
When I run it, I get the following runtime error:
opt -load Release/lib/MultiPasses.so -pass2 < ../test/test.bc > /dev/null
opt:
/autofs/steffan/a/a0/czhao/ResearchTools/LLVM/2.7/llvm-2.7//include/llvm/PassAnalysisSupport.h:53:
llvm::AnalysisUsage& llvm::AnalysisUsage::addRequiredID(const
llvm::PassInfo*): Assertion `ID && "Pass class not registered!"' failed.
0 opt 0x084d2928
Stack dump:
0. Program arguments: opt -load Release/lib/MultiPasses.so -pass2
/bin/sh: line 1: 6436 Aborted opt -load
Release/lib/MultiPasses.so -pass2 <../test/test.bc >/dev/null
make: *** [run_pass2] Error 134
Any hints?
Thank you
Chuck
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Pass2.cpp
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100706/14256c04/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Pass1.cpp
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100706/14256c04/attachment-0001.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Pass1.h
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100706/14256c04/attachment.h>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Makefile
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100706/14256c04/attachment-0002.ksh>
More information about the llvm-dev
mailing list