[PATCH] Disable passes on optnone functions

Robinson, Paul Paul_Robinson at playstation.sony.com
Mon Mar 31 10:51:28 PDT 2014


r205228. Any issues can be addressed post-commit.
On to the Clang attribute!
Thanks,
--paulr

> -----Original Message-----
> From: Philip Reames [mailto:listmail at philipreames.com]
> Sent: Friday, March 28, 2014 3:22 PM
> To: Robinson, Paul; llvm-commits at cs.uiuc.edu
> Subject: Re: [PATCH] Disable passes on optnone functions
> 
> Code wise, this seems fine.  If this style was already accepted for IR
> passes, it should work for backend passes as well.
> 
> w.r.t. the reg allocator passes, leaving it as is seems fine. Choosing a
> different register allocator is less about possible semantic changes
> (optimization) and more about running time vs code quality.  I wouldn't
> expect to find too many examples of code which are sensitive to the
> register allocator used.  (One exception: a buggy garbage collector
> implementation might be effected by a more or precise liveness
> analysis)  Probably not worth worrying about for the moment.
> 
> p.s. I don't have commit rights, so someone else will need to commit
> this.
> 
> Philip
> 
> On 03/27/2014 12:26 PM, Robinson, Paul wrote:
> > +Philip Reames who offered to do the review.
> > Restating the original email message:
> >
> > This patch disables a number of Machine Function Passes for functions
> > with the 'optnone' attribute.
> >
> > To come up with the list of passes, I looked at CodeGen/Passes.cpp,
> > and disabled whatever would be excluded under CodeGenOpt::None.
> > Except, I did not disable anything listed in addOptimizedRegAlloc(),
> > as I can't see how to substitute one RA pass sequence for another on
> > a per-function basis.  Maybe there's a way to deal with that safely,
> > but for now it seemed prudent (and not horribly harmful to the goals
> > of 'optnone') to leave well enough alone.
> > If anybody has an idea, we're open to it.
> > --paulr
> >
> >> -----Original Message-----
> >> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> >> bounces at cs.uiuc.edu] On Behalf Of Robinson, Paul
> >> Sent: Tuesday, March 25, 2014 9:53 AM
> >> To: llvm-commits at cs.uiuc.edu
> >> Cc: Chandler Carruth (chandlerc at gmail.com)
> >> Subject: RE: [PATCH] Disable passes on optnone functions
> >>
> >> Ping^3.  +chandlerc on the theory that nobody else is
> >> willing to step on the toes of the Pass Manager Meister,
> >> but I'll take review from anybody willing to do it.
> >>
> >> This is the last of the LLVM pieces of the 'optnone' work.
> >> It would be really really nice to put this to bed.
> >> --paulr
> >>
> >>
> >>> -----Original Message-----
> >>> From: Robinson, Paul
> >>> Sent: Monday, March 17, 2014 10:35 AM
> >>> To: Robinson, Paul; llvm-commits at cs.uiuc.edu
> >>> Subject: RE: [PATCH] Disable passes on optnone functions
> >>>
> >>> Ping^2.
> >>> --paulr
> >>>
> >>>> -----Original Message-----
> >>>> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> >>>> bounces at cs.uiuc.edu] On Behalf Of Robinson, Paul
> >>>> Sent: Friday, March 07, 2014 9:47 AM
> >>>> To: llvm-commits at cs.uiuc.edu
> >>>> Subject: RE: [PATCH] Disable passes on optnone functions
> >>>>
> >>>> Ping. Somebody willing to own MachineFunctionPass behavior?
> >>>> --paulr
> >>>>
> >>>>> -----Original Message-----
> >>>>> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> >>>>> bounces at cs.uiuc.edu] On Behalf Of Robinson, Paul
> >>>>> Sent: Monday, March 03, 2014 6:25 PM
> >>>>> To: Nick Lewycky
> >>>>> Cc: llvm-commits at cs.uiuc.edu
> >>>>> Subject: RE: [PATCH] Disable passes on optnone functions
> >>>>>
> >>>>>> -----Original Message-----
> >>>>>> From: Nick Lewycky [mailto:nicholas at mxc.ca]
> >>>>>> Sent: Saturday, March 01, 2014 1:17 AM
> >>>>>> To: Robinson, Paul
> >>>>>> Cc: llvm-commits at cs.uiuc.edu
> >>>>>> Subject: Re: [PATCH] Disable passes on optnone functions
> >>>>>>
> >>>>>> Robinson, Paul wrote:
> >>>>>>> This patch disables a number of Machine Function Passes for
> >>>>> functions
> >>>>>>> with the 'optnone' attribute.
> >>>>>>>
> >>>>>>> To come up with the list of passes, I looked at
> >>>> CodeGen/Passes.cpp,
> >>>>>>> and disabled whatever would be excluded under
> >> CodeGenOpt::None.
> >>>>>>> Except, I did not disable anything listed in
> >>>> addOptimizedRegAlloc(),
> >>>>>>> as I can't see how to substitute one RA pass sequence for
> >>> another
> >>>> on
> >>>>>>> a per-function basis.  Maybe there's a way to deal with that
> >>>> safely,
> >>>>>>> but for now it seemed prudent (and not horribly harmful to the
> >>>> goals
> >>>>>>> of 'optnone') to leave well enough alone.
> >>>>>>> If anybody has an idea, we're open to it.
> >>>>>> I note that I'm on the 'to' line, but I am certainly not the
> >> right
> >>>>>> person to review this. I know some high-level design of the
> >>> codegen
> >>>>>> parts, but that's about it.
> >>>>> Ah, sorry.  You were there for me on the
> >>>> {Function|BasicBlock|Loop}Pass
> >>>>> part, I shouldn't have presumed about MachineFunctionPass.
> >>>>>
> >>>>>> Would someone else please take a look?
> >>>>>>
> >>>>>> Nick
> >>>>> --paulr
> >>>>>
> >>>>>
> >>>>>
> >>>>> _______________________________________________
> >>>>> 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