[llvm-commits] CVS: llvm/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp LiveRange.h LiveRangeInfo.cpp LiveRangeInfo.h PhyRegAlloc.cpp PhyRegAlloc.h RegClass.cpp RegClass.h

Jeff Cohen jeffc at jolt-lang.org
Tue Jul 26 22:54:01 PDT 2005



Changes in directory llvm/lib/Target/SparcV9/RegAlloc:

InterferenceGraph.cpp updated: 1.24 -> 1.25
LiveRange.h updated: 1.31 -> 1.32
LiveRangeInfo.cpp updated: 1.60 -> 1.61
LiveRangeInfo.h updated: 1.28 -> 1.29
PhyRegAlloc.cpp updated: 1.169 -> 1.170
PhyRegAlloc.h updated: 1.71 -> 1.72
RegClass.cpp updated: 1.33 -> 1.34
RegClass.h updated: 1.25 -> 1.26
---
Log message:

Eliminate tabs and trailing spaces.

---
Diffs of the changes:  (+131 -131)

 InterferenceGraph.cpp |    8 +--
 LiveRange.h           |    2 
 LiveRangeInfo.cpp     |   96 ++++++++++++++++++++--------------------
 LiveRangeInfo.h       |    4 -
 PhyRegAlloc.cpp       |  118 +++++++++++++++++++++++++-------------------------
 PhyRegAlloc.h         |    8 +--
 RegClass.cpp          |   16 +++---
 RegClass.h            |   10 ++--
 8 files changed, 131 insertions(+), 131 deletions(-)


Index: llvm/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp
diff -u llvm/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp:1.24 llvm/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp:1.25
--- llvm/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp:1.24	Sun Jun 12 18:52:58 2005
+++ llvm/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp	Wed Jul 27 00:53:44 2005
@@ -68,7 +68,7 @@
     // init IG matrix
     for(unsigned int i=0; i < Size; i++)
       for(unsigned int j=0; j < Size; j++)
-	IG[i][j] = 0;
+        IG[i][j] = 0;
 }
 
 //-----------------------------------------------------------------------------
@@ -88,7 +88,7 @@
 // that there is some wrong logic in some other method.
 //-----------------------------------------------------------------------------
 void InterferenceGraph::setInterference(const V9LiveRange *const LR1,
-					const V9LiveRange *const LR2 ) {
+                                        const V9LiveRange *const LR2 ) {
   assert(LR1 != LR2);
 
   IGNode *IGNode1 = LR1->getUserIGNode();
@@ -147,7 +147,7 @@
 //----------------------------------------------------------------------------
 
 void InterferenceGraph::mergeIGNodesOfLRs(const V9LiveRange *LR1,
-					                            V9LiveRange *LR2) {
+                                                                    V9LiveRange *LR2) {
 
   assert( LR1 != LR2);                  // cannot merge the same live range
 
@@ -226,7 +226,7 @@
       std::cerr << " [" << i << "] ";
 
       for( unsigned int j=0; j < Size; j++)
-	if(IG[i][j])
+        if(IG[i][j])
           std::cerr << "(" << i << "," << j << ") ";
       std::cerr << "\n";
     }


Index: llvm/lib/Target/SparcV9/RegAlloc/LiveRange.h
diff -u llvm/lib/Target/SparcV9/RegAlloc/LiveRange.h:1.31 llvm/lib/Target/SparcV9/RegAlloc/LiveRange.h:1.32
--- llvm/lib/Target/SparcV9/RegAlloc/LiveRange.h:1.31	Sun Jun 12 18:52:58 2005
+++ llvm/lib/Target/SparcV9/RegAlloc/LiveRange.h	Wed Jul 27 00:53:44 2005
@@ -184,7 +184,7 @@
   }
 };
 
