mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
switch RegsForValue::Regs to be a SmallVector to avoid
heap thrash on tiny (usually single-element) vectors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50335 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5da0b73aa1
commit
8eaff0449c
@ -125,7 +125,7 @@ namespace {
|
|||||||
/// Regs - This list holds the register (for legal and promoted values)
|
/// Regs - This list holds the register (for legal and promoted values)
|
||||||
/// or register set (for expanded values) that the value should be assigned
|
/// or register set (for expanded values) that the value should be assigned
|
||||||
/// to.
|
/// to.
|
||||||
std::vector<unsigned> Regs;
|
SmallVector<unsigned, 4> Regs;
|
||||||
|
|
||||||
/// RegVTs - The value types of the registers. This is the same size
|
/// RegVTs - The value types of the registers. This is the same size
|
||||||
/// as ValueVTs; every register contributing to a given value must
|
/// as ValueVTs; every register contributing to a given value must
|
||||||
@ -146,11 +146,11 @@ namespace {
|
|||||||
unsigned Reg, MVT::ValueType regvt, MVT::ValueType valuevt)
|
unsigned Reg, MVT::ValueType regvt, MVT::ValueType valuevt)
|
||||||
: TLI(&tli), Regs(1, Reg), RegVTs(1, regvt), ValueVTs(1, valuevt) {}
|
: TLI(&tli), Regs(1, Reg), RegVTs(1, regvt), ValueVTs(1, valuevt) {}
|
||||||
RegsForValue(const TargetLowering &tli,
|
RegsForValue(const TargetLowering &tli,
|
||||||
const std::vector<unsigned> ®s,
|
const SmallVectorImpl<unsigned> ®s,
|
||||||
MVT::ValueType regvt, MVT::ValueType valuevt)
|
MVT::ValueType regvt, MVT::ValueType valuevt)
|
||||||
: TLI(&tli), Regs(regs), RegVTs(1, regvt), ValueVTs(1, valuevt) {}
|
: TLI(&tli), Regs(regs), RegVTs(1, regvt), ValueVTs(1, valuevt) {}
|
||||||
RegsForValue(const TargetLowering &tli,
|
RegsForValue(const TargetLowering &tli,
|
||||||
const std::vector<unsigned> ®s,
|
const SmallVectorImpl<unsigned> ®s,
|
||||||
const SmallVector<MVT::ValueType, 4> ®vts,
|
const SmallVector<MVT::ValueType, 4> ®vts,
|
||||||
const SmallVector<MVT::ValueType, 4> &valuevts)
|
const SmallVector<MVT::ValueType, 4> &valuevts)
|
||||||
: TLI(&tli), Regs(regs), RegVTs(regvts), ValueVTs(valuevts) {}
|
: TLI(&tli), Regs(regs), RegVTs(regvts), ValueVTs(valuevts) {}
|
||||||
@ -3600,7 +3600,7 @@ GetRegistersForValue(SDISelAsmOperandInfo &OpInfo, bool HasEarlyClobber,
|
|||||||
|
|
||||||
|
|
||||||
MachineFunction &MF = DAG.getMachineFunction();
|
MachineFunction &MF = DAG.getMachineFunction();
|
||||||
std::vector<unsigned> Regs;
|
SmallVector<unsigned, 8> Regs;
|
||||||
|
|
||||||
// If this is a constraint for a single physreg, or a constraint for a
|
// If this is a constraint for a single physreg, or a constraint for a
|
||||||
// register class, find it.
|
// register class, find it.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user