[LLVMdev] [polly] pass ordering
Sergei Larin
slarin at codeaurora.org
Wed Apr 17 15:09:48 PDT 2013
Sorry for being late to the party... but here are my 2c.
I am definitely for moving Polly to the point it would need minimal
pre-processing with max coverage. Where this point is - I am not sure yet. I
do not care much right now for the compile time, so duplicating computations
might be OK.
On a different angle, my reason for getting into this was an attempt to
introduce a cost function to _not_ transform loops that are not likely or
_not_profitable_ to be vectorized. The later is platform specific, so if we
are talking about moving Polly position, maybe we can talk about the cost
function as well? The tradeoff is obvious, the earlier you know what you are
_not_ vectorizing, the less time spent and less code change might be done to
such a region. Precision of such check is increasing with Polly specific
passes progress, so such cost function needs to be callable from multiple
locations. Ideally Polly needs to use the BE hooks used by LLVM
vectorizer...
Sergei
---
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation
> -----Original Message-----
> From: Tobias Grosser [mailto:tobias at grosser.es]
> Sent: Wednesday, April 17, 2013 2:09 PM
> To: Sebastian Pop
> Cc: llvmdev at cs.uiuc.edu; slarin at codeaurora.org
> Subject: Re: [polly] pass ordering
>
> On 04/17/2013 09:04 PM, Sebastian Pop wrote:
> > Tobias Grosser wrote:
> >> As said before, we could probably add it in between those two
> passes:
> >>
> >> MPM.add(createReassociatePass()); // Reassociate expressions
> >> + addExtensionsToPM(EP_LoopOptimizerStart, MPM);
> >> MPM.add(createLoopRotatePass()); // Rotate Loop
> >
> > As this is in the middle of other LNO passes, can you please rename
> > s/EP_LoopOptimizerStart/EP_Polly_LNO/ or anything other than
> LoopOptimizerStart?
>
> It is in the middle? The passes executed before are:
>
> MPM.add(createJumpThreadingPass()); // Thread jumps.
> MPM.add(createCorrelatedValuePropagationPass()); // Propagate
> conditionals
> MPM.add(createCFGSimplificationPass()); // Merge & remove
> BBs
> MPM.add(createInstructionCombiningPass()); // Combine silly
> seq's
>
>
> MPM.add(createTailCallEliminationPass()); // Eliminate tail
> calls
> MPM.add(createCFGSimplificationPass()); // Merge & remove
> BBs
> MPM.add(createReassociatePass());
>
> None of them seems to be a loop pass? So it seems to be at the start of
> the LNO.
>
> Also, I would like to avoid calling an extension point 'Polly...'. We
> should use a name that describes its possible use or its location
> rather than a specific user.
>
> Tobias
More information about the llvm-dev
mailing list