aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-22 23:16:21 +0000
committerChris Lattner <sabre@nondot.org>2002-10-22 23:16:21 +0000
commit27a08935ca4ccf2121c2cf4bfbf148e2382c7762 (patch)
treeba43dd696226bb33a6a2a16e009132b2b5b24418 /lib/CodeGen/MachineInstr.cpp
parent4bdb9b7ebee8f671754c5b7a2c0ca11f520c2aaf (diff)
- 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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4261 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r--lib/CodeGen/MachineInstr.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 02c25fdd7f..df633c6511 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/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;
}