summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-23 01:25:05 +0000
committerAlkis Evlogimenos <alkis@evlogimenos.com>2004-02-23 01:25:05 +0000
commitd42c2f24ecff51c62b49561a57d58fb0802bc4d8 (patch)
tree454045f8f186d23a5b1490813c59e7bcd50a1c86 /llvm/lib
parent378157c3d72faa3c8678999ab4c94a76735cff18 (diff)
downloadbcm5719-llvm-d42c2f24ecff51c62b49561a57d58fb0802bc4d8.tar.gz
bcm5719-llvm-d42c2f24ecff51c62b49561a57d58fb0802bc4d8.zip
Fix comments in PhysRegTracker and rename isPhysRegAvail to isRegAvail to be consistent with the other two
llvm-svn: 11723
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/PhysRegTracker.h9
-rw-r--r--llvm/lib/CodeGen/RegAllocLinearScan.cpp2
2 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/PhysRegTracker.h b/llvm/lib/CodeGen/PhysRegTracker.h
index 36128c65a88..d2ff82a237d 100644
--- a/llvm/lib/CodeGen/PhysRegTracker.h
+++ b/llvm/lib/CodeGen/PhysRegTracker.h
@@ -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 @@ namespace llvm {
}
}
- bool isPhysRegAvail(unsigned physReg) const {
+ bool isRegAvail(unsigned physReg) const {
assert(MRegisterInfo::isPhysicalRegister(physReg) &&
"should be physical register!");
return regUse_[physReg] == 0;
diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp
index 728c0182c48..0a4077fa159 100644
--- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp
+++ b/llvm/lib/CodeGen/RegAllocLinearScan.cpp
@@ -706,7 +706,7 @@ unsigned RA::getFreePhysReg(IntervalPtrs::value_type cur)
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;
OpenPOWER on IntegriCloud