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

Javed Absar via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 14 15:07:20 PDT 2017


Thanks Reid for the support.   Welcome Justin/Briana to the discussion. Happy to hear that AttributeSets attached to GlobalVariable will be useful for other purposes as well.


From: Reid Kleckner [mailto:rnk at google.com]
Sent: 14 March 2017 20:15
To: James Molloy <james at jamesmolloy.co.uk>; Justin Lebar <jlebar at google.com>; Briana Grace <brianagrace at google.com>
Cc: Javed Absar <Javed.Absar at arm.com>; Jonathan Roelofs <jonathan at codesourcery.com>; LLVM Dev <llvm-dev at lists.llvm.org>; nd <nd at arm.com>; cfe-dev at lists.llvm.org
Subject: Re: [llvm-dev] [cfe-dev] proposal - pragma section directive in clang

+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<mailto: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/08cdd100/attachment.html>


More information about the llvm-dev mailing list