[llvm-branch-commits] [lld] [lld][LoongArch] Convert TLS IE to LE in the normal or medium code model (PR #123680)
Zhaoxin Yang via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Mar 20 02:13:29 PDT 2025
================
@@ -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
More information about the llvm-branch-commits
mailing list