[llvm-commits] [llvm] r109580 - /llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp
Gabor Greif
ggreif at gmail.com
Wed Jul 28 05:35:54 PDT 2010
Author: ggreif
Date: Wed Jul 28 07:35:54 2010
New Revision: 109580
URL: http://llvm.org/viewvc/llvm-project?rev=109580&view=rev
Log:
use Value* constructor of CallSite to create potentially improper site, and test that
Modified:
llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp
Modified: llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp?rev=109580&r1=109579&r2=109580&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp (original)
+++ llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp Wed Jul 28 07:35:54 2010
@@ -209,7 +209,7 @@
// If the call edge is not from a call or invoke, then the function
// pass RAUW'd a call with another value. This can happen when
// constant folding happens of well known functions etc.
- CallSite::get(I->first).getInstruction() == 0) {
+ !CallSite(I->first)) {
assert(!CheckingMode &&
"CallGraphSCCPass did not update the CallGraph correctly!");
@@ -245,8 +245,8 @@
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 = CallSite::get(I);
- if (!CS.getInstruction() || isa<DbgInfoIntrinsic>(I)) continue;
+ CallSite CS(cast<Value>(I));
+ if (!CS || isa<DbgInfoIntrinsic>(I)) continue;
// If this call site already existed in the callgraph, just verify it
// matches up to expectations and remove it from CallSites.
More information about the llvm-commits
mailing list