Skip to content

Commit 674acc1

Browse files
committed
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
1 parent b37ef71 commit 674acc1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,9 @@ bool CGPassManager::RefreshCallGraph(CallGraphSCC &CurSCC,
246246
for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB)
247247
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) {
248248
CallSite CS(cast<Value>(I));
249-
if (!CS || isa<IntrinsicInst>(I)) continue;
249+
if (!CS) continue;
250+
Function *Callee = CS.getCalledFunction();
251+
if (Callee && Callee->isIntrinsic()) continue;
250252

251253
// If this call site already existed in the callgraph, just verify it
252254
// matches up to expectations and remove it from CallSites.

0 commit comments

Comments
 (0)