<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Oct 26, 2016 at 9:14 AM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Tue, Oct 25, 2016 at 6:52 PM, Peter Collingbourne <span dir="ltr"><<a href="mailto:peter@pcc.me.uk" target="_blank">peter@pcc.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div><div class="m_697491003411129774gmail-h5"><div class="gmail_quote"><span style="color:rgb(34,34,34)">So, to summarise the overall consensus on this thread:</span><br></div></div></div></div><div class="gmail_extra">- We should introduce a GlobalConstant class which supports definitions and declarations</div><div class="gmail_extra">- It should derive from GlobalValue</div><div class="gmail_extra">- No type changes for GlobalValue (i.e. still required to be pointer type)</div><div class="gmail_extra">- To communicate the range we should use !range metadata and support it on GlobalConstant as well as GlobalVariable</div><div class="gmail_extra"><br></div><div class="gmail_extra">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.</div></div></blockquote><div><br></div></span><div>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.</div><div><br></div><div>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.</div></div></div></div></blockquote><div><br></div><div>I think my concerns are less about inhibiting optimizations than about the possibility of bad assumptions.</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>