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

    <tr>
        <th>Summary</th>
        <td>
            How to export basic block symbols in LLVM 14 and later versions?
        </td>
    </tr>

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

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

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

<pre>
    ---

### Issue Title:
**How to export basic block symbols in LLVM 14 and later versions? Is there a feature like `-gsplit-dwarf` for this?**

### Issue Content:

Hello LLVM Team,

I am an undergraduate student and now working on a project that requires exporting basic block symbol information from the program for later perf use. In earlier versions of LLVM, I saw solutions like customing patches to achieve this. With the introduction of the `-gsplit-dwarf` option in LLVM 14, I would like to know if there is now a built-in way to export basic block symbols.

I have the following questions and would greatly appreciate any guidance:

1. **Does LLVM 14 or later support exporting basic block symbols through command-line options?**
   - In earlier versions, I had to modify the source code to insert these symbols. Is there now a standard option (such as `-gsplit-dwarf`) to directly generate basic block symbols?

2. **If such a feature is not directly supported, is there an alternative method to export basic block symbols without modifying the source code?**

3. **Are there any detailed documentation or example codes?**

Thank you for your assistance, and I look forward to your response!

---

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyklE-P4zYPxj-NcyESxHL-HnyYd_YNNsD2NuieGYm21ciiV6LGm29fyM5k2ulgeyggIEAkk3x-D0mM0baeqC62_yu2XxaYpONQ_z9Y_R19W1bbw-LC5lYvl8ti_ZSPquYD5xgTwYsVR0U1X-XzlUcQBvo5cBC4YLQaLo71FeKtv7CLYD18-_b7b1BuAL0Bh0IBXilEyz4W1QnOEaSjQIDQEEoKBM5eCYrdetnGwVlZmhFDU-zW0HAA6Wz-bs7_eZnP7IW83AtdP30l53gu44WwL9Tz_P8ZsAf0kLyh0AY0CYUgSjLkZSrX8wgjh6v1LbAHhCHwH6QFpEOBQD-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