-static inline std::ostream &operator << (std::ostream &os, 
+static inline std::ostream &operator << (std::ostream &os,
                                          const V9LiveRange &lr) {
   os << "LiveRange@" << (void *)(&lr);
   return os;


Index: llvm/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp
diff -u llvm/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp:1.60 llvm/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp:1.61
--- llvm/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp:1.60	Sun Jun 12 18:52:58 2005
+++ llvm/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp	Wed Jul 27 00:53:44 2005
@@ -30,7 +30,7 @@
 unsigned V9LiveRange::getRegClassID() const { return getRegClass()->getID(); }
 
 LiveRangeInfo::LiveRangeInfo(const Function *F, const TargetMachine &tm,
-			     std::vector<RegClass *> &RCL)
+                             std::vector<RegClass *> &RCL)
   : Meth(F), TM(tm), RegClassList(RCL), MRI(*tm.getRegInfo()) { }
 
 
@@ -177,15 +177,15 @@
       // CallRetInstrList for processing its args, ret value, and ret addr.
       //
       if(TM.getInstrInfo()->isReturn(MInst->getOpcode()) ||
-	 TM.getInstrInfo()->isCall(MInst->getOpcode()))
-	CallRetInstrList.push_back(MInst);
+         TM.getInstrInfo()->isCall(MInst->getOpcode()))
+        CallRetInstrList.push_back(MInst);
 
       // iterate over explicit MI operands and create a new LR
       // for each operand that is defined by the instruction
       for (MachineInstr::val_op_iterator OpI = MInst->begin(),
              OpE = MInst->end(); OpI != OpE; ++OpI)
-	if (OpI.isDef()) {
-	  const Value *Def = *OpI;
+        if (OpI.isDef()) {
+          const Value *Def = *OpI;
           bool isCC = (OpI.getMachineOperand().getType()
                        == MachineOperand::MO_CCRegister);
           V9LiveRange* LR = createOrAddToLiveRange(Def, isCC);
@@ -197,13 +197,13 @@
             LR->setColor(MRI.getClassRegNum(OpI.getMachineOperand().getReg(),
                                             getClassId));
           }
-	}
+        }
 
       // iterate over implicit MI operands and create a new LR
       // for each operand that is defined by the instruction
       for (unsigned i = 0; i < MInst->getNumImplicitRefs(); ++i)
-	if (MInst->getImplicitOp(i).isDef()) {
-	  const Value *Def = MInst->getImplicitRef(i);
+        if (MInst->getImplicitOp(i).isDef()) {
+          const Value *Def = MInst->getImplicitRef(i);
           V9LiveRange* LR = createOrAddToLiveRange(Def, /*isCC*/ false);
 
           // If the implicit operand has a pre-assigned register,
@@ -214,7 +214,7 @@
                                 MInst->getImplicitOp(i).getReg(),
                                 getClassId));
           }
-	}
+        }
 
     } // for all machine instructions in the BB
   } // for all BBs in function
@@ -265,10 +265,10 @@
        for each definition (def) in inst
          for each operand (op) of inst that is a use
            if the def and op are of the same register type
-	     if the def and op do not interfere //i.e., not simultaneously live
-	       if (degree(LR of def) + degree(LR of op)) <= # avail regs
-	         if both LRs do not have suggested colors
-		    merge2IGNodes(def, op) // i.e., merge 2 LRs
+             if the def and op do not interfere //i.e., not simultaneously live
+               if (degree(LR of def) + degree(LR of op)) <= # avail regs
+                 if both LRs do not have suggested colors
+                    merge2IGNodes(def, op) // i.e., merge 2 LRs
 
 */
 //---------------------------------------------------------------------------
