[LLVMdev] Bug 1868: Specifying Pass Orderings

John Criswell criswell at cs.uiuc.edu
Mon Dec 17 15:26:09 PST 2007

Devang Patel wrote:
> On Dec 17, 2007, at 2:25 PM, John Criswell wrote:
>> So, is there a way for a Pass to specify that other transforms
>> should be
>> run first, or can that only be done with PassManager.add()?
> PassManager.add() is the way to go.
> If one relies on PassManager to order transformations passes properly
> then we are stepping into "Find optimal ordering of optimization/
> transformations passes sequence to generate the best code for my
> application" area. 
I would actually disagree on that point.  Supporting optimal code
generation is an orthogonal design goal.  For example, the old
PassManager did not guarantee optimal code generation.  It only ensured
that all prerequisite transforms and analysis passes were run first and
tried to minimize re-running analysis passes as much as possible.

However, that's just food for thought.  I'm not sure what the correct
thing is to do long term (and I don't have time to implement it even if
I did).  For now, I'll just try to get the code working within the
constraints you mentioned.

> I'd prefer to stay out of that, because it is non-
> trivial. Instead, let PassManager users (e.g. llvm-gcc, opt. SAFECode
> driver?) decide the ordering of transformations.
Thanks for your help!

-- John T.
> -
> Devang

More information about the llvm-dev mailing list