[llvm-commits] PATCH: Scalar Replacement of Aggregates Pass - Add more threshold parameters

Tom Stellard thomas.stellard at amd.com
Fri Jun 15 09:12:48 PDT 2012


On Sun, 2012-06-10 at 08:20 +0000, Rotem, Nadav wrote:
> The function is ConvertToScalarInfo::TryConvert  which "CanConvertToScalar" . I would like to be able to restrict the size of the scalar to be loaded. 
> 

I added an extra parameter to the SROA constructor for this.  I'm still
not sure exactly what you are looking for or what would make a sensible
default, so nothing is actually using the threshold value.  Maybe you
can send a follow up patch that applies the threshold the way you want.

-Tom


> Thanks,
> Nadav
> 
> -----Original Message-----
> From: Tom Stellard [mailto:thomas.stellard at amd.com] 
> Sent: Thursday, June 07, 2012 17:36
> To: Rotem, Nadav
> Cc: llvm-commits at cs.uiuc.edu
> Subject: Re: [llvm-commits] PATCH: Scalar Replacement of Aggregates Pass - Add more threshold parameters
> 
> On Wed, Jun 06, 2012 at 06:47:11PM +0000, Rotem, Nadav wrote:
> > LGTM. 
> > 
> > I remember seeing another parameter which controls the size of structs which can be converted into a single wide load instruction. It's also worth adding a parameter for that one.
> > 
> 
> I wasn't able to find this parameter, but I'm not too familiar with the code, so I could have easily overlooked it.  If you point me to where it is, I'll add another argument to the constructor.
> 
> Also, here is a v2 patch that updates some comments that were made stale by this change.
> 
> -Tom
> 
> > -----Original Message-----
> > From: llvm-commits-bounces at cs.uiuc.edu 
> > [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Tom Stellard
> > Sent: Wednesday, June 06, 2012 18:26
> > To: llvm-commits at cs.uiuc.edu
> > Subject: [llvm-commits] PATCH: Scalar Replacement of Aggregates Pass - 
> > Add more threshold parameters
> > 
> > Hi,
> > 
> > The attached pass allows users of the SROA pass to specify threshold values for the maximum number of struct members and number of array elements that can be considered for SROA.
> > 
> > The current hard-coded threshold value for maximum number of array elements is 8.  This is too small for GPUs targeted by the R600 backend which have 512 general purpose registers, so it would be very useful for these targets to be able to manually specify these threshold values.
> > 
> > Please Review.
> > 
> > Thanks,
> > Tom
> > ---------------------------------------------------------------------
> > Intel Israel (74) Limited
> > 
> > This e-mail and any attachments may contain confidential material for 
> > the sole use of the intended recipient(s). Any review or distribution 
> > by others is strictly prohibited. If you are not the intended 
> > recipient, please contact the sender and delete all copies.
> > 
> > 
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
> 
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SROA-Add-Additional-Threshold-Parameters-v3.patch
Type: text/x-patch
Size: 7194 bytes
Desc: SROA-Add-Additional-Threshold-Parameters-v3.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120615/a1c21336/attachment.bin>


More information about the llvm-commits mailing list