[PATCH] LocalStackSlotAllocation improvements
Hal Finkel
hfinkel at anl.gov
Tue Apr 30 13:09:49 PDT 2013
Jim okayed this off-list. r180799.
-Hal
----- Original Message -----
> From: "Hal Finkel" <hfinkel at anl.gov>
> To: "Jim Grosbach" <grosbach at apple.com>
> Cc: "Commit Messages and Patches for LLVM" <llvm-commits at cs.uiuc.edu>
> Sent: Tuesday, April 16, 2013 3:39:40 PM
> Subject: Re: [PATCH] LocalStackSlotAllocation improvements
>
> Ping.
>
> -Hal
>
> ----- Original Message -----
> > From: "Hal Finkel" <hfinkel at anl.gov>
> > To: "Jim Grosbach" <grosbach at apple.com>
> > Cc: "Commit Messages and Patches for LLVM"
> > <llvm-commits at cs.uiuc.edu>
> > Sent: Monday, April 8, 2013 6:33:35 PM
> > Subject: [PATCH] LocalStackSlotAllocation improvements
> >
> > Jim, et al.,
> >
> > Please review the attached patch that improves
> > LocalStackSlotAllocation. It does a few things:
> >
> > - Taking advantage of the fact that the virtual base registers are
> > allocated in order of the local frame offsets, remove the
> > quadratic
> > register-searching behavior. Because of the ordering, we only need
> > to check the last virtual base register created.
> >
> > - Store the frame index in the FrameRef structure, and get the
> > frame
> > index and the local offset from this structure at the top of the
> > loop iteration. This allows us to de-nest the loops in
> > insertFrameReferenceRegisters (and I think makes the code
> > cleaner).
> > I also moved the needsFrameBaseReg check into the first loop over
> > instructions so that we don't bother pushing FrameRefs for
> > instructions that don't want a virtual base register anyway.
> >
> > - Avoids the creation of single-use virtual base registers. These
> > are currently not useful because, in general, they end up
> > replacing
> > what would be one r+r instruction with an add and a r+i
> > instruction.
> >
> > Thanks again,
> > Hal
> >
> > P.S. I'll commit some tests to cover the single-use behavior when I
> > enable this on PPC.
> >
> > --
> > Hal Finkel
> > Postdoctoral Appointee
> > Leadership Computing Facility
> > Argonne National Laboratory
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
> _______________________________________________
> 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