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

    <tr>
        <th>Summary</th>
        <td>
            LLVM PGO profile portability between operating systems
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    Hi! The `rustc` project uses LLVM PGO extensively in CI to improve the performance on LLVM on Linux targets. We're currently trying to extend the usage of PGO also to OS X and Windows, but because of CI usage limitations, we cannot effectively run PGO instrumantation on CI.

What we're trying to do instead is to take a PGO profile file (created by executing instrumented LLVM and then merged with  `llvm-profdata`) from a Linux system and then using this profile to optimize LLVM built on a Windows system.

I wanted to ask whether something like this is supported at all. The corresponding versions of LLVM on Linux and Windows are the same (`14.0.2`), but I'm not sure how much are the profiles portable between different operating systems. So far when we have tried to apply the profiles, the build has worked, but we haven't seen any speedup, which is a bit suspicious (of course Linux and Windows will exercise different code paths, but if the target CPU architecture stays the same, we would expect that PGO would work - on Linux it gives ~15% speedup).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxlVMuO3DgM_Br3hRjDbben0wcfspPNZpAsEiC7mVxpiW5rR5YMPcbT-fql5H4kCGD4JbFYLBbVW3nqPqii3sI_I0FxX7nog-AnzM7-RyJA9OTh06dvf8OXvz4DvQYyXr2QPoEy8PAIwYKaePMLQWCImdxg3YRGEFizBqanMvEVArojBV_CExX13hGI6ByZwGDBnZQ5JrScQmaw6PHIMENOjdrbtP75K3wH5B1Pyki7-KJ-gD4G6Ekgk03bmdYaqtWkAgZlTd62cEY0xgagYeDi1jpcNDmBMj64yNTXiET74bEsqndF9Xa9P40YGGTlfmMsbY4llKB8-hHwmQAzKCszKE2Qb0X9RjjCQBL6ExdKIoaEcc7MSvBKlgxXBQxMxJJJWFQY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