llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.31k stars 11.69k forks source link

[CodeGen] refactor getDwarfRegNum() #96129

Open chenzheng1030 opened 3 months ago

chenzheng1030 commented 3 months ago

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

The DwarfRegAlias may not be needed if we implement the getDwarfRegNum() by sharing the DWARF reg numbers among sub/supper registers.

llvmbot commented 3 months ago

@llvm/issue-subscribers-debuginfo

Author: Chen Zheng (chenzheng1030)

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.