<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 26, 2016 at 9:21 AM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 26 October 2016 at 12:14, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:<br>
> On Tue, Oct 25, 2016 at 6:52 PM, Peter Collingbourne <<a href="mailto:peter@pcc.me.uk">peter@pcc.me.uk</a>><br>
> wrote:<br>
>><br>
>> So, to summarise the overall consensus on this thread:<br>
>> - We should introduce a GlobalConstant class which supports definitions<br>
>> and declarations<br>
>> - It should derive from GlobalValue<br>
>> - No type changes for GlobalValue (i.e. still required to be pointer type)<br>
>> - To communicate the range we should use !range metadata and support it on<br>
>> GlobalConstant as well as GlobalVariable<br>
>><br>
>> Although I am not convinced that this is the right representation I appear<br>
>> to be in the minority here, so if this seems reasonable to folks I will go<br>
>> ahead and implement it.<br>
><br>
><br>
> I could go either way on GlobalConstant being a pointer or not. Keeping the<br>
> "globals are points" invariant is nice, but making LLVM IR more accurately<br>
> model object file formats is also good.<br>
<br>
</span>I would say that requiring a pointer type, specially when there is<br>
only one pointer type in the future, is closer to what the object<br>
format is. In ELF you will get an st_value regardless of it being<br>
absolute of a position in the file. It doesn't really make sense to<br>
have a type that is not at least pointer sized.<br></blockquote><div><br></div><div>Acknowledged but that seems a little like saying that because some architectures only have pointer sized registers we should only support pointers and pointer sized integers on those architectures.</div><div> </div><div>(Also it appears that COFF's equivalent of st_value is 32-bit even on 64-bit architectures.)</div><div><br></div><div>Thanks,</div></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <div>Peter</div></div></div>
</div></div>