@@ -332,40 +332,40 @@
       const MachineInstr *MI = MII;
 
       if( DEBUG_RA >= RA_DEBUG_LiveRanges) {
-	std::cerr << " *Iterating over machine instr ";
-	MI->dump();
-	std::cerr << "\n";
+        std::cerr << " *Iterating over machine instr ";
+        MI->dump();
+        std::cerr << "\n";
       }
 
       // iterate over  MI operands to find defs
       for(MachineInstr::const_val_op_iterator DefI = MI->begin(),
             DefE = MI->end(); DefI != DefE; ++DefI) {
-	if (DefI.isDef()) { // this operand is modified
-	  V9LiveRange *LROfDef = getLiveRangeForValue( *DefI );
-	  RegClass *RCOfDef = LROfDef->getRegClass();
+        if (DefI.isDef()) { // this operand is modified
+          V9LiveRange *LROfDef = getLiveRangeForValue( *DefI );
+          RegClass *RCOfDef = LROfDef->getRegClass();
 
-	  MachineInstr::const_val_op_iterator UseI = MI->begin(),
+          MachineInstr::const_val_op_iterator UseI = MI->begin(),
             UseE = MI->end();
-	  for( ; UseI != UseE; ++UseI) { // for all uses
- 	    V9LiveRange *LROfUse = getLiveRangeForValue( *UseI );
-	    if (!LROfUse) {             // if LR of use is not found
-	      //don't warn about labels
-	      if (!isa<BasicBlock>(*UseI) && DEBUG_RA >= RA_DEBUG_LiveRanges)
-		std::cerr << " !! Warning: No LR for use " << RAV(*UseI)<< "\n";
-	      continue;                 // ignore and continue
-	    }
+          for( ; UseI != UseE; ++UseI) { // for all uses
+            V9LiveRange *LROfUse = getLiveRangeForValue( *UseI );
+            if (!LROfUse) {             // if LR of use is not found
+              //don't warn about labels
+              if (!isa<BasicBlock>(*UseI) && DEBUG_RA >= RA_DEBUG_LiveRanges)
+                std::cerr << " !! Warning: No LR for use " << RAV(*UseI)<< "\n";
+              continue;                 // ignore and continue
+            }
 
-	    if (LROfUse == LROfDef)     // nothing to merge if they are same
-	      continue;
+            if (LROfUse == LROfDef)     // nothing to merge if they are same
+              continue;
 
-	    if (MRI.getRegTypeForLR(LROfDef) ==
+            if (MRI.getRegTypeForLR(LROfDef) ==
                 MRI.getRegTypeForLR(LROfUse)) {
-	      // If the two RegTypes are the same
-	      if (!RCOfDef->getInterference(LROfDef, LROfUse) ) {
+              // If the two RegTypes are the same
+              if (!RCOfDef->getInterference(LROfDef, LROfUse) ) {
 
-		unsigned CombinedDegree =
-		  LROfDef->getUserIGNode()->getNumOfNeighbors() +
-		  LROfUse->getUserIGNode()->getNumOfNeighbors();
+                unsigned CombinedDegree =
+                  LROfDef->getUserIGNode()->getNumOfNeighbors() +
+                  LROfUse->getUserIGNode()->getNumOfNeighbors();
 
                 if (CombinedDegree > RCOfDef->getNumOfAvailRegs()) {
                   // get more precise estimate of combined degree
@@ -373,19 +373,19 @@
                     getCombinedDegree(LROfUse->getUserIGNode());
                 }
 
-		if (CombinedDegree <= RCOfDef->getNumOfAvailRegs()) {
-		  // if both LRs do not have different pre-assigned colors
-		  // and both LRs do not have suggested colors
+                if (CombinedDegree <= RCOfDef->getNumOfAvailRegs()) {
+                  // if both LRs do not have different pre-assigned colors
+                  // and both LRs do not have suggested colors
                   if (! InterfsPreventCoalescing(*LROfDef, *LROfUse)) {
-		    RCOfDef->mergeIGNodesOfLRs(LROfDef, LROfUse);
-		    unionAndUpdateLRs(LROfDef, LROfUse);
-		  }
-
-		} // if combined degree is less than # of regs
-	      } // if def and use do not interfere
-	    }// if reg classes are the same
-	  } // for all uses
-	} // if def
+                    RCOfDef->mergeIGNodesOfLRs(LROfDef, LROfUse);
+                    unionAndUpdateLRs(LROfDef, LROfUse);
+                  }
+
+                } // if combined degree is less than # of regs
+              } // if def and use do not interfere
+            }// if reg classes are the same
+          } // for all uses
+        } // if def
       } // for all defs
     } // for all machine instructions
   } // for all BBs


