[PATCH] D124654: [AIX] Handling the label alignment of a global variable with its multiple aliases.

Esme Yi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 6 23:59:57 PDT 2022


Esme added a comment.

In D124654#3634386 <https://reviews.llvm.org/D124654#3634386>, @shchenz wrote:

>> After reading this patch, I'm confused about how it's supposed to work in general. In particular, what happens if we never call emitGlobalAliasInline() with the correct offset? Do we just throw away the symbol?
>
> If there is a alias symbol which has an offset can not be recognized by this patch, I think a fatal error will be emitted. See `PPCAIXAsmPrinter::getAliasOffset()`. @Esme could you confirm that?

Yes, @shchenz is right. In this patch,  we emit the alias label before the sub-element value only if they have the same offset. In general, if the alias's offset doesn't match to any sub-element's offset, we will not emit the label for that alias symbol since we don't know where to emit it. So we must guarantee the offset is valid when we get it in `PPCAIXAsmPrinter::getAliasOffset()`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124654/new/

https://reviews.llvm.org/D124654



More information about the llvm-commits mailing list