Skip to content

Commit 8ed1291

Browse files
[MachineCopyPropagation] Make a SmallVector larger (NFC) (#79106)
This patch makes a SmallVector slightly larger. We encounter quite a few instructions with 3 or 4 defs but very few beyond that on X86. This saves 0.39% of heap allocations during the compilation of a large preprocessed file, namely X86ISelLowering.cpp, for the X86 target.
1 parent 2531a15 commit 8ed1291

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CodeGen/MachineCopyPropagation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ void MachineCopyPropagation::ForwardCopyPropagateBlock(MachineBasicBlock &MBB) {
853853
forwardUses(MI);
854854

855855
// Not a copy.
856-
SmallVector<Register, 2> Defs;
856+
SmallVector<Register, 4> Defs;
857857
const MachineOperand *RegMask = nullptr;
858858
for (const MachineOperand &MO : MI.operands()) {
859859
if (MO.isRegMask())

0 commit comments

Comments
 (0)