summaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-06-09 19:46:27 +0000
committerJohn McCall <rjmccall@apple.com>2011-06-09 19:46:27 +0000
commite669d83a21d7ebf01d3c9e37a20c7348b5a77c11 (patch)
tree5b426a71d6f3faef1f51e271fb1782225ef3b464 /lib/Analysis
parent6f19c67d8485ae8efe55e0527b3236b03af2c756 (diff)
downloadllvm-e669d83a21d7ebf01d3c9e37a20c7348b5a77c11.tar.gz
llvm-e669d83a21d7ebf01d3c9e37a20c7348b5a77c11.tar.bz2
llvm-e669d83a21d7ebf01d3c9e37a20c7348b5a77c11.tar.xz
Teach the CallGraph to ignore calls to intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132797 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/IPA/CallGraph.cpp2
-rw-r--r--lib/Analysis/IPA/CallGraphSCCPass.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/IPA/CallGraph.cpp b/lib/Analysis/IPA/CallGraph.cpp
index 690c4b4b6f..2e79eab51f 100644
--- a/lib/Analysis/IPA/CallGraph.cpp
+++ b/lib/Analysis/IPA/CallGraph.cpp
@@ -148,7 +148,7 @@ private:
for (BasicBlock::iterator II = BB->begin(), IE = BB->end();
II != IE; ++II) {
CallSite CS(cast<Value>(II));
- if (CS && !isa<DbgInfoIntrinsic>(II)) {
+ if (CS && !isa<IntrinsicInst>(II)) {
const Function *Callee = CS.getCalledFunction();
if (Callee)
Node->addCalledFunction(CS, getOrInsertFunction(Callee));
diff --git a/lib/Analysis/IPA/CallGraphSCCPass.cpp b/lib/Analysis/IPA/CallGraphSCCPass.cpp
index 725ab72f55..659ffab0c6 100644
--- a/lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ b/lib/Analysis/IPA/CallGraphSCCPass.cpp
@@ -245,8 +245,8 @@ bool CGPassManager::RefreshCallGraph(CallGraphSCC &CurSCC,
for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) {
- CallSite CS(cast<Value>(I));
- if (!CS || isa<DbgInfoIntrinsic>(I)) continue;
+ CallSite CS(cast<Value>(I));
+ if (!CS || isa<IntrinsicInst>(I)) continue;
// If this call site already existed in the callgraph, just verify it
// matches up to expectations and remove it from CallSites.