diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-28 00:58:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-28 00:58:15 +0000 |
commit | ead0a2b36b33b9e5f6c3e32de8fa40fc07b7def4 (patch) | |
tree | 210cea331b8e8535ef4315e39c6fc162fea5aab4 /lib/Transforms/Utils/Local.cpp | |
parent | b9d8d657fcdf497a764d342a3d36d223cf80c418 (diff) | |
download | external_llvm-ead0a2b36b33b9e5f6c3e32de8fa40fc07b7def4.tar.gz external_llvm-ead0a2b36b33b9e5f6c3e32de8fa40fc07b7def4.tar.bz2 external_llvm-ead0a2b36b33b9e5f6c3e32de8fa40fc07b7def4.zip |
remove some weirdness that came from the LSR code that has
nothing to do with dead instruction elimination. No tests in
dejagnu depend on this, so I don't know what it was needed for.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60202 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r-- | lib/Transforms/Utils/Local.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp index cab7f03ab0..17ae971901 100644 --- a/lib/Transforms/Utils/Local.cpp +++ b/lib/Transforms/Utils/Local.cpp @@ -190,14 +190,7 @@ void llvm::RecursivelyDeleteTriviallyDeadInstructions(Value *V, while (!Insts.empty()) { I = *Insts.begin(); Insts.erase(I); - - // If this is a PHI node, we may be able to make it dead if we know all the - // input values are the same. - if (PHINode *PN = dyn_cast<PHINode>(I)) { - if (Value *PNV = PN->hasConstantValue()) - PN->replaceAllUsesWith(PNV); - } - + // Okay, if the instruction is dead, delete it. if (!isInstructionTriviallyDead(I)) continue; |