Use a default alignment for data and bss sections.
[oota-llvm.git] / lib / CodeGen / StrongPHIElimination.cpp
index 82b75922fe54351bbe705339c044c86833544056..ca9952863b7c59bfb70d543a2684ab4066a3c149 100644 (file)
@@ -295,7 +295,7 @@ static bool isLiveIn(unsigned r, MachineBasicBlock* MBB,
                      LiveIntervals& LI) {
   LiveInterval& I = LI.getOrCreateInterval(r);
   unsigned idx = LI.getMBBStartIdx(MBB);
-  return I.liveBeforeAndAt(idx);
+  return I.liveAt(idx);
 }
 
 /// isLiveOut - help method that determines, from a regno, if a register is
@@ -653,7 +653,7 @@ void StrongPHIElimination::ScheduleCopies(MachineBasicBlock* MBB,
   std::map<unsigned, unsigned> map;
   
   // Setup worklist of initial copies
-  for (std::map<unsigned, unsigned>::iterator I = copy_set.begin(),
+  for (std::multimap<unsigned, unsigned>::iterator I = copy_set.begin(),
        E = copy_set.end(); I != E; ) {
     map.insert(std::make_pair(I->first, I->first));
     map.insert(std::make_pair(I->second, I->second));
@@ -827,7 +827,7 @@ void StrongPHIElimination::InsertCopies(MachineDomTreeNode* MDTN,
         // Add a live range for the new vreg
         LiveInterval& Int = LI.getInterval(I->getOperand(i).getReg());
         VNInfo* FirstVN = *Int.vni_begin();
-        FirstVN->hasPHIKill = false;
+        FirstVN->setHasPHIKill(false);
         if (I->getOperand(i).isKill())
           FirstVN->kills.push_back(
                          LiveIntervals::getUseIndex(LI.getInstructionIndex(I)));
@@ -886,10 +886,7 @@ bool StrongPHIElimination::mergeLiveIntervals(unsigned primary,
     VNInfo* OldVN = R.valno;
     VNInfo*& NewVN = VNMap[OldVN];
     if (!NewVN) {
-      NewVN = LHS.getNextValue(OldVN->def,
-                               OldVN->copy,
-                               LI.getVNInfoAllocator());
-      NewVN->kills = OldVN->kills;
+      NewVN = LHS.createValueCopy(OldVN, LI.getVNInfoAllocator());
     }
     
     LiveRange LR (R.start, R.end, NewVN);
@@ -987,7 +984,7 @@ bool StrongPHIElimination::runOnMachineFunction(MachineFunction &Fn) {
       LiveInterval& Int = LI.getOrCreateInterval(I->first);
       const LiveRange* LR =
                        Int.getLiveRangeContaining(LI.getMBBEndIdx(SI->second));
-      LR->valno->hasPHIKill = true;
+      LR->valno->setHasPHIKill(true);
       
       I->second.erase(SI->first);
     }
@@ -1027,7 +1024,7 @@ bool StrongPHIElimination::runOnMachineFunction(MachineFunction &Fn) {
         if (MBB != PInstr->getParent() &&
             InputI.liveAt(LI.getMBBStartIdx(PInstr->getParent())) &&
             InputI.expiredAt(LI.getInstructionIndex(PInstr) + 
-                             LiveIntervals::InstrSlots::NUM))
+                             LiveInterval::InstrSlots::NUM))
           InputI.removeRange(LI.getMBBStartIdx(PInstr->getParent()),
                              LI.getInstructionIndex(PInstr),
                              true);
@@ -1037,7 +1034,7 @@ bool StrongPHIElimination::runOnMachineFunction(MachineFunction &Fn) {
       // now has an unknown def.
       unsigned idx = LI.getDefIndex(LI.getInstructionIndex(PInstr));
       const LiveRange* PLR = PI.getLiveRangeContaining(idx);
-      PLR->valno->def = ~0U;
+      PLR->valno->setIsPHIDef(true);
       LiveRange R (LI.getMBBStartIdx(PInstr->getParent()),
                    PLR->start, PLR->valno);
       PI.addRange(R);