remove hack
[oota-llvm.git] / lib / CodeGen / RegAllocLocal.cpp
index 5aa04c6cc789c743fd10eaa7a1a3ea0eee8bba36..7288f067f6b21d6d08312782e1da0672440360ed 100644 (file)
@@ -270,7 +270,7 @@ void RA::spillVirtReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
     const TargetRegisterClass *RC = MF->getSSARegMap()->getRegClass(VirtReg);
     int FrameIndex = getStackSpaceFor(VirtReg, RC);
     DEBUG(std::cerr << " to stack slot #" << FrameIndex);
-    RegInfo->storeRegToStackSlot(MBB, I, PhysReg, FrameIndex);
+    RegInfo->storeRegToStackSlot(MBB, I, PhysReg, FrameIndex, RC);
     ++NumStores;   // Update statistics
   }
 
@@ -476,7 +476,7 @@ MachineInstr *RA::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI,
                   << RegInfo->getName(PhysReg) << "\n");
 
   // Add move instruction(s)
-  RegInfo->loadRegFromStackSlot(MBB, MI, PhysReg, FrameIndex);
+  RegInfo->loadRegFromStackSlot(MBB, MI, PhysReg, FrameIndex, RC);
   ++NumLoads;    // Update statistics
 
   PhysRegsEverUsed[PhysReg] = true;
@@ -525,7 +525,7 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) {
     //
     for (LiveVariables::killed_iterator KI = LV->killed_begin(MI),
            KE = LV->killed_end(MI); KI != KE; ++KI) {
-      unsigned VirtReg = KI->second;
+      unsigned VirtReg = *KI;
       unsigned PhysReg = VirtReg;
       if (MRegisterInfo::isVirtualRegister(VirtReg)) {
         // If the virtual register was never materialized into a register, it
@@ -605,7 +605,7 @@ void RA::AllocateBasicBlock(MachineBasicBlock &MBB) {
     //
     for (LiveVariables::killed_iterator KI = LV->dead_begin(MI),
            KE = LV->dead_end(MI); KI != KE; ++KI) {
-      unsigned VirtReg = KI->second;
+      unsigned VirtReg = *KI;
       unsigned PhysReg = VirtReg;
       if (MRegisterInfo::isVirtualRegister(VirtReg)) {
         unsigned &PhysRegSlot = getVirt2PhysRegMapSlot(VirtReg);