<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/96129>96129</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[CodeGen] refactor getDwarfRegNum()
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
chenzheng1030
</td>
</tr>
</table>
<pre>
This is from code review of https://github.com/llvm/llvm-project/pull/95837#discussion_r1643647221
We should use the `getDwarfRegNum()` defined in `MCRegisterInfo.h` instead of defining a new one in [llvm/lib/CodeGen/StackMaps.cpp](https://github.com/llvm/llvm-project/pull/95837/files/35667789a4ca64173b0240a37a8e85c1a426c2e9#diff-2634df2e1fb79253f14db36043207f9ef3d719222e63e0508ea67b3caf9d9064)
The DwarfRegAlias may not be needed if we implement the `getDwarfRegNum()` by sharing the DWARF reg numbers among sub/supper registers.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykk0FvrTYQhX-N2Vi5MmOwYcHiJldUXaSLNFKW1YDH4BYMsk2i9NdXJrrqWzzp6eltYDEHdOY7ZzBGN3mijtWPrL4VeKR5C904k_93Jj-VQopi2Mxn9zq7yF3kNmwrHzdDPNC7ow--WT6ntEcmrwx6Bv3k0nwMl3FbGfTL8n5_Pexh-5vGxKDfj2Vh0Ld1IzUDaVwcjxjd5v8KpaqkqjRAycSNievX8414nLdjMfyIxNNMnCkxUbp9YLAvNP1xrAwaBi1TghuyzpPhzmfV89MLTS4mCr97u13mrHA-JkKTvZ9i5yeO3OdtPJ3f1Y93525g0D9thn4jz6D_M-H4zzPu8TLuO6tvDJpfXL-3bqHIoJe1Ulo3LVYjqqrUchBQCZQaG2rqscQK1AjUnsSsfQAlK2OBSjvoFmppy8oMUolKgtC2JSuNLlsAICVJ1KIhVHqQI9rWtEJVGdc3jF9n4nee18Vh5Ct-cr8lPhD3RCYjtfyDuFv3hVby6UdJDJ88zhgy3qy8vV1feh5o4v5YBwqR47r5iccjM47HvlPI4zOteClMJ00rWyyoK3XZNJWSUhdzVyO1ZV0NaBpdjUOjrTVgsR71YFQLWLgOMjoFQpRlU-uLwlILoxBxJGuUZZWgFd1yyclctjAVLsaDulaV0BYLDrTE8yYAcivOIQPIJxK6M83hmCKrxOJiiv__Jbm0nMd0L0x944EsjmkL_HuUiiMs3U8X6PSTK_Pl972D_wIAAP__IM0xpQ">