[llvm-dev] [cfe-dev] proposal - pragma section directive in clang

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 14 13:14:36 PDT 2017


+Justin and Briana, they wanted attributes on GlobalVariables recently for
GPU textures.

On Tue, Mar 14, 2017 at 1:02 PM, James Molloy <james at jamesmolloy.co.uk>
wrote:

> Hi Reid,
>
> Unfortunately yes, it is.
>

OK.


> > If we do go with approach 3, I'd recommend adding a single metadata
> attachment that controls all sections a global could possibly live in
> (text, data, rdata, bss).
>
> I agree with this, although I think using metadata here wouldn't be right
> - don't we need to use attributes when dropping metadata would cause
> miscompiles?
>
I was considering adding an attributeset to global variables, so we'd have
> something like:
>

We could definitely add AttributeSets to GlobalValue. I'd support that. It
also achieves the optimization goal of not having three attachments for
every global.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170314/79c99a6e/attachment.html>


More information about the llvm-dev mailing list