[LLVMdev] RFC - VectorUtils.h isTriviallyVectorizable(Intrinsic::ID)

Hal Finkel hfinkel at anl.gov
Tue Feb 10 05:44:40 PST 2015


Hi Mark,

Thanks for working on this.

Your patch adds a general function attribute to go along with the intrinsic attribute, and I don't think that's the right thing to do. While I'd like the ability to mark general functions as 'trivially vectorizable', we don't yet have the infrastructure for that (we'd at least need some mechanism for naming the vector version of the function for different types). I think the model for this is something like IntrReadWriteArgMem, which applies only to intrinsics, and does not have a corresponding function attribute. TableGen generates a separate table for these, and we should probably do the same here.

 -Hal

----- Original Message -----
> From: "Mark Schimmel" <Mark.Schimmel at synopsys.com>
> To: llvm-commits at cs.uiuc.edu
> Sent: Monday, February 9, 2015 4:17:21 PM
> Subject: RE: [LLVMdev] RFC - VectorUtils.h	isTriviallyVectorizable(Intrinsic::ID)
> 
> The patch is attached.
> 
> -----Original Message-----
> From: Hal Finkel [mailto:hfinkel at anl.gov]
> Sent: Monday, February 02, 2015 7:28 PM
> To: Mark Schimmel
> Cc: llvmdev at cs.uiuc.edu
> Subject: Re: [LLVMdev] RFC - VectorUtils.h
> isTriviallyVectorizable(Intrinsic::ID)
> 
> ----- Original Message -----
> > From: "Mark Schimmel" <Mark.Schimmel at synopsys.com>
> > To: llvmdev at cs.uiuc.edu
> > Sent: Monday, February 2, 2015 4:27:33 PM
> > Subject: [LLVMdev] RFC - VectorUtils.h
> > isTriviallyVectorizable(Intrinsic::ID)
> > 
> > Can we make this an attribute on the intrinsic definition instead
> > of a
> > separate switch table? For example, I can specify an intrinsic is
> > “Commutative” rather than having to add to a switch statement
> > somewhere.
> 
> Yes, I think we could definitely do that. Patches welcome.
> 
>  -Hal
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory




More information about the llvm-commits mailing list