diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2012-06-29 17:49:32 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2012-06-29 17:49:32 +0000 |
commit | 674acc12d0d4cb260efba154a7e2e07581b64000 (patch) | |
tree | dba863ed8c348c941392ba51fd8bdfeeb56ae05a /llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp | |
parent | b37ef71ce1578c8536e7d47d636ecb6663a4e28a (diff) | |
download | bcm5719-llvm-674acc12d0d4cb260efba154a7e2e07581b64000.tar.gz bcm5719-llvm-674acc12d0d4cb260efba154a7e2e07581b64000.zip |
RefreshCallGraph: ignore 'invoke intrinsic'. IntrinsicInst doesnt not recognize invoke, and shouldnt at this point, since the rest of LLVM codebase doesnt expect invoke of intrinsics
llvm-svn: 159441
Diffstat (limited to 'llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp')
-rw-r--r-- | llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp index 963da752343..449b7ee87b1 100644 --- a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp +++ b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp @@ -246,7 +246,9 @@ 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<IntrinsicInst>(I)) continue; + if (!CS) continue; + Function *Callee = CS.getCalledFunction(); + if (Callee && Callee->isIntrinsic()) continue; // If this call site already existed in the callgraph, just verify it // matches up to expectations and remove it from CallSites. |