Index: llvm/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h
diff -u llvm/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h:1.28 llvm/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h:1.29
--- llvm/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h:1.28	Sun Jun 12 18:52:58 2005
+++ llvm/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h	Wed Jul 27 00:53:44 2005
@@ -78,8 +78,8 @@
 public:
 
   LiveRangeInfo(const Function *F,
-		const TargetMachine& tm,
-		std::vector<RegClass *> & RCList);
+                const TargetMachine& tm,
+                std::vector<RegClass *> & RCList);
 
 
   /// Destructor to destroy all LiveRanges in the V9LiveRange Map


Index: llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
diff -u llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp:1.169 llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp:1.170
--- llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp:1.169	Thu Jun 16 23:01:34 2005
+++ llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp	Wed Jul 27 00:53:44 2005
@@ -131,7 +131,7 @@
 /// instruction.
 ///
 void PhyRegAlloc::addInterference(const Value *Def, const ValueSet *LVSet,
-				  bool isCallInst) {
+                                  bool isCallInst) {
   ValueSet::const_iterator LIt = LVSet->begin();
 
   // get the live range of instruction
@@ -167,7 +167,7 @@
 /// the return value does not interfere with that call itself).
 ///
 void PhyRegAlloc::setCallInterferences(const MachineInstr *MInst,
-				       const ValueSet *LVSetAft) {
+                                       const ValueSet *LVSetAft) {
   if (DEBUG_RA >= RA_DEBUG_Interference)
     std::cerr << "\n For call inst: " << *MInst;
 
@@ -185,7 +185,7 @@
         std::cerr << "\n\tLR after Call: " << *LR << "\n";
       LR->setCallInterference();
       if (DEBUG_RA >= RA_DEBUG_Interference)
-	    std::cerr << "\n  ++After adding call interference for LR: " << *LR << "\n";
+            std::cerr << "\n  ++After adding call interference for LR: " << *LR << "\n";
     }
   }
 
@@ -242,29 +242,29 @@
       bool isCallInst = TM.getInstrInfo()->isCall(MInst->getOpcode());
 
       if (isCallInst) {
-	// set the isCallInterference flag of each live range which extends
-	// across this call instruction. This information is used by graph
-	// coloring algorithm to avoid allocating volatile colors to live ranges
-	// that span across calls (since they have to be saved/restored)
-	setCallInterferences(MInst, &LVSetAI);
+        // set the isCallInterference flag of each live range which extends
+        // across this call instruction. This information is used by graph
+        // coloring algorithm to avoid allocating volatile colors to live ranges
+        // that span across calls (since they have to be saved/restored)
+        setCallInterferences(MInst, &LVSetAI);
       }
 
       // iterate over all MI operands to find defs
       for (MachineInstr::const_val_op_iterator OpI = MInst->begin(),
              OpE = MInst->end(); OpI != OpE; ++OpI) {
-       	if (OpI.isDef()) // create a new LR since def
-	  addInterference(*OpI, &LVSetAI, isCallInst);
+        if (OpI.isDef()) // create a new LR since def
+          addInterference(*OpI, &LVSetAI, isCallInst);
 
-	// Calculate the spill cost of each live range
-	V9LiveRange *LR = LRI->getLiveRangeForValue(*OpI);
-	if (LR) LR->addSpillCost(BBLoopDepthCost);
+        // Calculate the spill cost of each live range
+        V9LiveRange *LR = LRI->getLiveRangeForValue(*OpI);
+        if (LR) LR->addSpillCost(BBLoopDepthCost);
       }
       // Also add interference for any implicit definitions in a machine
       // instr (currently, only calls have this).
       unsigned NumOfImpRefs =  MInst->getNumImplicitRefs();
       for (unsigned z=0; z < NumOfImpRefs; z++)
         if (MInst->getImplicitOp(z).isDef())
-	  addInterference( MInst->getImplicitRef(z), &LVSetAI, isCallInst );
+          addInterference( MInst->getImplicitRef(z), &LVSetAI, isCallInst );
     } // for all machine instructions in BB
   } // for all BBs in function
 
