mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
- 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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user