[llvm-commits] CVS: llvm/lib/CodeGen/InstrSelection/MachineInstr.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Oct 22 18:17:03 PDT 2002
Changes in directory llvm/lib/CodeGen/InstrSelection:
MachineInstr.cpp updated: 1.47 -> 1.48
---
Log message:
- 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!
---
Diffs of the changes:
Index: llvm/lib/CodeGen/InstrSelection/MachineInstr.cpp
diff -u llvm/lib/CodeGen/InstrSelection/MachineInstr.cpp:1.47 llvm/lib/CodeGen/InstrSelection/MachineInstr.cpp:1.48
--- llvm/lib/CodeGen/InstrSelection/MachineInstr.cpp:1.47 Thu Sep 19 19:47:37 2002
+++ llvm/lib/CodeGen/InstrSelection/MachineInstr.cpp Tue Oct 22 18:16:17 2002
@@ -82,14 +82,14 @@
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 @@
// 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;
}
More information about the llvm-commits
mailing list