[llvm-commits] [llvm] r136338 - /llvm/trunk/lib/VMCore/Instructions.cpp

Bill Wendling isanbard at gmail.com
Thu Jul 28 00:26:41 PDT 2011


Author: void
Date: Thu Jul 28 02:26:41 2011
New Revision: 136338

URL: http://llvm.org/viewvc/llvm-project?rev=136338&view=rev
Log:
Don't add in the asked for size so that we don't copy too much from the old to new vectors.

Modified:
    llvm/trunk/lib/VMCore/Instructions.cpp

Modified: llvm/trunk/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=136338&r1=136337&r2=136338&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instructions.cpp (original)
+++ llvm/trunk/lib/VMCore/Instructions.cpp Thu Jul 28 02:26:41 2011
@@ -215,9 +215,9 @@
 }
 
 void LandingPadInst::reserveClauses(unsigned Size) {
-  unsigned e = getNumOperands() + Size;
-  if (ReservedSpace >= e) return;
-  ReservedSpace = e;
+  unsigned e = getNumOperands();
+  if (ReservedSpace >= e + Size) return;
+  ReservedSpace = e + Size;
 
   Use *NewOps = allocHungoffUses(ReservedSpace);
   Use *OldOps = OperandList;





More information about the llvm-commits mailing list