diff options
author | Duncan Sands <baldrick@free.fr> | 2010-09-02 08:14:03 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-09-02 08:14:03 +0000 |
commit | 6778149f7e9550df48423d15bc8aa725d582962c (patch) | |
tree | f2ae4762157d62609c1f04ab6aba55f9b4bc5ec1 /llvm/lib/Transforms/Scalar/LoopRotation.cpp | |
parent | d30f8ec11ee0b697c31197978a1f2e7cc0ad63ce (diff) | |
download | bcm5719-llvm-6778149f7e9550df48423d15bc8aa725d582962c.tar.gz bcm5719-llvm-6778149f7e9550df48423d15bc8aa725d582962c.zip |
Reapply commit 112699, speculatively reverted by echristo, since
I'm sure it is harmless. Original commit message:
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: 112810
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopRotation.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopRotation.cpp | 2 |
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); |