From 04d9cb67703ad036ebe3015f57f5a31d7ce658dc Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 20 Sep 2003 16:34:13 +0000 Subject: Switch from using CallInst's to represent call sites to using the LLVM CallSite class. Now we can represent function calls by invoke instructions too! llvm-svn: 8629 --- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Analysis/DataStructure/TopDownClosure.cpp') diff --git a/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp b/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp index 92a03ee2f40..13535e3f801 100644 --- a/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp +++ b/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp @@ -96,9 +96,10 @@ void TDDataStructures::ComputePostOrder(Function &F,hash_set &Visited, const std::vector &FunctionCalls = G.getFunctionCalls(); for (unsigned i = 0, e = FunctionCalls.size(); i != e; ++i) { + Instruction *CallI = FunctionCalls[i].getCallSite().getInstruction(); std::pair - IP = ActualCallees.equal_range(&FunctionCalls[i].getCallInst()); + IP = ActualCallees.equal_range(CallI); for (BUDataStructures::ActualCalleesTy::const_iterator I = IP.first; I != IP.second; ++I) @@ -191,10 +192,11 @@ void TDDataStructures::inlineGraphIntoCallees(DSGraph &Graph) { // Clone and merge the reachable subgraph from the call into callee's graph. // for (unsigned i = 0, e = FunctionCalls.size(); i != e; ++i) { + Instruction *CallI = FunctionCalls[i].getCallSite().getInstruction(); // For each function in the invoked function list at this call site... std::pair - IP = ActualCallees.equal_range(&FunctionCalls[i].getCallInst()); + IP = ActualCallees.equal_range(CallI); // Multiple callees may have the same graph, so try to inline and merge // only once for each pair, not once for each -- cgit v1.2.3