File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,12 @@ class Register {
4242 // /
4343 // / FIXME: remove in favor of member.
4444 static constexpr bool isStackSlot (unsigned Reg) {
45- return MCRegister::isStackSlot (Reg);
45+ return MCRegister::FirstStackSlot <= Reg &&
46+ Reg < MCRegister::VirtualRegFlag;
4647 }
4748
4849 // / Return true if this is a stack slot.
49- constexpr bool isStack () const { return MCRegister:: isStackSlot (Reg); }
50+ constexpr bool isStack () const { return isStackSlot (Reg); }
5051
5152 // / Compute the frame index from a register value representing a stack slot.
5253 static int stackSlot2Index (Register Reg) {
Original file line number Diff line number Diff line change @@ -54,14 +54,6 @@ class MCRegister {
5454 static constexpr unsigned FirstStackSlot = 1u << 30 ;
5555 static constexpr unsigned VirtualRegFlag = 1u << 31 ;
5656
57- // / This is the portion of the positive number space that is not a physical
58- // / register. StackSlot values do not exist in the MC layer, see
59- // / Register::isStackSlot() for the more information on them.
60- // /
61- static constexpr bool isStackSlot (unsigned Reg) {
62- return FirstStackSlot <= Reg && Reg < VirtualRegFlag;
63- }
64-
6557 // / Return true if the specified register number is in
6658 // / the physical register namespace.
6759 static constexpr bool isPhysicalRegister (unsigned Reg) {
You can’t perform that action at this time.
0 commit comments