[all-commits] [llvm/llvm-project] 327578: [lld][LoongArch] Prevent relaxation oscillation fo...
hev via All-commits
all-commits at lists.llvm.org
Fri Oct 2 07:32:16 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 32757891963d7a544dbcf6a52e8f7a7c67e273aa
https://github.com/llvm/llvm-project/commit/32757891963d7a544dbcf6a52e8f7a7c67e273aa
Author: hev <wangrui at loongson.cn>
Date: 2026-10-02 (Fri, 02 Oct 2026)
Changed paths:
M lld/ELF/Arch/LoongArch.cpp
A lld/test/ELF/loongarch-relax-call-stress.s
A lld/test/ELF/loongarch-relax-pcrel-stress.s
Log Message:
-----------
[lld][LoongArch] Prevent relaxation oscillation for LA.PCRel and CALL (#226713)
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.
Fixes #226712
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