diff options
author | esmeyi <esme.yi@ibm.com> | 2022-07-03 23:16:16 -0400 |
---|---|---|
committer | esmeyi <esme.yi@ibm.com> | 2022-07-03 23:16:16 -0400 |
commit | d2a35e4d39fec0c328f9bb05ad3ea7134751a64e (patch) | |
tree | d2c86f34e4cb32aa4bfb34b3ca49e12fa77c3e1f /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | e98e13ac8f385568f30d2ded7ea146a1f2a02d1f (diff) | |
download | llvm-d2a35e4d39fec0c328f9bb05ad3ea7134751a64e.zip llvm-d2a35e4d39fec0c328f9bb05ad3ea7134751a64e.tar.gz llvm-d2a35e4d39fec0c328f9bb05ad3ea7134751a64e.tar.bz2 |
[AIX] Handling the label alignment of a global
variable with its multiple aliases.
This patch handles the case where a variable has
multiple aliases.
AIX's assembly directive .set is not usable for the
aliasing purpose, and using different labels allows
AIX to emulate symbol aliases. If a value is emitted
between any two labels, meaning they are not aligned,
XCOFF will automatically calculate the offset for them.
This patch implements:
1) Emits the label of the alias just before emitting
the value of the sub-element that the alias referred to.
2) A set of aliases that refers to the same offset
should be aligned.
3) We didn't emit aliasing labels for common and
zero-initialized local symbols in
PPCAIXAsmPrinter::emitGlobalVariableHelper, but
emitted linkage for them in
AsmPrinter::emitGlobalAlias, which caused a FAILURE.
This patch fixes the bug by blocking emitting linkage
for the alias without a label.
Reviewed By: shchenz
Differential Revision: https://reviews.llvm.org/D124654
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions