aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index 8e0a86e4a0..cb80729229 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -79,13 +79,12 @@ private:
// ConstantVal for a non-address immediate.
// Virtual register for an SSA operand,
// including hidden operands required for
- // the generated machine code.
-
- unsigned int regNum; // register number for an explicit register
-
+ // the generated machine code.
int64_t immedVal; // constant value for an explicit constant
};
+ unsigned int regNum; // register number for an explicit register
+ // will be set for a value after reg allocation
bool isDef; // is this a defition for the value
// made public for faster access
@@ -141,6 +140,13 @@ private:
public:
+ // replaces the Value with its corresponding physical register afeter
+ // register allocation is complete
+ void setRegForValue(unsigned reg) {
+ assert(opType == MO_VirtualRegister || opType == MO_CCRegister);
+ regNum = reg;
+ }
+
};