[cfe-dev] [OpenCL] Question about pre-linking passes required to build OpenCL program

Jeff Fifield via cfe-dev cfe-dev at lists.llvm.org
Wed May 11 14:26:04 PDT 2016


On Tue, May 10, 2016 at 3:17 PM, Liu, Yaxun (Sam) via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> + llvm-dev
>
>
>
> *From:* Sumner, Brian
> *Sent:* Tuesday, May 10, 2016 3:11 PM
> *To:* Anastasia Stulova <Anastasia.Stulova at arm.com>; Liu, Yaxun (Sam) <
> Yaxun.Liu at amd.com>; cfe-dev (cfe-dev at lists.llvm.org) <
> cfe-dev at lists.llvm.org>; Pan, Xiuli <xiuli.pan at intel.com>; Bader, Alexey (
> alexey.bader at intel.com) <alexey.bader at intel.com>
> *Cc:* Stellard, Thomas <Tom.Stellard at amd.com>; Mekhanoshin, Stanislav <
> Stanislav.Mekhanoshin at amd.com>; nd <nd at arm.com>
>
> *Subject:* RE: [OpenCL] Question about pre-linking passes required to
> build OpenCL program
>
>
>
> Hi Anastasia,
>
>
>
> I’m glad to hear there could be some support for such a mechanism.  On our
> side, we use such pre-link passes to interface with the specifics of our
> built-in function library.  For example, we transform printf calls into a
> form that interacts with our library.  We also transform calls to pipe
> functions, kernel enqueue related functions, and transform calls to the
> atomic functions to corresponding LLVM atomic instructions (and keep track
> of the memory scope elsewhere currently).  You may have noticed that we
> have a proposal out to enable the atomic instructions to directly carry a
> memory scope.
>

Hi Sam / Brian,

We have similar passes related to builtin functions but they are rather
specific to our implementation and not too complex. We don't do much else
before linking. What do you envision as the common infrastructure here?

Thanks,
Jeff


> Thanks,
>
> Brian
>
>
>
> *From:* Anastasia Stulova [mailto:Anastasia.Stulova at arm.com
> <Anastasia.Stulova at arm.com>]
> *Sent:* Tuesday, May 10, 2016 11:45 AM
> *To:* Liu, Yaxun (Sam); cfe-dev (cfe-dev at lists.llvm.org); Pan, Xiuli;
> Bader, Alexey (alexey.bader at intel.com)
> *Cc:* Stellard, Thomas; Sumner, Brian; Mekhanoshin, Stanislav; nd
> *Subject:* RE: [OpenCL] Question about pre-linking passes required to
> build OpenCL program
>
>
>
> Hi Sam,
>
>
>
> It seems to be generally useful to the community. Could you give some
> examples of those transformations that can be shared?
>
>
>
> Also I am guessing this will be a part of LLVM code base. Do you intend it
> to be publically available on the master branch?  If yes, perhaps llvm-dev
> should be added to the discussion too.
>
>
>
> Cheers,
>
> Anastasia
>
>
>
> *From:* Liu, Yaxun (Sam) [mailto:Yaxun.Liu at amd.com <Yaxun.Liu at amd.com>]
> *Sent:* 09 May 2016 21:14
> *To:* cfe-dev (cfe-dev at lists.llvm.org); Anastasia Stulova; Pan, Xiuli;
> Bader, Alexey (alexey.bader at intel.com)
> *Cc:* Stellard, Thomas; Sumner, Brian; Mekhanoshin, Stanislav
> *Subject:* [OpenCL] Question about pre-linking passes required to build
> OpenCL program
>
>
>
> Hi,
>
>
>
> We typically need to apply some transformations to the IR between clang
> and the standard linker. I am wondering if other OpenCL platforms require
> the same as well?
>
>
>
> I’m wondering if we all need such transformations (likely target
> specific). Is there any way to collaborate on a common infrastructure for
> pre-linking transformation that would reduce the size of the additions we
> have to make?
>
>
>
> Thanks.
>
>
>
> Sam
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160511/b6e252cd/attachment.html>


More information about the cfe-dev mailing list