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

    <tr>
        <th>Summary</th>
        <td>
            Does LLVM ORCJIT have a profiling ability to obtain runtime information of the program?
        </td>
    </tr>

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

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

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

<pre>
    From what I know about ORCJIT, it seems that it does not implement tiered compilation similar to JVM. Through a set of hierarchical compilation hotspots mechanisms, the hotspots is optimized by obtaining runtime profile information.

ORCJIT's just-in-time strategy: 
1. Bind each bitecode to `JITDylib` as a Module; 
2.  Trigger compilation through the `lookup()` function; 
3.  Compile all functions under the module . And analyze the dependency of the function, and compile the dependent function; 
4. Link the object file through `JITlink`, then put the executable code into the codecache, and record its address.

Whenever you need to use this function in the future, you can directly get its executable code by looking up the symbol of the function.

For ORCJIT, we seem to have no way to optimize and control the executable at runtime. For example, when the code is executed, we can accurately control a certain execution instruction and then modify it or modify the information of a certain register midway. For ORCJIT, is the maximum granularity that developers can control is the function level when it is running?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsVEtv4zgM_jXKhajhyI2nOfjQxwaYosUCi2L2LFuMzaksGRLV1PPrF5Kd9IG9JJBJfvz48aFCoN4iNmJ3J3YPGxV5cL55Gbz3iIib1um5OXg3wmlQDD_h1boTqNZFhr__uX_8-SLkPRBDQBwDcHIiBu0wgHUMNE4GR7QMTOhRQ-fGiYxichYCjWSUB3bw-Ou5gJfBu9gPoCAggzvCQOiV7wbqlPkSOTgOk-MAI3aDshTGkHjwgB8mCuAmppH-oIZ2BteyIku2Bx8t04gweXckg0D26PyYkQtRPojydvk9F_gjwO8Y-IrsVY4L7BVjP4vqFhbPbQF3ZDWg6gZoibFzGlNdoi4ff748zIZaUZegAih4djoaFNX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