[llvm-dev] RFC: Absolute or "fixed address" symbols as immediate operands
Peter Collingbourne via llvm-dev
llvm-dev at lists.llvm.org
Wed Oct 26 10:10:45 PDT 2016
On Wed, Oct 26, 2016 at 9:14 AM, Reid Kleckner <rnk at google.com> wrote:
> On Tue, Oct 25, 2016 at 6:52 PM, Peter Collingbourne <peter at pcc.me.uk>
> wrote:
>
>> So, to summarise the overall consensus on this thread:
>> - We should introduce a GlobalConstant class which supports definitions
>> and declarations
>> - It should derive from GlobalValue
>> - No type changes for GlobalValue (i.e. still required to be pointer type)
>> - To communicate the range we should use !range metadata and support it
>> on GlobalConstant as well as GlobalVariable
>>
>> Although I am not convinced that this is the right representation I
>> appear to be in the minority here, so if this seems reasonable to folks I
>> will go ahead and implement it.
>>
>
> I could go either way on GlobalConstant being a pointer or not. Keeping
> the "globals are points" invariant is nice, but making LLVM IR more
> accurately model object file formats is also good.
>
> If I had to choose, I think I would make GlobalConstant a pointer. I don't
> think there are many interesting mid-level optimizations that this prevents.
>
I think my concerns are less about inhibiting optimizations than about the
possibility of bad assumptions.
Thanks,
--
--
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161026/ec8aac25/attachment.html>
More information about the llvm-dev
mailing list