[patch][pr10367] Add support for offsets in GlobalAlias
Reid Kleckner
rnk at google.com
Mon May 19 11:06:48 PDT 2014
On Sun, May 18, 2014 at 6:50 PM, Rafael EspĂndola <
rafael.espindola at gmail.com> wrote:
> This patch completes the implementation of pr10367. With it an alias
> can reliably
> point to an offset of another object.
>
> This is needed for RTTI on windows where the RTTI data precedes the
> vtable symbol. It also seems desirable for concatenating globals used
> from a single function to improve ARM and AARCH64 code.
>
> Particular items it would be nice to have a second opinion on:
>
> * LL Syntax
> * Bitcode representation
>
Seems fine. I think we've essentially settled on the raw offset rather
than a GEP, and everything follows from that.
> * I included tests for llvm-as/llvm-dis, llvm-link and llc, but let me
> know if there is any other test you would find interesting.
>
Doesn't LLVM have optimizations that replace uses of an alias with uses of
the global? I'm surprised this didn't require those kinds of changes. Are
you deferring optimizer changes for the moment?
> * Should offsets past the end of an object be illegal or we just don't
> define what the result is?
>
I think it's fine to allow them. It's the same as GEPing past the end of
the object. Later someone could GEP back and do loads and stores through
that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140519/6c23b209/attachment.html>
More information about the llvm-commits
mailing list