[llvm-commits] [llvm] r40820 - /llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
Chris Lattner
sabre at nondot.org
Sat Aug 4 13:14:35 PDT 2007
Author: lattner
Date: Sat Aug 4 15:14:34 2007
New Revision: 40820
URL: http://llvm.org/viewvc/llvm-project?rev=40820&view=rev
Log:
reserve operand space for phi nodes when we insert them.
Modified:
llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
Modified: llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp?rev=40820&r1=40819&r2=40820&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Sat Aug 4 15:14:34 2007
@@ -772,6 +772,7 @@
Allocas[AllocaNo]->getName() + "." +
utostr(Version++), BB->begin());
PhiToAllocaMap[PN] = AllocaNo;
+ PN->reserveOperandSpace(std::distance(pred_begin(BB), pred_end(BB)));
InsertedPHINodes.insert(PN);
More information about the llvm-commits
mailing list