[LLVMdev] PassManager Mysteries

Devang Patel dpatel at apple.com
Tue Jan 29 09:43:01 PST 2008

On Jan 28, 2008, at 8:11 PM, John Criswell wrote:

> If you're updating a pass from pre-LLVM 2.0 to post-LLVM 2.0, you  
> should
> be aware that the pass manager in LLVM 2.x is used only for scheduling
> dependent *analysis* passes.

I believe that was the intention from day one otherwise original  
author would not have used term "analysis" everywhere in code and  
interface that deals with pass dependencies.

> If you need to ensure that transform
> passes are run in a certain order or before an analysis pass, you need
> to order that explicitly by adding the passes to the PassManager  
> object
> in the correct order.
> In my case, SAFECode used the PassManager's dependency checking to
> ensure that the Automatic Pool Allocation transform was run before the
> SAFECode analysis and transform passes.  This worked in LLVM 1.9; it
> doesn't work in LLVM 2.x.

On the other side, LLVM 2.x PassManager add much needed flexibility  
and new features.


More information about the llvm-dev mailing list