[LLVMdev] PassManager Error

David Greene dag at cray.com
Fri Jul 27 17:05:31 PDT 2007


On Friday 27 July 2007 18:09, Devang Patel wrote:

> > Why?  I expect the answer is something like, "because B doesn't exist
> > anymore,"  or, "because you processed function 'bar' with B after
> > 'foo.'"
> > But why?  B doesn't _have_ to exist and it shouldn't necessarily
> > matter
> > in what order PassManager processes functions.  Only the information
> > that pass B generates for foo need exist.
>
> That is not true in LLVM. For example, DominatorTree pass maintains
> Dominator
> info.

Only because the information is embedded into the Pass.  There's no reason
it has to be.

> > If you're running module-level passes anyway, you're probably
> > burning a bit
> > of memory to hold state, so maybe keeping around information for
> > all functions
> > is feasible.  I don't know.
>
> In general, it is not a good idea to keep info for all components
> around all time for many reasons. Too many to list here.

Probably not everything, but if PassManager is sorting out dependencies, it
should have knowledge of exactly what to keep around when.

> It is not just pass manager, you're asking question regarding LLVM's
> core design.

Yep.

                                               -Dave



More information about the llvm-dev mailing list