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/JumpThreading.cpp | |
| parent | d30f8ec11ee0b697c31197978a1f2e7cc0ad63ce (diff) | |
| download | llvm-6778149f7e9550df48423d15bc8aa725d582962c.zip llvm-6778149f7e9550df48423d15bc8aa725d582962c.tar.gz llvm-6778149f7e9550df48423d15bc8aa725d582962c.tar.bz2 | |
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/JumpThreading.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/JumpThreading.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp index 6fd8ed10..104d5ae 100644 --- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp +++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp @@ -1528,7 +1528,7 @@ bool JumpThreading::ThreadEdge(BasicBlock *BB, // We found a use of I outside of BB. Rename all uses of I that are outside // its block to be uses of the appropriate PHI node etc. See ValuesInBlocks // with the two values we know. - SSAUpdate.Initialize(I); + SSAUpdate.Initialize(I->getType(), I->getName()); SSAUpdate.AddAvailableValue(BB, I); SSAUpdate.AddAvailableValue(NewBB, ValueMapping[I]); @@ -1683,7 +1683,7 @@ bool JumpThreading::DuplicateCondBranchOnPHIIntoPred(BasicBlock *BB, // We found a use of I outside of BB. Rename all uses of I that are outside // its block to be uses of the appropriate PHI node etc. See ValuesInBlocks // with the two values we know. - SSAUpdate.Initialize(I); + SSAUpdate.Initialize(I->getType(), I->getName()); SSAUpdate.AddAvailableValue(BB, I); SSAUpdate.AddAvailableValue(PredBB, ValueMapping[I]); |
