mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
CodeGen: Introduce a class for registers
Avoids using a plain unsigned for registers throughoug codegen. Doesn't attempt to change every register use, just something a little more than the set needed to build after changing the return type of MachineOperand::getReg(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364191 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -70,12 +70,12 @@ STATISTIC(NumInserted, "Number of DBG_VALUE instructions inserted");
|
||||
|
||||
// If @MI is a DBG_VALUE with debug value described by a defined
|
||||
// register, returns the number of this register. In the other case, returns 0.
|
||||
static unsigned isDbgValueDescribedByReg(const MachineInstr &MI) {
|
||||
static Register isDbgValueDescribedByReg(const MachineInstr &MI) {
|
||||
assert(MI.isDebugValue() && "expected a DBG_VALUE");
|
||||
assert(MI.getNumOperands() == 4 && "malformed DBG_VALUE");
|
||||
// If location of variable is described using a register (directly
|
||||
// or indirectly), this register is always a first operand.
|
||||
return MI.getOperand(0).isReg() ? MI.getOperand(0).getReg() : 0;
|
||||
return MI.getOperand(0).isReg() ? MI.getOperand(0).getReg() : Register();
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
Reference in New Issue
Block a user