@@ -294,13 +294,13 @@
       const V9LiveRange *LROfOp2 = LRI->getLiveRangeForValue(*It2);
 
       if (LROfOp2) {
-	RegClass *RCOfOp1 = LROfOp1->getRegClass();
-	RegClass *RCOfOp2 = LROfOp2->getRegClass();
+        RegClass *RCOfOp1 = LROfOp1->getRegClass();
+        RegClass *RCOfOp2 = LROfOp2->getRegClass();
 
-	if (RCOfOp1 == RCOfOp2 ){
-	  RCOfOp1->setInterference( LROfOp1, LROfOp2 );
-	  setInterf = true;
-	}
+        if (RCOfOp1 == RCOfOp2 ){
+          RCOfOp1->setInterference( LROfOp1, LROfOp2 );
+          setInterf = true;
+        }
       } // if Op2 has a LR
     } // for all other defs in machine instr
   } // for all operands in an instruction
@@ -556,7 +556,7 @@
 
       // do not process Phis
       if (MInst->getOpcode() == V9::PHI)
-	continue;
+        continue;
 
       // if there are any added instructions...
       if (AddedInstrMap.count(MInst)) {
@@ -614,14 +614,14 @@
 void PhyRegAlloc::insertCode4SpilledLR(const V9LiveRange *LR,
                                        MachineBasicBlock::iterator& MII,
                                        MachineBasicBlock &MBB,
-				       const unsigned OpNum) {
+                                       const unsigned OpNum) {
   MachineInstr *MInst = MII;
   const BasicBlock *BB = MBB.getBasicBlock();
 
   assert((! TM.getInstrInfo()->isCall(MInst->getOpcode()) || OpNum == 0) &&
          "Outgoing arg of a call must be handled elsewhere (func arg ok)");
   assert(! TM.getInstrInfo()->isReturn(MInst->getOpcode()) &&
-	 "Return value of a ret must be handled elsewhere");
+         "Return value of a ret must be handled elsewhere");
 
   MachineOperand& Op = MInst->getOperand(OpNum);
   bool isDef =  Op.isDef();
@@ -778,33 +778,33 @@
     if (LR) {
       if (! LR->isMarkedForSpill()) {
         assert(LR->hasColor() && "LR is neither spilled nor colored?");
-	unsigned RCID = LR->getRegClassID();
-	unsigned Color = LR->getColor();
+        unsigned RCID = LR->getRegClassID();
+        unsigned Color = LR->getColor();
 
-	if (MRI.isRegVolatile(RCID, Color) ) {
-	  // if this is a call to the first-level reoptimizer
-	  // instrumentation entry point, and the register is not
-	  // modified by call, don't save and restore it.
-	  if (isLLVMFirstTrigger && !MRI.modifiedByCall(RCID, Color))
-	    continue;
-
-	  // if the value is in both LV sets (i.e., live before and after
-	  // the call machine instruction)
-	  unsigned Reg = MRI.getUnifiedRegNum(RCID, Color);
-	
-	  // if we haven't already pushed this register...
-	  if( PushedRegSet.find(Reg) == PushedRegSet.end() ) {
-	    unsigned RegType = MRI.getRegTypeForLR(LR);
-
-	    // Now get two instructions - to push on stack and pop from stack
-	    // and add them to InstrnsBefore and InstrnsAfter of the
-	    // call instruction
-	    int StackOff =
+        if (MRI.isRegVolatile(RCID, Color) ) {
+          // if this is a call to the first-level reoptimizer
+          // instrumentation entry point, and the register is not
+          // modified by call, don't save and restore it.
+          if (isLLVMFirstTrigger && !MRI.modifiedByCall(RCID, Color))
+            continue;
+
+          // if the value is in both LV sets (i.e., live before and after
+          // the call machine instruction)
+          unsigned Reg = MRI.getUnifiedRegNum(RCID, Color);
+        
+          // if we haven't already pushed this register...
+          if( PushedRegSet.find(Reg) == PushedRegSet.end() ) {
+            unsigned RegType = MRI.getRegTypeForLR(LR);
+
+            // Now get two instructions - to push on stack and pop from stack
+            // and add them to InstrnsBefore and InstrnsAfter of the
+            // call instruction
+            int StackOff =
               MF->getInfo<SparcV9FunctionInfo>()->pushTempValue(MRI.getSpilledRegSize(RegType));
 
-	    //---- Insert code for pushing the reg on stack ----------
+            //---- Insert code for pushing the reg on stack ----------
 
-	    std::vector<MachineInstr*> AdIBef, AdIAft;
+            std::vector<MachineInstr*> AdIBef, AdIAft;
 
             // We may need a scratch register to copy the saved value
             // to/from memory.  This may itself have to insert code to
@@ -834,8 +834,8 @@
               instrnsBefore.insert(instrnsBefore.end(),
                                    AdIAft.begin(), AdIAft.end());
 
-	    //---- Insert code for popping the reg from the stack ----------
-	    AdIBef.clear();
+            //---- Insert code for popping the reg from the stack ----------
+            AdIBef.clear();
             AdIAft.clear();
 
             // We may need a scratch register to copy the saved value
@@ -855,26 +855,26 @@
               instrnsAfter.insert(instrnsAfter.end(),
                                   AdIBef.begin(), AdIBef.end());
 
-	    MRI.cpMem2RegMI(instrnsAfter, MRI.getFramePointer(), StackOff,
+            MRI.cpMem2RegMI(instrnsAfter, MRI.getFramePointer(), StackOff,
                             Reg, RegType, scratchReg);
 
             if (AdIAft.size() > 0)
               instrnsAfter.insert(instrnsAfter.end(),
                                   AdIAft.begin(), AdIAft.end());
-	
-	    PushedRegSet.insert(Reg);
+        
+            PushedRegSet.insert(Reg);
 
-	    if(DEBUG_RA) {
-	      std::cerr << "\nFor call inst:" << *CallMI;
-	      std::cerr << " -inserted caller saving instrs: Before:\n\t ";
+            if(DEBUG_RA) {
+              std::cerr << "\nFor call inst:" << *CallMI;
+              std::cerr << " -inserted caller saving instrs: Before:\n\t ";
               for_each(instrnsBefore.begin(), instrnsBefore.end(),
                        std::mem_fun(&MachineInstr::dump));
-	      std::cerr << " -and After:\n\t ";
+              std::cerr << " -and After:\n\t ";
               for_each(instrnsAfter.begin(), instrnsAfter.end(),
                        std::mem_fun(&MachineInstr::dump));
-	    }	
-	  } // if not already pushed
-	} // if LR has a volatile color
+            }   
+          } // if not already pushed
+        } // if LR has a volatile color
       } // if LR has color
     } // if there is a LR for Var
   } // for each value in the LV set after instruction
@@ -1280,7 +1280,7 @@
   // RegClassList.  This must be done before calling constructLiveRanges().
   for (unsigned rc = 0; rc != NumOfRegClasses; ++rc)
     RegClassList.push_back (new RegClass (Fn, TM.getRegInfo(),
-					  MRI.getMachineRegClass(rc)));
+                                          MRI.getMachineRegClass(rc)));
 
   LRI->constructLiveRanges();            // create LR info
   if (DEBUG_RA >= RA_DEBUG_LiveRanges)


