[llvm-dev] Adding libcall support for Rust's new vector math library

Neil Henning via llvm-dev llvm-dev at lists.llvm.org
Mon Jun 14 01:48:47 PDT 2021


Not sure if I fully understand the question - but for our Burst HPC#
compiler we just:

   - create our own TargetLibraryInfo
   - use `targetLibraryInfo.addVectorizableFunctions(descriptors);` to add
   scalar -> vector mappings
   - profit?

I can say that this has let us teach LLVM how to vectorize calls to math
functions that don't have matching LLVM intrinsics (like acos/asin/etc).

-Neil.

On Fri, Jun 11, 2021 at 7:39 AM Jacob Lifshay via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On Thu, Jun 10, 2021 at 8:47 AM Sjoerd Meijer <Sjoerd.Meijer at arm.com>
> wrote:
> >
> >
> > > Yeah, I'm aware the infrastructure already exists, I'm just not sure
> how I should add the new code -- which classes should I subclass/modify?
> >
> > I think you could do this by example. There is a front-end part, e.g.
> https://reviews.llvm.org/D53928, and there is back-end part, e.g.
> https://reviews.llvm.org/D53927.
>
> Thanks for the links!
>
> Would we have to add support to clang in order to merge our patches,
> or can we get away with just adding support to llvm and rustc for now
> since the vector math library is going to be mostly used just through
> rustc?
>
> Jacob
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>


-- 
Neil Henning
Senior Software Engineer Compiler
unity.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210614/1ff471b1/attachment.html>


More information about the llvm-dev mailing list