[PATCH] D150367: [AIX][TLS] Generate optimized local-exec access code sequence using X-Form loads/stores
Lei Huang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 18:16:11 PDT 2023
lei accepted this revision as: lei.
lei added a comment.
This revision is now accepted and ready to land.
Just a few nits, otherwise LGTM.
Thanks for addressing the issue with increasing the usage of registers when we have a 64-bit load/store on a 32-bit system.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:787
+bool PPCDAGToDAGISel::tryTLSXFormStore(StoreSDNode *ST) {
+ SDValue Base = ST->getBasePtr();
+ if (!canOptimizeTLSDFormToXForm(CurDAG, Base))
----------------
Since `Base` is only used on line 788, consider just inlining it there vs defining a new variable.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:836
SDValue Base = LD->getBasePtr();
- if (Base.getOpcode() != PPCISD::ADD_TLS)
- return false;
- SDValue Offset = LD->getOffset();
- if (!Offset.isUndef())
- return false;
- if (Base.getOperand(1).getOpcode() == PPCISD::TLS_LOCAL_EXEC_MAT_ADDR)
+ if (!canOptimizeTLSDFormToXForm(CurDAG, Base))
return false;
----------------
Since `Base` only used here, can inline and remove declaration.
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