[llvm-commits] [llvm] r154673 - /llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp

Hal Finkel hfinkel at alcf.anl.gov
Sat Apr 14 09:49:36 PDT 2012



----- Original Message -----
> From: "Duncan Sands" <baldrick at free.fr>
> To: llvm-commits at cs.uiuc.edu
> Sent: Saturday, April 14, 2012 10:34:14 AM
> Subject: Re: [llvm-commits] [llvm] r154673 - /llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
> Hi Hal, thanks for doing this.
> 
> > --- llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp (original)
> > +++ llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp Fri Apr 13
> > 12:15:33 2012
> > @@ -35,6 +35,11 @@
> >   static cl::opt<bool>
> >   RunVectorization("vectorize", cl::desc("Run vectorization
> >   passes"));
> >
> > +static cl::opt<bool>
> > +UseGVNAfterVectorization("use-gvn-after-vectorization",
> > + cl::init(false), cl::Hidden,
> > + cl::desc("Run GVN instead of Early CSE after vectorization
> > passes"));
> > +
> >   PassManagerBuilder::PassManagerBuilder() {
> >       OptLevel = 2;
> >       SizeLevel = 0;
> > @@ -182,8 +187,10 @@
> >     if (Vectorize) {
> >       MPM.add(createBBVectorizePass());
> >       MPM.add(createInstructionCombiningPass());
> > - if (OptLevel> 1)
> > - MPM.add(createGVNPass()); // Remove redundancies
> > + if (OptLevel> 1&& UseGVNAfterVectorization)
> > + MPM.add(createGVNPass()); // Remove redundancies
> > + else
> > + MPM.add(createEarlyCSEPass()); // Catch trivial redundancies
> 
> Did you experiment to see if it was better to run EarlyCSE before
> rather than
> after instcombine?

No, but I'd be very surprised if it was because instcombine cleans up all of the shuffles and insert/extract pairs. Nevertheless, it is worth a try, I'll let you know.

Thanks again,
Hal

> 
> Ciao, Duncan.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list