================
@@ -1375,14 +1375,20 @@ unsigned RelocationScanner::handleTlsRelocation(RelExpr 
expr, RelType type,
     return 1;
   }
 
+  // LoongArch support IE to LE optimization in non-extreme code model.
+  bool execOptimizeInLoongArch =
+      ctx.arg.emachine == EM_LOONGARCH &&
+      (type == R_LARCH_TLS_IE_PC_HI20 || type == R_LARCH_TLS_IE_PC_LO12);
----------------
ylzsx wrote:

At this point, I cannot determine whether current execution is in extreme or 
medium code mode, since I cannot obtain the next relocation record. So, as a 
workaround, I have chosen to convert the relocation type in both modes and then 
restore it(extreme code mode) or relax it(medium code mode) later in 
relocateAlloc.

https://github.com/llvm/llvm-project/pull/123680
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to