diff options
author | Chris Lattner <sabre@nondot.org> | 2002-10-22 23:16:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-10-22 23:16:21 +0000 |
commit | ce64eddb7124bd2bcc1c6cdb3b2e68cdb041cd3f (patch) | |
tree | 4b51ed9e8be88f0dfd1a2502ce071cdb905a8ca0 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | 51a2c3cc2d01bf9846074524d9ecda57ec36eb01 (diff) | |
download | bcm5719-llvm-ce64eddb7124bd2bcc1c6cdb3b2e68cdb041cd3f.tar.gz bcm5719-llvm-ce64eddb7124bd2bcc1c6cdb3b2e68cdb041cd3f.zip |
- Two minor improvements to the MachineInstr class to reduce footprint and
overhead: Merge 3 parallel vectors into 1, change regsUsed hash_set to be a
bitvector. Sped up LLC a little less than 10% in a debug build!
llvm-svn: 4261
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 02c25fdd7fb..df633c65116 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -82,14 +82,14 @@ MachineInstr::SetMachineOperandReg(unsigned int i, operands[i].markDef(); if (isDefAndUse) operands[i].markDefAndUse(); - regsUsed.insert(regNum); + insertUsedReg(regNum); } void MachineInstr::SetRegForOperand(unsigned i, int regNum) { operands[i].setRegForValue(regNum); - regsUsed.insert(regNum); + insertUsedReg(regNum); } @@ -111,10 +111,10 @@ MachineInstr::substituteValue(const Value* oldVal, Value* newVal, bool defsOnly) // Subsitute implicit refs for (unsigned i=0, N=implicitRefs.size(); i < N; ++i) - if (implicitRefs[i] == oldVal) + if (getImplicitRef(i) == oldVal) if (!defsOnly || implicitRefIsDefined(i)) { - implicitRefs[i] = newVal; + implicitRefs[i].Val = newVal; ++numSubst; } |