[llvm-commits] CVS: llvm/lib/CodeGen/PhysRegTracker.h
Alkis Evlogimenos
alkis at cs.uiuc.edu
Sun Feb 22 19:58:01 PST 2004
Changes in directory llvm/lib/CodeGen:
PhysRegTracker.h updated: 1.2 -> 1.3
---
Log message:
Some code cleanups from Chris
---
Diffs of the changes: (+4 -9)
Index: llvm/lib/CodeGen/PhysRegTracker.h
diff -u llvm/lib/CodeGen/PhysRegTracker.h:1.2 llvm/lib/CodeGen/PhysRegTracker.h:1.3
--- llvm/lib/CodeGen/PhysRegTracker.h:1.2 Sun Feb 22 19:25:05 2004
+++ llvm/lib/CodeGen/PhysRegTracker.h Sun Feb 22 19:57:39 2004
@@ -18,12 +18,10 @@
#define LLVM_CODEGEN_PHYSREGTRACKER_H
#include "llvm/CodeGen/MachineFunction.h"
-#include <vector>
namespace llvm {
class PhysRegTracker {
- private:
const MRegisterInfo* mri_;
std::vector<unsigned> regUse_;
@@ -50,10 +48,8 @@
assert(MRegisterInfo::isPhysicalRegister(physReg) &&
"should be physical register!");
++regUse_[physReg];
- for (const unsigned* as = mri_->getAliasSet(physReg); *as; ++as) {
- physReg = *as;
- ++regUse_[physReg];
- }
+ for (const unsigned* as = mri_->getAliasSet(physReg); *as; ++as)
+ ++regUse_[*as];
}
void delRegUse(unsigned physReg) {
@@ -62,9 +58,8 @@
assert(regUse_[physReg] != 0);
--regUse_[physReg];
for (const unsigned* as = mri_->getAliasSet(physReg); *as; ++as) {
- physReg = *as;
- assert(regUse_[physReg] != 0);
- --regUse_[physReg];
+ assert(regUse_[*as] != 0);
+ --regUse_[*as];
}
}
More information about the llvm-commits
mailing list