diff options
author | Dale Johannesen <dalej@apple.com> | 2009-03-19 18:03:56 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-03-19 18:03:56 +0000 |
commit | 1f67ce4aa3f65619f54c8a3072539da5b0022841 (patch) | |
tree | 5d7e707449c2bad293bd1b09bc3a07bc7acc475e /lib/Analysis/IPA/CallGraph.cpp | |
parent | 3751f564e372071bcbeba26811917fd03dd58850 (diff) |
Clear the cached cost when removing a function in
the inliner; prevents nondeterministic behavior
when the same address is reallocated.
Don't build call graph nodes for debug intrinsic calls;
they're useless, and there were typically a lot of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67311 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r-- | lib/Analysis/IPA/CallGraph.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp index ea7d7feb4c..6dabcdb94b 100644 --- a/lib/Analysis/IPA/CallGraph.cpp +++ b/lib/Analysis/IPA/CallGraph.cpp @@ -15,6 +15,7 @@ #include "llvm/Analysis/CallGraph.h" #include "llvm/Module.h" #include "llvm/Instructions.h" +#include "llvm/IntrinsicInst.h" #include "llvm/Support/CallSite.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Streams.h" @@ -143,7 +144,7 @@ private: for (BasicBlock::iterator II = BB->begin(), IE = BB->end(); II != IE; ++II) { CallSite CS = CallSite::get(II); - if (CS.getInstruction()) { + if (CS.getInstruction() && !isa<DbgInfoIntrinsic>(II)) { const Function *Callee = CS.getCalledFunction(); if (Callee) Node->addCalledFunction(CS, getOrInsertFunction(Callee)); |