[llvm-commits] CVS: llvm/lib/CodeGen/PhysRegTracker.h RegAllocLinearScan.cpp

Alkis Evlogimenos alkis at cs.uiuc.edu
Sun Feb 22 19:26:01 PST 2004


Changes in directory llvm/lib/CodeGen:

PhysRegTracker.h updated: 1.1 -> 1.2
RegAllocLinearScan.cpp updated: 1.57 -> 1.58

---
Log message:

Fix comments in PhysRegTracker and rename isPhysRegAvail to isRegAvail to be consistent with the other two


---
Diffs of the changes:  (+6 -5)

Index: llvm/lib/CodeGen/PhysRegTracker.h
diff -u llvm/lib/CodeGen/PhysRegTracker.h:1.1 llvm/lib/CodeGen/PhysRegTracker.h:1.2
--- llvm/lib/CodeGen/PhysRegTracker.h:1.1	Sun Feb 22 18:53:31 2004
+++ llvm/lib/CodeGen/PhysRegTracker.h	Sun Feb 22 19:25:05 2004
@@ -1,4 +1,4 @@
-//===-- llvm/CodeGen/LiveInterval.h - Live Interval Analysis ----*- C++ -*-===//
+//===-- llvm/CodeGen/PhysRegTracker.h - Physical Register Tracker -*- C++ -*-=//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -8,8 +8,9 @@
 //===----------------------------------------------------------------------===//
 //
 // This file implements a physical register tracker. The tracker
-// tracks physical register usage through addPhysRegUse and
-// delPhysRegUse functions while abstracting away register aliases.
+// tracks physical register usage through addRegUse and
+// delRegUse. isRegAvail checks if a physical register is available or
+// not taking into consideration register aliases.
 //
 //===----------------------------------------------------------------------===//
 
@@ -67,7 +68,7 @@
             }
         }
 
-        bool isPhysRegAvail(unsigned physReg) const {
+        bool isRegAvail(unsigned physReg) const {
             assert(MRegisterInfo::isPhysicalRegister(physReg) &&
                    "should be physical register!");
             return regUse_[physReg] == 0;


Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.57 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.58
--- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.57	Sun Feb 22 18:53:31 2004
+++ llvm/lib/CodeGen/RegAllocLinearScan.cpp	Sun Feb 22 19:25:05 2004
@@ -706,7 +706,7 @@
     for (TargetRegisterClass::iterator i = rc->allocation_order_begin(*mf_);
          i != rc->allocation_order_end(*mf_); ++i) {
         unsigned reg = *i;
-        if (prt_.isPhysRegAvail(reg))
+        if (prt_.isRegAvail(reg))
             return reg;
     }
     return 0;





More information about the llvm-commits mailing list