smithp35 wrote:

My understanding is that this will make all calls to global functions into long 
calls. 

In AArch64 static linkes are required to insert range extension thunks for out 
of range BLs. In the best case this is just another direct branch, at worst 
case for `--pic-veneer` this is just `adrp, add, br`. I would expect that 
on-demand linker inserted thunks would outperform making all calls long for the 
majority of programs. I'm interested in any data that shows that long calls 
works better, and whether that could feed back into the lld thunk generation 
code. For example are the thunks too far away from the caller which causes page 
faults etc.

I note that with `-ffunction-sections` and certain linker options calls to 
static functions can go out of range too. These would get handled by linker 
thunks though.

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

Reply via email to