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

    <tr>
        <th>Summary</th>
        <td>
            Should `naked` imply `no_profile_instrument_func`?
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          serge-sans-paille
      </td>
    </tr>
</table>

<pre>
    functions marked as `naked` can only contain assembly code, and are in charge of handling the function prologues and epilogues. Under `-mllvm -pgo-temporal-instrumentation`, the compiler adds a call to `@llvm.instrprof.timestamp`, which can mess up with the assembly code in the function body.

What should we do then? Disable profiling of naked functions? Emit a warning / an error when enabling pgo temporal instrumentation ? Insert code while saving registers etc so that the call to the profiling function doesn't have any side effect?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxckk-PozgQxT-NuZSIwBCSHDj0bi_SnlerObYKXGBPGxu5TKN8-5Gd_jM9lwRM1at6Pz9kNosj6sX5L3F-LnCP2oeeKSxUMjouNzTWUjF6de_n3U3ReMewYnglBcggusrhKynRVTChA-_sHSbvIhoHyEzrmA8UCfk3oFOAgcA4mDSGhcDPoNEpa9wCURN8zIAteOuXnTg30WYebyf43ykKaW65Wvu2Qrktvoy0bj6gLY3jGPaVXMQkI7oqzU3Kk183YykAKsWAMKG1EH1SEm2VpE65eQt-PkWzEkdct3eBQ5tJZ4MrMcO-wWGizrrfTCZn32wkcCdRPYvq6fH7Q2ME1n63Cg4C5VO9E80Az4ZxtJSczyYD8TNkuJ9ynOr-WU0EhAODS0VCDoAOKAQf4NDkgByOuX9bPHyQgT_IQJL61zGF-Nj80MYSML6lzkCL4UiBgeIEnJbE-MD4ji09f2366Vd5YifkJYLGNwJ0d2CjCGieaYqiGQrVN-rW3LCgvr5U9fXc1LItdH_r6HKt2_Nckxxr2bYttbemUd0o27kjLEwvK9nUsuqq6_kqb6dZdaqeLtM8Xq5IJEVb0YrGnvJl-rAUhnmn_tKeL01hcSTLOelSOjogfxRSpuCHPvWU475wCoPhyF8q0URL_X-PO_s98Gbd7D2f-JcHC3r5wvySoKT8NEOxB9vrGDcWzZOQg5DDYqLex9PkVyGHNOr9r9yC_5lQySEvyEIO2cCvAAAA__9EfkHI">