[llvm] [BOLT][AArch64] Add indirect call promotion support (PR #184733)

Haibo Jiang via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 29 23:44:50 PDT 2026


Jianghibo wrote:

> @Jianghibo hello, may I ask you to verify functionality on the following test
> 
> ```
> #include <stdio.h>
> 
> void hello() {
>     printf("hello....\n");
> }
> 
> void execute(void (*callback)()) {
>     callback();
> }
> 
> int main() {
>     execute(hello);
> 
>     return 0;
> }
> ```
> 
> clang -pie -O0 /tmp/icp.c -o /tmp/icp.exe -Wl,-q
> 
> what I am waiting from icp=calls optimization that inside execute function will be promotion for hello function based on fdata

@yavtuk  Checked was performed using the following command, confirming that indirect call promotion can be applied.
```
clang -pie -O0 icp.c -o icp.exe -Wl,-q
llvm-bolt icp.exe -instrument -o icp.instr.exe -instrumentation-file=icp.fdata
./icp.instr.exe
llvm-bolt icp.exe -o test.exe.opt -data=icp.fdata --icp=calls -debug-only=ICP -icp-top-callsites=100 --assume-abi
```
<img width="516" height="207" alt="image" src="https://github.com/user-attachments/assets/78bada34-010b-45d8-8269-6e7243007743" />



https://github.com/llvm/llvm-project/pull/184733


More information about the llvm-commits mailing list