[llvm] r215342 - Re-commit "Increase the size of this SmallVector in PeepholeOptimizer." (r215340)

Hans Wennborg hans at hanshq.net
Sun Aug 10 19:50:43 PDT 2014


Author: hans
Date: Sun Aug 10 21:50:43 2014
New Revision: 215342

URL: http://llvm.org/viewvc/llvm-project?rev=215342&view=rev
Log:
Re-commit "Increase the size of this SmallVector in PeepholeOptimizer." (r215340)

This time, also update the function that receives a reference to the SmallPtrSet as
a parameter.

Modified:
    llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp

Modified: llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp?rev=215342&r1=215341&r2=215342&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp (original)
+++ llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp Sun Aug 10 21:50:43 2014
@@ -130,7 +130,7 @@ namespace {
   private:
     bool optimizeCmpInstr(MachineInstr *MI, MachineBasicBlock *MBB);
     bool optimizeExtInstr(MachineInstr *MI, MachineBasicBlock *MBB,
-                          SmallPtrSet<MachineInstr*, 8> &LocalMIs);
+                          SmallPtrSet<MachineInstr*, 16> &LocalMIs);
     bool optimizeSelect(MachineInstr *MI);
     bool optimizeCopyOrBitcast(MachineInstr *MI);
     bool isMoveImmediate(MachineInstr *MI,
@@ -262,7 +262,7 @@ INITIALIZE_PASS_END(PeepholeOptimizer, "
 /// debug uses.
 bool PeepholeOptimizer::
 optimizeExtInstr(MachineInstr *MI, MachineBasicBlock *MBB,
-                 SmallPtrSet<MachineInstr*, 8> &LocalMIs) {
+                 SmallPtrSet<MachineInstr*, 16> &LocalMIs) {
   unsigned SrcReg, DstReg, SubIdx;
   if (!TII->isCoalescableExtInstr(*MI, SrcReg, DstReg, SubIdx))
     return false;
@@ -687,7 +687,7 @@ bool PeepholeOptimizer::runOnMachineFunc
     MachineBasicBlock *MBB = &*I;
 
     bool SeenMoveImm = false;
-    SmallPtrSet<MachineInstr*, 8> LocalMIs;
+    SmallPtrSet<MachineInstr*, 16> LocalMIs;
     SmallSet<unsigned, 4> ImmDefRegs;
     DenseMap<unsigned, MachineInstr*> ImmDefMIs;
     SmallSet<unsigned, 16> FoldAsLoadDefCandidates;





More information about the llvm-commits mailing list