Index: llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h
diff -u llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h:1.71 llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h:1.72
--- llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h:1.71	Sun Jun 12 18:52:58 2005
+++ llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h	Wed Jul 27 00:53:44 2005
@@ -118,7 +118,7 @@
   SavedStateMapTy FnAllocState;
 
   void addInterference(const Value *Def, const ValueSet *LVSet,
-		       bool isCallInst);
+                       bool isCallInst);
   bool markAllocatedRegs(MachineInstr* MInst);
 
   void addInterferencesForArgs();
@@ -131,10 +131,10 @@
   void finishSavingState(Module &M);
 
   void setCallInterferences(const MachineInstr *MI,
-			    const ValueSet *LVSetAft);
+                            const ValueSet *LVSetAft);
 
   void move2DelayedInstr(const MachineInstr *OrigMI,
-			 const MachineInstr *DelayedMI);
+                         const MachineInstr *DelayedMI);
 
   void markUnusableSugColors();
   void allocateStackSpace4SpilledLRs();
@@ -158,7 +158,7 @@
                          MachineBasicBlock &MBB);
 
   int getUsableUniRegAtMI(int RegType, const ValueSet *LVSetBef,
-			  MachineInstr *MI,
+                          MachineInstr *MI,
                           std::vector<MachineInstr*>& MIBef,
                           std::vector<MachineInstr*>& MIAft);
 


