[lld] [ELF, RISCV] Fix oscillation due to call relaxation (PR #142899)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 27 00:10:05 PDT 2025
MaskRay wrote:
> Hi Fangrui, the `4` in `pass < 4 ? 6 : cur - delta` works as a threshold, right? If pass less than 4, everything just happens as before, otherwise you start to restrict the relaxation process of call. If so, just curious that why is that "4", would it be too conservative?
I have a comment in the description:
```
(For the Android bit reproduce, pass < 2 leads to non-optimal layout
while pass < 3 and pass < 4 output is identical.)
```
The number could be made larger at the expense of spending more time to converge for such pessimistic cases. The marginal size benefit seems negligible.
https://github.com/llvm/llvm-project/pull/142899
More information about the llvm-commits
mailing list