[llvm] [Xtensa] Implement THREADPTR and DFPAccel Xtensa Options. (PR #145543)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 24 18:02:43 PDT 2025
================
@@ -919,6 +920,52 @@ SDValue XtensaTargetLowering::LowerGlobalAddress(SDValue Op,
return Res;
}
+SDValue XtensaTargetLowering::LowerGlobalTLSAddress(SDValue Op,
+ SelectionDAG &DAG) const {
+ const GlobalAddressSDNode *G = cast<GlobalAddressSDNode>(Op);
+ SDLoc DL(Op);
+ auto PtrVT = Op.getValueType();
+ const GlobalValue *GV = G->getGlobal();
+
+ if (DAG.getTarget().useEmulatedTLS())
+ return LowerToTLSEmulatedModel(G, DAG);
+
+ TLSModel::Model model = getTargetMachine().getTLSModel(GV);
+
+ if (!Subtarget.hasTHREADPTR()) {
+ report_fatal_error("only emulated TLS supported");
----------------
arsenm wrote:
Avoid using report_fatal_error, in this case you can use DiagnosticInfoUnsupported and return poison
https://github.com/llvm/llvm-project/pull/145543
More information about the llvm-commits
mailing list