[PATCH] D150367: [AIX][TLS] Generate optimized local-exec access code sequence using X-Form loads/stores

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 21 11:13:11 PDT 2023


amyk added a comment.

- Specify why we are doing this optimization in the description.
- Check on why these TLS instructions were not previously added.



================
Comment at: llvm/lib/Target/PowerPC/P10InstrResources.td:1299
      DFLOADf32, DFLOADf64, LFD,
-    LFDX,  XFLOADf32, XFLOADf64,
     LFIWAX, LIWAX,
----------------
Check these definitions in the `P10InstrResources.td`.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:714
+// This can be done as long as the memory operation's immediate offset is 0 and
+// that the thread pointer is being added to.
+static bool canOptimizeTLSDFormToXFormOnAIX(SelectionDAG *CurDAG,
----------------
- Fix this comment.
- Can this function be general? Include both of the Linux and AIX parts.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:743
+      return false;
+    if (AddFirstOpReg->getReg() != PPC::X13)
+      return false;
----------------
Instead of explicitly using `PPC::X13`, is there something like `Subtarget.getThreadPointerRegister()` that we can use?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150367



More information about the llvm-commits mailing list