summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineRegisterInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/MachineRegisterInfo.cpp')
-rw-r--r--lib/CodeGen/MachineRegisterInfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineRegisterInfo.cpp b/lib/CodeGen/MachineRegisterInfo.cpp
index 7f2c0caca4..ce7d567cc2 100644
--- a/lib/CodeGen/MachineRegisterInfo.cpp
+++ b/lib/CodeGen/MachineRegisterInfo.cpp
@@ -20,7 +20,7 @@
using namespace llvm;
MachineRegisterInfo::MachineRegisterInfo(const TargetMachine &TM)
- : TM(TM), IsSSA(true), TracksLiveness(true) {
+ : TM(TM), TheDelegate(0), IsSSA(true), TracksLiveness(true) {
VRegInfo.reserve(256);
RegAllocHints.reserve(256);
UsedRegUnits.resize(getTargetRegisterInfo()->getNumRegUnits());
@@ -108,6 +108,8 @@ MachineRegisterInfo::createVirtualRegister(const TargetRegisterClass *RegClass){
VRegInfo.grow(Reg);
VRegInfo[Reg].first = RegClass;
RegAllocHints.grow(Reg);
+ if (TheDelegate)
+ TheDelegate->MRI_NoteNewVirtualRegister(Reg);
return Reg;
}