[all-commits] [llvm/llvm-project] a2dd33: [lld][LoongArch] Prevent relaxation oscillation fo...
hev via All-commits
all-commits at lists.llvm.org
Mon Sep 28 01:18:32 PDT 2026
Branch: refs/heads/users/hev/issue-226712
Home: https://github.com/llvm/llvm-project
Commit: a2dd33abf127ce2693b2eb22d72af836e64bc007
https://github.com/llvm/llvm-project/commit/a2dd33abf127ce2693b2eb22d72af836e64bc007
Author: WANG Rui <wangrui at loongson.cn>
Date: 2026-09-28 (Mon, 28 Sep 2026)
Changed paths:
M lld/ELF/Arch/LoongArch.cpp
A lld/test/ELF/loongarch-relax-call-stress.s
Log Message:
-----------
[lld][LoongArch] Prevent relaxation oscillation for LA.PCRel and CALL
Relaxation of pcalau12i+addi (relaxPCHi20Lo12, isInt<22>) and
call36/call30 (relaxMediumCall, isInt<28>) can oscillate: shrinking
one section moves a symbol, which flips isInt<N> for other sites and
changes bytesDropped again.
Follow the same approach as RISCV::relaxCall: after a few passes, do
not allow remove to increase beyond the previous pass's value
(cur - delta). Pass that cap as prevRemove into the two helpers;
range checks may still clear remove (0) when the target goes out of
range.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list