diff options
author | Nico Weber <nicolasweber@gmx.de> | 2016-06-24 22:52:39 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2016-06-24 22:52:39 +0000 |
commit | ae2ef4ccd4b904461009c4444e1ae9006a666c0e (patch) | |
tree | 5e15cef9fa969476d81a31a2f81bd5f1c3371177 /llvm/lib/Transforms/Utils/CloneFunction.cpp | |
parent | babc13a3e25636bd6b9ee64baf42bca1a8e497cf (diff) | |
download | bcm5719-llvm-ae2ef4ccd4b904461009c4444e1ae9006a666c0e.tar.gz bcm5719-llvm-ae2ef4ccd4b904461009c4444e1ae9006a666c0e.zip |
Revert r273711, it caused PR28298.
llvm-svn: 273743
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneFunction.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index 59b109ead63..6ff05fe3e59 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -279,7 +279,6 @@ void PruningFunctionCloner::CloneBlock(const BasicBlock *BB, II != IE; ++II) { Instruction *NewInst = II->clone(); - VMap[&*II] = NewInst; // Add instruction map to value. // Eagerly remap operands to the newly cloned instruction, except for PHI // nodes for which we defer processing until we update the CFG. @@ -298,15 +297,14 @@ void PruningFunctionCloner::CloneBlock(const BasicBlock *BB, V = MappedV; VMap[&*II] = V; - if (!NewInst->mayHaveSideEffects()) { - delete NewInst; - continue; - } + delete NewInst; + continue; } } if (II->hasName()) NewInst->setName(II->getName()+NameSuffix); + VMap[&*II] = NewInst; // Add instruction map to value. NewBB->getInstList().push_back(NewInst); hasCalls |= (isa<CallInst>(II) && !isa<DbgInfoIntrinsic>(II)); |