Adjust the sizes for a few SmallVectors to reflect their usage.
authorDan Gohman <gohman@apple.com>
Thu, 12 Feb 2009 17:29:01 +0000 (17:29 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 12 Feb 2009 17:29:01 +0000 (17:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64381 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocBigBlock.cpp
lib/CodeGen/VirtRegMap.cpp

index 584aa7c7c0efa95d8bb5462d4bd54d672fcf1ca9..91e4099d0c45761fea7ca9849b6d062d2984104b 100644 (file)
@@ -518,7 +518,7 @@ MachineInstr *RABigBlock::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI
     assignVirtToPhysReg(VirtReg, PhysReg);
   } else {  // no free registers available.
     // try to fold the spill into the instruction
-    SmallVector<unsigned, 2> Ops;
+    SmallVector<unsigned, 1> Ops;
     Ops.push_back(OpNum);
     if(MachineInstr* FMI = TII->foldMemoryOperand(*MF, MI, Ops, FrameIndex)) {
       ++NumFolded;
index 84c48c652cce1731be405b52596b1cd10ed192c9..f288dcc87cfefa0cfb9edfd2df5cb5df31fca226 100644 (file)
@@ -1053,7 +1053,7 @@ bool LocalSpiller::PrepForUnfoldOpti(MachineBasicBlock &MBB,
       NewMIs.clear();
       int Idx = NewMI->findRegisterUseOperandIdx(VirtReg, false);
       assert(Idx != -1);
-      SmallVector<unsigned, 2> Ops;
+      SmallVector<unsigned, 1> Ops;
       Ops.push_back(Idx);
       MachineInstr *FoldedMI = TII->foldMemoryOperand(MF, NewMI, Ops, SS);
       if (FoldedMI) {
@@ -1124,7 +1124,7 @@ bool LocalSpiller::CommuteToFoldReload(MachineBasicBlock &MBB,
     MachineInstr *CommutedMI = TII->commuteInstruction(DefMI, true);
     if (!CommutedMI)
       return false;
-    SmallVector<unsigned, 2> Ops;
+    SmallVector<unsigned, 1> Ops;
     Ops.push_back(NewDstIdx);
     MachineInstr *FoldedMI = TII->foldMemoryOperand(MF, CommutedMI, Ops, SS);
     // Not needed since foldMemoryOperand returns new MI.