[PATCH] D96346: [NFC][PPC] Refactor TOC representation to allow several entries for the same symbol
Baptiste Saleil via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 9 07:52:45 PST 2021
bsaleil created this revision.
bsaleil added reviewers: nemanjai, stefanp, sfertile, jasonliu, daltenty, hubert.reinterpretcast, PowerPC.
bsaleil added projects: LLVM, PowerPC.
Herald added subscribers: shchenz, kbarton, hiraditya.
bsaleil requested review of this revision.
Herald added a subscriber: llvm-commits.
We currently represent TOC entries by an `MCSymbol`. This is not
enough in some situations. For example, when accessing an
initialized TLS variable `v` on AIX using the general dynamic model, we
need to generate the two following entries for `v`:
.tc .v[TC],v at m
.tc v[TC],v
One is for the region handle (with the `@m` relocation), the other is for
the variable offset.
This refactoring allows storing several entries for the same symbol
with different `VariantKind` in the TOC. If the `VariantKind` is not
specified, we default to `VK_None`.
The AIX TLS implementation using this refactoring to generate the two
entries will be posted in a subsequent patch.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D96346
Files:
llvm/include/llvm/MC/MCExpr.h
llvm/lib/MC/MCExpr.cpp
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96346.322397.patch
Type: text/x-patch
Size: 4767 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210209/e29e13ec/attachment.bin>
More information about the llvm-commits
mailing list