mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-04 19:26:30 +00:00
Some code cleanups from Chris
llvm-svn: 11724
This commit is contained in:
parent
1525e120a6
commit
976f485826
@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user