[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp LiveVariables.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri May 13 00:08:21 PDT 2005



Changes in directory llvm/lib/CodeGen:

LiveIntervalAnalysis.cpp updated: 1.139 -> 1.140
LiveVariables.cpp updated: 1.49 -> 1.50
---
Log message:

allow a virtual register to be associated with live-in values.



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

 LiveIntervalAnalysis.cpp |    8 ++++----
 LiveVariables.cpp        |    8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)


Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.139 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.140
--- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.139	Thu Apr 21 17:33:33 2005
+++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp	Fri May 13 02:08:07 2005
@@ -95,7 +95,7 @@
   // beginning of the function that we will pretend "defines" the values.  This
   // is to make the interval analysis simpler by providing a number.
   if (fn.livein_begin() != fn.livein_end()) {
-    unsigned FirstLiveIn = *fn.livein_begin();
+    unsigned FirstLiveIn = fn.livein_begin()->first;
 
     // Find a reg class that contains this live in.
     const TargetRegisterClass *RC = 0;
@@ -128,11 +128,11 @@
   // Note intervals due to live-in values.
   if (fn.livein_begin() != fn.livein_end()) {
     MachineBasicBlock *Entry = fn.begin();
-    for (MachineFunction::liveinout_iterator I = fn.livein_begin(),
+    for (MachineFunction::livein_iterator I = fn.livein_begin(),
            E = fn.livein_end(); I != E; ++I) {
       handlePhysicalRegisterDef(Entry, Entry->begin(),
-                                getOrCreateInterval(*I), 0, 0);
-      for (const unsigned* AS = mri_->getAliasSet(*I); *AS; ++AS)
+                                getOrCreateInterval(I->first), 0, 0);
+      for (const unsigned* AS = mri_->getAliasSet(I->first); *AS; ++AS)
         handlePhysicalRegisterDef(Entry, Entry->begin(),
                                   getOrCreateInterval(*AS), 0, 0);
     }


Index: llvm/lib/CodeGen/LiveVariables.cpp
diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.49 llvm/lib/CodeGen/LiveVariables.cpp:1.50
--- llvm/lib/CodeGen/LiveVariables.cpp:1.49	Thu Apr 21 17:33:33 2005
+++ llvm/lib/CodeGen/LiveVariables.cpp	Fri May 13 02:08:07 2005
@@ -165,11 +165,11 @@
   VirtRegInfo.resize(64);
 
   // Mark live-in registers as live-in.
-  for (MachineFunction::liveinout_iterator I = MF.livein_begin(),
+  for (MachineFunction::livein_iterator I = MF.livein_begin(),
          E = MF.livein_end(); I != E; ++I) {
-    assert(MRegisterInfo::isPhysicalRegister(*I) &&
+    assert(MRegisterInfo::isPhysicalRegister(I->first) &&
            "Cannot have a live-in virtual register!");
-    HandlePhysRegDef(*I, 0);
+    HandlePhysRegDef(I->first, 0);
   }
 
   // Calculate live variable information in depth first order on the CFG of the
@@ -272,7 +272,7 @@
     // it as using all of the live-out values in the function.
     if (!MBB->empty() && TII.isReturn(MBB->back().getOpcode())) {
       MachineInstr *Ret = &MBB->back();
-      for (MachineFunction::liveinout_iterator I = MF.liveout_begin(),
+      for (MachineFunction::liveout_iterator I = MF.liveout_begin(),
              E = MF.liveout_end(); I != E; ++I) {
         assert(MRegisterInfo::isPhysicalRegister(*I) &&
                "Cannot have a live-in virtual register!");






More information about the llvm-commits mailing list