summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopRotation.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-09-01 10:29:33 +0000
committerDuncan Sands <baldrick@free.fr>2010-09-01 10:29:33 +0000
commitf7b18437b518767a620169f0e121ecd0cb375748 (patch)
tree239653e096f22eae277e2f4f15ed53a2069fa753 /llvm/lib/Transforms/Scalar/LoopRotation.cpp
parent5e2e7d7ff35d692c57ab9344700eea316454ee87 (diff)
downloadbcm5719-llvm-f7b18437b518767a620169f0e121ecd0cb375748.tar.gz
bcm5719-llvm-f7b18437b518767a620169f0e121ecd0cb375748.zip
If PrototypeValue is erased in the middle of using the SSAUpdator
then the SSAUpdator may access freed memory. Instead, simply pass in the type and name explicitly, which is all that was used anyway. llvm-svn: 112699
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopRotation.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopRotation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopRotation.cpp b/llvm/lib/Transforms/Scalar/LoopRotation.cpp
index 31957ddac14..65acc1d9257 100644
--- a/llvm/lib/Transforms/Scalar/LoopRotation.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopRotation.cpp
@@ -221,7 +221,7 @@ bool LoopRotate::rotateLoop(Loop *Lp, LPPassManager &LPM) {
// The value now exits in two versions: the initial value in the preheader
// and the loop "next" value in the original header.
- SSA.Initialize(OrigHeaderVal);
+ SSA.Initialize(OrigHeaderVal->getType(), OrigHeaderVal->getName());
SSA.AddAvailableValue(OrigHeader, OrigHeaderVal);
SSA.AddAvailableValue(OrigPreHeader, OrigPreHeaderVal);
OpenPOWER on IntegriCloud