diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-23 01:57:39 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-23 01:57:39 +0000 |
commit | 25d9d5800c77dd5f6e249a3dfb61b597c1a93c2c (patch) | |
tree | d2452cee4b72a24d1124d26d23684ac1f8f6c195 /lib/CodeGen/PhysRegTracker.h | |
parent | 534f545ef15a22533933af853894f3516ba2eed5 (diff) |
Some code cleanups from Chris
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11724 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PhysRegTracker.h')
-rw-r--r-- | lib/CodeGen/PhysRegTracker.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/CodeGen/PhysRegTracker.h b/lib/CodeGen/PhysRegTracker.h index d2ff82a237..777c3358f2 100644 --- a/lib/CodeGen/PhysRegTracker.h +++ b/lib/CodeGen/PhysRegTracker.h @@ -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 @@ namespace llvm { 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 @@ namespace llvm { 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]; } } |