[cfe-commits] r89005 - /cfe/trunk/lib/CodeGen/CGCXXExpr.cpp

Mike Stump mrs at apple.com
Mon Nov 16 16:10:06 PST 2009


Author: mrs
Date: Mon Nov 16 18:10:05 2009
New Revision: 89005

URL: http://llvm.org/viewvc/llvm-project?rev=89005&view=rev
Log:
Since we always have 2 edges, we don't need to reserve 3 slot for the
PHI node.

Modified:
    cfe/trunk/lib/CodeGen/CGCXXExpr.cpp

Modified: cfe/trunk/lib/CodeGen/CGCXXExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCXXExpr.cpp?rev=89005&r1=89004&r2=89005&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGCXXExpr.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCXXExpr.cpp Mon Nov 16 18:10:05 2009
@@ -512,7 +512,7 @@
   EmitBlock(ContBlock);
   if (CanBeZero) {
     llvm::PHINode *PHI = Builder.CreatePHI(LTy);
-    PHI->reserveOperandSpace(3);
+    PHI->reserveOperandSpace(2);
     PHI->addIncoming(V, NonZeroBlock);
     PHI->addIncoming(llvm::Constant::getNullValue(LTy), NullBlock);
     V = PHI;





More information about the cfe-commits mailing list