[LLVMdev] problem loading analysis results from Inliner pass

Chris Lattner sabre at nondot.org
Tue Mar 21 23:28:06 PST 2006

On Tue, 21 Mar 2006, Michael McCracken wrote:
> My pass is a ModulePass, although it's actually just an interface to
> external data, so I suppose it could potentially be an ImmutablePass.
> I've been meaning to revisit that, but it wasn't a high priority as
> long as it was working.


> Module Pass Manager
>  PMF File Loader
> --PMF File Loader
>  Raise allocations from calls to instructions
> --Raise allocations from calls to instructions

> ModulePass. On changing the real pass to an ImmutablePass, I get the
> behavior I expected.  A quick scan of the docs doesn't say anything
> about the members of a group needing to be the same kind of pass - is
> that really the case? It does make sense, but maybe there ought to be
> a way to catch this automatically, at least in debug builds?
> Admittedly, it seems like a pretty unlikely problem, but it was
> confusing.

By default, all passes invalidate all other passes of their type or more 
granular.  In this case, what's going on is that all of the module passes 
are implicitly invalidating the results of "PMF File Loader".  Marking it 
immutable will do what you want (nothing will ever invalidate it because 
it's immutable) but make sure this really is what you want :)

> I'll also try to replicate the exact same conditions on darwin to see
> if the platform makes a difference, since I didn't run into this
> problem until moving to linux.

If it did, that would be a SERIOUS bug.



More information about the llvm-dev mailing list