[all-commits] [llvm/llvm-project] de3a48: [NFC][PPC] Refactor TOC representation to allow se...

Victor Huang via All-commits all-commits at lists.llvm.org
Tue Feb 16 13:34:14 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: de3a485d9c391c44e2c90f79bbf8ac13d49d9fb6
      https://github.com/llvm/llvm-project/commit/de3a485d9c391c44e2c90f79bbf8ac13d49d9fb6
  Author: Victor Huang <wei.huang at ibm.com>
  Date:   2021-02-16 (Tue, 16 Feb 2021)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

  Log Message:
  -----------
  [NFC][PPC] Refactor TOC representation to allow several entries for the same symbol

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.

Patched By: bsaleil
Reviewed By: sfertile

Differential Revision: https://reviews.llvm.org/D96346




More information about the All-commits mailing list