[LLVMdev] problem loading analysis results from Inliner pass

Chris Lattner sabre at nondot.org
Tue Mar 21 13:07:33 PST 2006


On Mon, 20 Mar 2006, Michael McCracken wrote:

> Hi, I'm trying to access an analysis pass from the Inliner pass, and
> I'm having a lot of trouble getting that to work - I can verify that
> my pass is loaded and run (it is a dynamically loaded pass that is
> part of an analysisgroup), however, when I access it using
> getAnalysis<> from within Inliner::runOnSCC, I am instead getting the
> default, dummy version of my analysis, which should be overridden by
> the one that was brought in with -load.

What sort of pass is it?  The inliner is a ModulePass, so the only thing 
it can getAnalysis<> are modulepasses and immutablepasses: functionpasses 
won't work.

> I'm having a hard time debugging this, so any tips for how to track
> the problem down would be appreciated.

Try passing -debug-pass=Structure to opt.

> I am running on Linux, and the version of LLVM I am working with is
> from CVS a couple of months ago, so if this sounds like a problem
> that's been solved already, it might be - that'd be good news.

It doesn't sound familiar.

> This arrangement of analysis passes has worked in the past, and the
> fact that my pass is loaded but not resolved correctly leads me to
> believe it isn't a platform issue, but I'm open to any suggestions.

That's possible too, I don't really know.  I would guess that it's a 
function pass which is getting killed before you pass runs. 
-debug-pass=Structure should help figure out if that's the case.

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/




More information about the llvm-dev mailing list