diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-11-12 21:58:18 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-11-12 21:58:18 +0000 |
| commit | 5c89f4b4ef868627d104af82d78b7fc79bbed3cb (patch) | |
| tree | ad92fed3ae16931266d261593baecc5dfef4bf9b /llvm/lib/Transforms | |
| parent | 033d65581d1af630c498787fe32cad56ad76758c (diff) | |
| download | bcm5719-llvm-5c89f4b4ef868627d104af82d78b7fc79bbed3cb.tar.gz bcm5719-llvm-5c89f4b4ef868627d104af82d78b7fc79bbed3cb.zip | |
use isInstructionTriviallyDead, as pointed out by Duncan
llvm-svn: 87035
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/IPO/Inliner.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp index 0243fe83276..6918fe87c69 100644 --- a/llvm/lib/Transforms/IPO/Inliner.cpp +++ b/llvm/lib/Transforms/IPO/Inliner.cpp @@ -19,10 +19,11 @@ #include "llvm/IntrinsicInst.h" #include "llvm/Analysis/CallGraph.h" #include "llvm/Analysis/InlineCost.h" -#include "llvm/Support/CallSite.h" #include "llvm/Target/TargetData.h" #include "llvm/Transforms/IPO/InlinerPass.h" #include "llvm/Transforms/Utils/Cloning.h" +#include "llvm/Transforms/Utils/Local.h" +#include "llvm/Support/CallSite.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" @@ -344,8 +345,7 @@ bool Inliner::runOnSCC(std::vector<CallGraphNode*> &SCC) { // just delete the call instead of trying to inline it, regardless of // size. This happens because IPSCCP propagates the result out of the // call and then we're left with the dead call. - if (CS.getInstruction()->use_empty() && - !CS.getInstruction()->mayHaveSideEffects()) { + if (isInstructionTriviallyDead(CS.getInstruction())) { DEBUG(errs() << " -> Deleting dead call: " << *CS.getInstruction() << "\n"); // Update the call graph by deleting the edge from Callee to Caller. |

