[llvm] [BOLT] Implement bolt-align (PR #210634)

Ilija Tovilo via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 04:01:05 PDT 2026


iluuu1994 wrote:

@kocsismate (who maintains php-src's benchmark tool) graciously adjusted our tooling and ran some tests. The results are promising. All of the benchmarks below are from commits that showed significant performance improvements or regressions when none were expected. `bolt-align` managed to reduce all noise (>0.5%) considerably (<0.1%). For highly optimized programs like interpreters, where optimizations will rarely reach the 0.5% threshold, this can make the benchmark go from completely useless to fairly useful.

---

[Patch](https://github.com/php/php-src/compare/61c83f8af5..00c0a9ba30)

<table>
  <thead>
    <tr>
       <td>Original</td>
       <td>bolt-align</td>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><img src="https://github.com/user-attachments/assets/9fb10b83-03fa-4e5d-a8e2-634d7410ce2c" /></td>
      <td><img src="https://github.com/user-attachments/assets/9c0a7aba-e6f7-4b73-994c-3e7125887c8d" /></td>
   </tr> 
  </tbody>
</table>

---

[Patch](https://github.com/php/php-src/compare/f93b170..ed88724)

This test also included a test run with `bolt` with a separate profile for each benchmark. This was originally suggested as a potential mitigation. `bolt` did not manage to remove noise from the benchmark.

<table>
  <thead>
    <tr>
       <td>Original</td>
       <td>bolt-align</td>
       <td>bolt</td>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><img src="https://github.com/user-attachments/assets/a97cc677-b607-4e65-8fc0-9c26dbc78b83" /></td>
      <td><img src="https://github.com/user-attachments/assets/39ff8530-f8ae-4d0d-b7ab-74a7f07923cb" /></td>
      <td><img src="https://github.com/user-attachments/assets/892b5f2e-f166-4cf8-bfc9-5a790fd7f589" /></td>
   </tr> 
  </tbody>
</table>

---

[Patch](https://github.com/php/php-src/compare/f93b170..ed88724)

The same patch as above for the testing of consistency.

<table>
  <thead>
    <tr>
       <td>Original</td>
       <td>bolt-align</td>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><img src="https://github.com/user-attachments/assets/829e8947-5dba-4b85-89f4-0db954830f53" /></td>
      <td><img src="https://github.com/user-attachments/assets/4e34e142-3ddf-47c0-b0ee-3ebc38296fbf" /></td>
   </tr> 
  </tbody>
</table>

---

[Patch](https://github.com/php/php-src/compare/8c4f806..4c9bbaa)

<table>
  <thead>
    <tr>
       <td>Original</td>
       <td>bolt-align</td>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><img src="https://github.com/user-attachments/assets/6908b062-c4f7-4853-93a1-d299828de493" /></td>
      <td><img src="https://github.com/user-attachments/assets/83139492-5808-4e47-bd99-216b0907ae84" /></td>
   </tr> 
  </tbody>
</table>

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


More information about the llvm-commits mailing list