RFC: Enable vectorization of call instructions in the loop vectorizer

Michael Zolotukhin mzolotukhin at apple.com
Thu Mar 5 15:11:00 PST 2015


Hi Eric, Hal, Arnold,

Could you please take a look at this patch then (in the original series it’ll replace 0006-patch)?



I’m totally unfamiliar with clang options passing and parsing, so I’d appreciate any corrections here. E.g. I chose ‘f_Group’ for the option almost at random:)

Thanks,
Michael


> On Mar 5, 2015, at 10:09 AM, Eric Christopher <echristo at gmail.com> wrote:
> 
> 
> 
> On Thu, Mar 5, 2015 at 9:02 AM <aschwaighofer at apple.com <mailto:aschwaighofer at apple.com>> wrote:
> 
> 
> On 03/05/15, Hal Finkel   wrote:
> > Okay, unfortunately, this specifically does not work for me. I need to control the triple used for compilation in cross-compiling environments, and whether or not calls to some particular library might be generated does not belong there.
> >
> > Currently, TLI is constructed by the frontend like this (to copy from Clang):
> >
> >  // Figure out TargetLibraryInfo.
> >  Triple TargetTriple(TheModule->getTargetTriple());
> >  PMBuilder.LibraryInfo = createTLI(TargetTriple, CodeGenOpts);
> >
> > and this information needs to be passed in from the frontend (so that it can be easily controlled using frontend command-line flags). We should define some enum with the different library types being targeted, and probably stick that into CodeGenOpts, and use it in TLI as appropriate. The backend might also generate calls into such a library, so CodeGenOpts is really the right place for this.
> 
> Works for me.
> 
> 
> I viewed using the environment as a stringly typed version of what you suggest until we have some real users of this. I must admit I have not researched deeply into whether the frontend could have set the triple in TheModule->getTargetTriple() from " "x86-apple-darwin” to "x86-apple-darwin-accelerate".
> 
> 
> FWIW you can do this, but ... let's not :)
> 
> CodeGenOpts is how you pass this sort of stuff down. 
> 
> Thanks!
> 
> -eric
>  
> 
> That said this would have been a hack in the frontend and using a enum or alternatively just setting the set of functions in the frontend is cleaner.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150305/31e209cb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CFE-Add-fveclib-option.patch
Type: application/octet-stream
Size: 4680 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150305/31e209cb/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150305/31e209cb/attachment-0001.html>


More information about the llvm-commits mailing list