<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/65010>65010</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Document building Clang with BOLT
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          zamazan4ik
      </td>
    </tr>
</table>

<pre>
    There is a great [article](https://llvm.org/docs/HowToBuildWithPGO.html) in the official LLVM documentation "How to build Clang and LLVM with Profile-Guided Optimization".

I suggest adding an additional article (or extending the existing one) with information on how to build Clang and LLVM with LLVM Bolt. Clang already supports building with BOLT with [CMake scripts](https://github.com/llvm/llvm-project/blob/main/clang/cmake/caches/BOLT-PGO.cmake).

We need to add the following information to the documentation:
* What benefits are expected from BOLT for Clang? Some benchmark numbers would be great (as it's already done for Clang and PGO). These numbers can be found [here](https://llvm.org/devmtg/2022-11/slides/Lightning15-OptimizingClangWithBOLTUsingCMake.pdf).
* How to build Clang with BOLT. A step-by-step guide would be nice to see since it allows users/maintainers to apply BOLT to Clang more easily.

Having this information in the official documentation improves the visibility of the additional way to improve Clang performance with LLVM-native optimization tooling.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVF1vozoQ_TXOyyiIOKGFBx6ardJeqatWur23zwMeYG6NjWyTbPrrrwz0I6uVVvsSOzAfZ86ZA3rPrSEqRbYX2e0Kx9BZV75hj29odvy6qqw6l88dOQL2gNA6wgAi26MLXGsS2a2QeRfC4MX2RsiDkAetj31iXSvkQdnaC3m4t6dnux9ZqxcO3dPdY9KFXgtZABsIHYFtGq4ZNTw8_PsdlK3HnkzAwNaAkPLeniBYqGIF-KbRtIBGzcEnDh08OduwpvXdyIoUPA6Be36b8oWUiUhvRXoz__4Ffmxb8gFQKZ4qTbcYixqWuUDI3DqgH4HMFBVR0g_2If6xhiL4qTWbxrp-hmo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