-//===-- llvm/CodeGen/LiveInterval.h - Live Interval Analysis ----*- C++ -*-===//
+//===-- llvm/CodeGen/PhysRegTracker.h - Physical Register Tracker -*- C++ -*-=//
//
// The LLVM Compiler Infrastructure
//
//===----------------------------------------------------------------------===//
//
// 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.
//
//===----------------------------------------------------------------------===//
}
}
- bool isPhysRegAvail(unsigned physReg) const {
+ bool isRegAvail(unsigned physReg) const {
assert(MRegisterInfo::isPhysicalRegister(physReg) &&
"should be physical register!");
return regUse_[physReg] == 0;
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;