Index: llvm/lib/Target/SparcV9/RegAlloc/RegClass.cpp
diff -u llvm/lib/Target/SparcV9/RegAlloc/RegClass.cpp:1.33 llvm/lib/Target/SparcV9/RegAlloc/RegClass.cpp:1.34
--- llvm/lib/Target/SparcV9/RegAlloc/RegClass.cpp:1.33	Sun Jun 12 18:52:58 2005
+++ llvm/lib/Target/SparcV9/RegAlloc/RegClass.cpp	Wed Jul 27 00:53:44 2005
@@ -25,7 +25,7 @@
 //----------------------------------------------------------------------------
 RegClass::RegClass(const Function *M,
                    const SparcV9RegInfo *_MRI_,
-		   const TargetRegClassInfo *_MRC_)
+                   const TargetRegClassInfo *_MRC_)
                   :  Meth(M), MRI(_MRI_), MRC(_MRC_),
                      RegClassID( _MRC_->getRegClassID() ),
                      IG(this), IGNodeStack() {
@@ -136,7 +136,7 @@
       IGNode->pushOnStack();            // set OnStack and dec deg of neighs
 
       if (DEBUG_RA >= RA_DEBUG_Coloring) {
-	std::cerr << " pushed un-constrained IGNode " << IGNode->getIndex()
+        std::cerr << " pushed un-constrained IGNode " << IGNode->getIndex()
                   << " on to stack\n";
       }
     }
@@ -169,15 +169,15 @@
 
     if (!IGNode->isOnStack()) {
       double SpillCost = (double) IGNode->getParentLR()->getSpillCost() /
-	(double) (IGNode->getCurDegree() + 1);
+        (double) (IGNode->getCurDegree() + 1);
 
       if (isFirstNode) {         // for the first IG node
-	MinSpillCost = SpillCost;
-	MinCostIGNode = IGNode;
-	isFirstNode = false;
+        MinSpillCost = SpillCost;
+        MinCostIGNode = IGNode;
+        isFirstNode = false;
       } else if (MinSpillCost > SpillCost) {
-	MinSpillCost = SpillCost;
-	MinCostIGNode = IGNode;
+        MinSpillCost = SpillCost;
+        MinCostIGNode = IGNode;
       }
     }
   }


Index: llvm/lib/Target/SparcV9/RegAlloc/RegClass.h
diff -u llvm/lib/Target/SparcV9/RegAlloc/RegClass.h:1.25 llvm/lib/Target/SparcV9/RegAlloc/RegClass.h:1.26
--- llvm/lib/Target/SparcV9/RegAlloc/RegClass.h:1.25	Sun Jun 12 18:52:58 2005
+++ llvm/lib/Target/SparcV9/RegAlloc/RegClass.h	Wed Jul 27 00:53:44 2005
@@ -87,8 +87,8 @@
  public:
 
   RegClass(const Function *M,
-	   const SparcV9RegInfo *_MRI_,
-	   const TargetRegClassInfo *_MRC_);
+           const SparcV9RegInfo *_MRI_,
+           const TargetRegClassInfo *_MRC_);
 
   inline void createInterferenceGraph() { IG.createGraph(); }
 
@@ -113,15 +113,15 @@
     { IG.addLRToIG(LR); }
 
   inline void setInterference(const V9LiveRange *const LR1,
-			      const V9LiveRange *const LR2)
+                              const V9LiveRange *const LR2)
     { IG.setInterference(LR1, LR2); }
 
   inline unsigned getInterference(const V9LiveRange *const LR1,
-			      const V9LiveRange *const LR2) const
+                              const V9LiveRange *const LR2) const
     { return IG.getInterference(LR1, LR2); }
 
   inline void mergeIGNodesOfLRs(const V9LiveRange *const LR1,
-				V9LiveRange *const LR2)
+                                V9LiveRange *const LR2)
     { IG.mergeIGNodesOfLRs(LR1, LR2); }
 
 






More information about the llvm-commits mailing list