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 | 2050968df96a25a202c00d8e788a57c16e732188 (patch) | |
tree | 1e06039b303499c20455f12bdd1c1ea399bfd1c3 /llvm/lib/Analysis/IPA/CallGraph.cpp | |
parent | 403c4680655de7ef3213ed47a2bf83614e4d9085 (diff) | |
download | bcm5719-llvm-2050968df96a25a202c00d8e788a57c16e732188.tar.gz bcm5719-llvm-2050968df96a25a202c00d8e788a57c16e732188.zip |
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.
llvm-svn: 67311
Diffstat (limited to 'llvm/lib/Analysis/IPA/CallGraph.cpp')
-rw-r--r-- | llvm/lib/Analysis/IPA/CallGraph.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/IPA/CallGraph.cpp b/llvm/lib/Analysis/IPA/CallGraph.cpp index ea7d7feb4cd..6dabcdb94bf 100644 --- a/llvm/lib/Analysis/IPA/CallGraph.cpp +++ b/llvm/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)); |