blob: bf1940ebe64b5c7c3436c4189514200c9819be31 [file] [log] [blame]
Vikram S. Adve895c0bd2002-11-06 17:02:03 +00001//===- IPModRef.cpp - Compute IP Mod/Ref information ------------*- C++ -*-===//
John Criswellb576c942003-10-20 19:43:21 +00002//
3// The LLVM Compiler Infrastructure
4//
5// This file was developed by the LLVM research group and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
Vikram S. Adve895c0bd2002-11-06 17:02:03 +00009//
Chris Lattner4dabb2c2004-07-07 06:32:21 +000010// See high-level comments in IPModRef.h
Vikram S. Adve895c0bd2002-11-06 17:02:03 +000011//
12//===----------------------------------------------------------------------===//
13
Chris Lattnere6afb742004-06-28 00:41:23 +000014#include "IPModRef.h"
Chris Lattner4dabb2c2004-07-07 06:32:21 +000015#include "llvm/Analysis/DataStructure/DataStructure.h"
16#include "llvm/Analysis/DataStructure/DSGraph.h"
Vikram S. Adve895c0bd2002-11-06 17:02:03 +000017#include "llvm/Module.h"
Misha Brukmand8e1eea2004-07-29 17:05:13 +000018#include "llvm/Instructions.h"
Vikram S. Adve895c0bd2002-11-06 17:02:03 +000019#include "Support/Statistic.h"
20#include "Support/STLExtras.h"
21#include "Support/StringExtras.h"
Vikram S. Adve9a964282002-11-27 17:37:46 +000022#include <vector>
Vikram S. Adve895c0bd2002-11-06 17:02:03 +000023
Brian Gaeked0fde302003-11-11 22:41:34 +000024namespace llvm {
25
Vikram S. Adve895c0bd2002-11-06 17:02:03 +000026//----------------------------------------------------------------------------
27// Private constants and data
28//----------------------------------------------------------------------------
29
30static RegisterAnalysis<IPModRef>
31Z("ipmodref", "Interprocedural mod/ref analysis");
32
33
34//----------------------------------------------------------------------------
35// class ModRefInfo
36//----------------------------------------------------------------------------
37
Vikram S. Adve9a964282002-11-27 17:37:46 +000038void ModRefInfo::print(std::ostream &O,
39 const std::string& sprefix) const
Vikram S. Adve895c0bd2002-11-06 17:02:03 +000040{
Vikram S. Adve9a964282002-11-27 17:37:46 +000041 O << sprefix << "Modified nodes = " << modNodeSet;
42 O << sprefix << "Referenced nodes = " << refNodeSet;
Vikram S. Adve895c0bd2002-11-06 17:02:03 +000043}
44
45void ModRefInfo::dump() const
46{
47 print(std::cerr);
48}
49
50//----------------------------------------------------------------------------
51// class FunctionModRefInfo
52//----------------------------------------------------------------------------
53
54
55// This constructor computes a node numbering for the TD graph.
56//
57FunctionModRefInfo::FunctionModRefInfo(const Function& func,
Chris Lattner21108082002-11-06 19:07:13 +000058 IPModRef& ipmro,
Vikram S. Adve9a964282002-11-27 17:37:46 +000059 DSGraph* tdgClone)
Chris Lattner21108082002-11-06 19:07:13 +000060 : F(func), IPModRefObj(ipmro),
Vikram S. Adve9a964282002-11-27 17:37:46 +000061 funcTDGraph(tdgClone),
62 funcModRefInfo(tdgClone->getGraphSize())
Vikram S. Adve895c0bd2002-11-06 17:02:03 +000063{
Chris Lattnera84c6812004-02-07 23:57:26 +000064 unsigned i = 0;
65 for (DSGraph::node_iterator NI = funcTDGraph->node_begin(),
66 E = funcTDGraph->node_end(); NI != E; ++NI)
67 NodeIds[*NI] = i++;
Vikram S. Adve895c0bd2002-11-06 17:02:03 +000068}
69
70
71FunctionModRefInfo::~FunctionModRefInfo()
72{
Chris Lattner808a7ae2003-09-20 16:34:13 +000073 for(std::map<const Instruction*, ModRefInfo*>::iterator
Vikram S. Adve895c0bd2002-11-06 17:02:03 +000074 I=callSiteModRefInfo.begin(), E=callSiteModRefInfo.end(); I != E; ++I)
75 delete(I->second);
76
77 // Empty map just to make problems easier to track down
78 callSiteModRefInfo.clear();
Vikram S. Adve9a964282002-11-27 17:37:46 +000079
80 delete funcTDGraph;
Vikram S. Adve895c0bd2002-11-06 17:02:03 +000081}
82
Chris Lattnerfc928242002-11-06 18:38:18 +000083unsigned FunctionModRefInfo::getNodeId(const Value* value) const {
Vikram S. Adve9a964282002-11-27 17:37:46 +000084 return getNodeId(funcTDGraph->getNodeForValue(const_cast<Value*>(value))
Chris Lattnerfc928242002-11-06 18:38:18 +000085 .getNode());
86}
87
88
Vikram S. Adve895c0bd2002-11-06 17:02:03 +000089
Vikram S. Adve895c0bd2002-11-06 17:02:03 +000090// Compute Mod/Ref bit vectors for the entire function.
91// These are simply copies of the Read/Write flags from the nodes of
92// the top-down DS graph.
93//
94void FunctionModRefInfo::computeModRef(const Function &func)
95{
96 // Mark all nodes in the graph that are marked MOD as being mod
97 // and all those marked REF as being ref.
Chris Lattnera84c6812004-02-07 23:57:26 +000098 unsigned i = 0;
99 for (DSGraph::node_iterator NI = funcTDGraph->node_begin(),
100 E = funcTDGraph->node_end(); NI != E; ++NI, ++i) {
101 if ((*NI)->isModified()) funcModRefInfo.setNodeIsMod(i);
102 if ((*NI)->isRead()) funcModRefInfo.setNodeIsRef(i);
103 }
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000104
Vikram S. Adve9a964282002-11-27 17:37:46 +0000105 // Compute the Mod/Ref info for all call sites within the function.
106 // The call sites are recorded in the TD graph.
107 const std::vector<DSCallSite>& callSites = funcTDGraph->getFunctionCalls();
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000108 for (unsigned i = 0, N = callSites.size(); i < N; ++i)
Chris Lattner808a7ae2003-09-20 16:34:13 +0000109 computeModRef(callSites[i].getCallSite());
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000110}
111
Vikram S. Adve9a964282002-11-27 17:37:46 +0000112
Chris Lattner268748a2002-11-06 19:38:43 +0000113// ResolveCallSiteModRefInfo - This method performs the following actions:
114//
115// 1. It clones the top-down graph for the current function
116// 2. It clears all of the mod/ref bits in the cloned graph
117// 3. It then merges the bottom-up graph(s) for the specified call-site into
118// the clone (bringing new mod/ref bits).
Chris Lattner4476ceb2002-11-06 19:59:33 +0000119// 4. It returns the clone, and a mapping of nodes from the original TDGraph to
120// the cloned graph with Mod/Ref info for the callsite.
Chris Lattner268748a2002-11-06 19:38:43 +0000121//
122// NOTE: Because this clones a dsgraph and returns it, the caller is responsible
123// for deleting the returned graph!
Chris Lattnered8e6492002-11-07 07:12:23 +0000124// NOTE: This method may return a null pointer if it is unable to determine the
125// requested information (because the call site calls an external
126// function or we cannot determine the complete set of functions invoked).
Chris Lattner268748a2002-11-06 19:38:43 +0000127//
Chris Lattner808a7ae2003-09-20 16:34:13 +0000128DSGraph* FunctionModRefInfo::ResolveCallSiteModRefInfo(CallSite CS,
Chris Lattner41c04f72003-02-01 04:52:08 +0000129 hash_map<const DSNode*, DSNodeHandle> &NodeMap)
Vikram S. Adve9a964282002-11-27 17:37:46 +0000130{
131 // Step #0: Quick check if we are going to fail anyway: avoid
132 // all the graph cloning and map copying in steps #1 and #2.
133 //
Chris Lattner808a7ae2003-09-20 16:34:13 +0000134 if (const Function *F = CS.getCalledFunction()) {
135 if (F->isExternal())
Vikram S. Adve9a964282002-11-27 17:37:46 +0000136 return 0; // We cannot compute Mod/Ref info for this callsite...
Chris Lattner808a7ae2003-09-20 16:34:13 +0000137 } else {
138 // Eventually, should check here if any callee is external.
139 // For now we are not handling this case anyway.
140 std::cerr << "IP Mod/Ref indirect call not implemented yet: "
141 << "Being conservative\n";
142 return 0; // We cannot compute Mod/Ref info for this callsite...
143 }
Chris Lattner268748a2002-11-06 19:38:43 +0000144
Chris Lattner4476ceb2002-11-06 19:59:33 +0000145 // Step #1: Clone the top-down graph...
Vikram S. Adve9a964282002-11-27 17:37:46 +0000146 DSGraph *Result = new DSGraph(*funcTDGraph, NodeMap);
Chris Lattner4476ceb2002-11-06 19:59:33 +0000147
148 // Step #2: Clear Mod/Ref information...
149 Result->maskNodeTypes(~(DSNode::Modified | DSNode::Read));
150
Chris Lattnered8e6492002-11-07 07:12:23 +0000151 // Step #3: clone the bottom up graphs for the callees into the caller graph
Chris Lattner808a7ae2003-09-20 16:34:13 +0000152 if (Function *F = CS.getCalledFunction())
Vikram S. Adve9a964282002-11-27 17:37:46 +0000153 {
154 assert(!F->isExternal());
155
156 // Build up a DSCallSite for our invocation point here...
157
158 // If the call returns a value, make sure to merge the nodes...
159 DSNodeHandle RetVal;
Chris Lattner808a7ae2003-09-20 16:34:13 +0000160 if (DS::isPointerType(CS.getInstruction()->getType()))
161 RetVal = Result->getNodeForValue(CS.getInstruction());
Vikram S. Adve9a964282002-11-27 17:37:46 +0000162
163 // Populate the arguments list...
164 std::vector<DSNodeHandle> Args;
Chris Lattner808a7ae2003-09-20 16:34:13 +0000165 for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end();
166 I != E; ++I)
167 if (DS::isPointerType((*I)->getType()))
168 Args.push_back(Result->getNodeForValue(*I));
Vikram S. Adve9a964282002-11-27 17:37:46 +0000169
170 // Build the call site...
Chris Lattner02713452003-11-05 05:55:45 +0000171 DSCallSite NCS(CS, RetVal, F, Args);
Vikram S. Adve9a964282002-11-27 17:37:46 +0000172
173 // Perform the merging now of the graph for the callee, which will
174 // come with mod/ref bits set...
Chris Lattner02713452003-11-05 05:55:45 +0000175 Result->mergeInGraph(NCS, *F, IPModRefObj.getBUDSGraph(*F),
Vikram S. Adve9a964282002-11-27 17:37:46 +0000176 DSGraph::StripAllocaBit
177 | DSGraph::DontCloneCallNodes
178 | DSGraph::DontCloneAuxCallNodes);
Chris Lattnered8e6492002-11-07 07:12:23 +0000179 }
Vikram S. Adve9a964282002-11-27 17:37:46 +0000180 else
181 assert(0 && "See error message");
Chris Lattner268748a2002-11-06 19:38:43 +0000182
Vikram S. Adve9a964282002-11-27 17:37:46 +0000183 // Remove dead nodes aggressively to match the caller's original graph.
Chris Lattner381977d2003-01-23 22:06:33 +0000184 Result->removeDeadNodes(DSGraph::KeepUnreachableGlobals);
Chris Lattnered8e6492002-11-07 07:12:23 +0000185
186 // Step #4: Return the clone + the mapping (by ref)
Chris Lattner268748a2002-11-06 19:38:43 +0000187 return Result;
188}
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000189
190// Compute Mod/Ref bit vectors for a single call site.
191// These are copies of the Read/Write flags from the nodes of
Misha Brukman2f2d0652003-09-11 18:14:24 +0000192// the graph produced by clearing all flags in the caller's TD graph
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000193// and then inlining the callee's BU graph into the caller's TD graph.
194//
195void
Chris Lattner808a7ae2003-09-20 16:34:13 +0000196FunctionModRefInfo::computeModRef(CallSite CS)
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000197{
198 // Allocate the mod/ref info for the call site. Bits automatically cleared.
Vikram S. Adve9a964282002-11-27 17:37:46 +0000199 ModRefInfo* callModRefInfo = new ModRefInfo(funcTDGraph->getGraphSize());
Chris Lattner808a7ae2003-09-20 16:34:13 +0000200 callSiteModRefInfo[CS.getInstruction()] = callModRefInfo;
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000201
202 // Get a copy of the graph for the callee with the callee inlined
Chris Lattner41c04f72003-02-01 04:52:08 +0000203 hash_map<const DSNode*, DSNodeHandle> NodeMap;
Chris Lattner808a7ae2003-09-20 16:34:13 +0000204 DSGraph* csgp = ResolveCallSiteModRefInfo(CS, NodeMap);
Vikram S. Adve9a964282002-11-27 17:37:46 +0000205 if (!csgp)
206 { // Callee's side effects are unknown: mark all nodes Mod and Ref.
207 // Eventually this should only mark nodes visible to the callee, i.e.,
208 // exclude stack variables not reachable from any outgoing argument
209 // or any global.
210 callModRefInfo->getModSet().set();
211 callModRefInfo->getRefSet().set();
212 return;
213 }
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000214
215 // For all nodes in the graph, extract the mod/ref information
Chris Lattnera84c6812004-02-07 23:57:26 +0000216 for (DSGraph::node_iterator NI = funcTDGraph->node_begin(),
217 E = funcTDGraph->node_end(); NI != E; ++NI) {
218 DSNode* csgNode = NodeMap[*NI].getNode();
219 assert(csgNode && "Inlined and original graphs do not correspond!");
220 if (csgNode->isModified())
221 callModRefInfo->setNodeIsMod(getNodeId(*NI));
222 if (csgNode->isRead())
223 callModRefInfo->setNodeIsRef(getNodeId(*NI));
224 }
Chris Lattnere83cb532002-11-07 05:00:35 +0000225
226 // Drop nodemap before we delete the graph...
227 NodeMap.clear();
Chris Lattner268748a2002-11-06 19:38:43 +0000228 delete csgp;
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000229}
230
231
Vikram S. Adve9a964282002-11-27 17:37:46 +0000232class DSGraphPrintHelper {
233 const DSGraph& tdGraph;
234 std::vector<std::vector<const Value*> > knownValues; // identifiable objects
235
236public:
237 /*ctor*/ DSGraphPrintHelper(const FunctionModRefInfo& fmrInfo)
238 : tdGraph(fmrInfo.getFuncGraph())
239 {
240 knownValues.resize(tdGraph.getGraphSize());
241
242 // For every identifiable value, save Value pointer in knownValues[i]
Chris Lattner41c04f72003-02-01 04:52:08 +0000243 for (hash_map<Value*, DSNodeHandle>::const_iterator
Vikram S. Adve9a964282002-11-27 17:37:46 +0000244 I = tdGraph.getScalarMap().begin(),
245 E = tdGraph.getScalarMap().end(); I != E; ++I)
246 if (isa<GlobalValue>(I->first) ||
247 isa<Argument>(I->first) ||
248 isa<LoadInst>(I->first) ||
249 isa<AllocaInst>(I->first) ||
250 isa<MallocInst>(I->first))
251 {
252 unsigned nodeId = fmrInfo.getNodeId(I->second.getNode());
253 knownValues[nodeId].push_back(I->first);
254 }
255 }
256
257 void printValuesInBitVec(std::ostream &O, const BitSetVector& bv) const
258 {
259 assert(bv.size() == knownValues.size());
260
261 if (bv.none())
262 { // No bits are set: just say so and return
263 O << "\tNONE.\n";
264 return;
265 }
266
267 if (bv.all())
268 { // All bits are set: just say so and return
269 O << "\tALL GRAPH NODES.\n";
270 return;
271 }
272
273 for (unsigned i=0, N=bv.size(); i < N; ++i)
274 if (bv.test(i))
275 {
276 O << "\tNode# " << i << " : ";
277 if (! knownValues[i].empty())
278 for (unsigned j=0, NV=knownValues[i].size(); j < NV; j++)
279 {
280 const Value* V = knownValues[i][j];
281
282 if (isa<GlobalValue>(V)) O << "(Global) ";
283 else if (isa<Argument>(V)) O << "(Target of FormalParm) ";
284 else if (isa<LoadInst>(V)) O << "(Target of LoadInst ) ";
285 else if (isa<AllocaInst>(V)) O << "(Target of AllocaInst) ";
286 else if (isa<MallocInst>(V)) O << "(Target of MallocInst) ";
287
288 if (V->hasName()) O << V->getName();
289 else if (isa<Instruction>(V)) O << *V;
290 else O << "(Value*) 0x" << (void*) V;
291
292 O << std::string((j < NV-1)? "; " : "\n");
293 }
Chris Lattnera84c6812004-02-07 23:57:26 +0000294#if 0
Vikram S. Adve9a964282002-11-27 17:37:46 +0000295 else
296 tdGraph.getNodes()[i]->print(O, /*graph*/ NULL);
Chris Lattnera84c6812004-02-07 23:57:26 +0000297#endif
Vikram S. Adve9a964282002-11-27 17:37:46 +0000298 }
299 }
300};
301
302
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000303// Print the results of the pass.
304// Currently this just prints bit-vectors and is not very readable.
305//
306void FunctionModRefInfo::print(std::ostream &O) const
307{
Vikram S. Adve9a964282002-11-27 17:37:46 +0000308 DSGraphPrintHelper DPH(*this);
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000309
Vikram S. Adve9a964282002-11-27 17:37:46 +0000310 O << "========== Mod/ref information for function "
311 << F.getName() << "========== \n\n";
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000312
Vikram S. Adve9a964282002-11-27 17:37:46 +0000313 // First: Print Globals and Locals modified anywhere in the function.
314 //
315 O << " -----Mod/Ref in the body of function " << F.getName()<< ":\n";
316
317 O << " --Objects modified in the function body:\n";
318 DPH.printValuesInBitVec(O, funcModRefInfo.getModSet());
319
320 O << " --Objects referenced in the function body:\n";
321 DPH.printValuesInBitVec(O, funcModRefInfo.getRefSet());
322
323 O << " --Mod and Ref vectors for the nodes listed above:\n";
324 funcModRefInfo.print(O, "\t");
325
326 O << "\n";
327
328 // Second: Print Globals and Locals modified at each call site in function
329 //
Chris Lattner808a7ae2003-09-20 16:34:13 +0000330 for (std::map<const Instruction *, ModRefInfo*>::const_iterator
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000331 CI = callSiteModRefInfo.begin(), CE = callSiteModRefInfo.end();
332 CI != CE; ++CI)
333 {
Chris Lattnerf92791a2004-07-15 02:26:49 +0000334 O << " ----Mod/Ref information for call site\n" << *CI->first;
Vikram S. Adve9a964282002-11-27 17:37:46 +0000335
336 O << " --Objects modified at call site:\n";
337 DPH.printValuesInBitVec(O, CI->second->getModSet());
338
339 O << " --Objects referenced at call site:\n";
340 DPH.printValuesInBitVec(O, CI->second->getRefSet());
341
342 O << " --Mod and Ref vectors for the nodes listed above:\n";
343 CI->second->print(O, "\t");
344
345 O << "\n";
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000346 }
347
348 O << "\n";
349}
350
351void FunctionModRefInfo::dump() const
352{
353 print(std::cerr);
354}
355
356
357//----------------------------------------------------------------------------
358// class IPModRef: An interprocedural pass that computes IP Mod/Ref info.
359//----------------------------------------------------------------------------
360
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000361// Free the FunctionModRefInfo objects cached in funcToModRefInfoMap.
362//
363void IPModRef::releaseMemory()
364{
365 for(std::map<const Function*, FunctionModRefInfo*>::iterator
366 I=funcToModRefInfoMap.begin(), E=funcToModRefInfoMap.end(); I != E; ++I)
367 delete(I->second);
368
369 // Clear map so memory is not re-released if we are called again
370 funcToModRefInfoMap.clear();
371}
372
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000373// Run the "interprocedural" pass on each function. This needs to do
374// NO real interprocedural work because all that has been done the
375// data structure analysis.
376//
377bool IPModRef::run(Module &theModule)
378{
379 M = &theModule;
Chris Lattnere83cb532002-11-07 05:00:35 +0000380
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000381 for (Module::const_iterator FI = M->begin(), FE = M->end(); FI != FE; ++FI)
382 if (! FI->isExternal())
383 getFuncInfo(*FI, /*computeIfMissing*/ true);
384 return true;
385}
386
387
Chris Lattnerfc928242002-11-06 18:38:18 +0000388FunctionModRefInfo& IPModRef::getFuncInfo(const Function& func,
389 bool computeIfMissing)
390{
391 FunctionModRefInfo*& funcInfo = funcToModRefInfoMap[&func];
392 assert (funcInfo != NULL || computeIfMissing);
Chris Lattner21108082002-11-06 19:07:13 +0000393 if (funcInfo == NULL)
Vikram S. Adve9a964282002-11-27 17:37:46 +0000394 { // Create a new FunctionModRefInfo object.
395 // Clone the top-down graph and remove any dead nodes first, because
396 // otherwise original and merged graphs will not match.
397 // The memory for this graph clone will be freed by FunctionModRefInfo.
398 DSGraph* funcTDGraph =
399 new DSGraph(getAnalysis<TDDataStructures>().getDSGraph(func));
Chris Lattner381977d2003-01-23 22:06:33 +0000400 funcTDGraph->removeDeadNodes(DSGraph::KeepUnreachableGlobals);
Vikram S. Adve9a964282002-11-27 17:37:46 +0000401
402 funcInfo = new FunctionModRefInfo(func, *this, funcTDGraph); //auto-insert
403 funcInfo->computeModRef(func); // computes the mod/ref info
Chris Lattnerfc928242002-11-06 18:38:18 +0000404 }
405 return *funcInfo;
406}
407
Chris Lattnered8e6492002-11-07 07:12:23 +0000408/// getBUDSGraph - This method returns the BU data structure graph for F through
409/// the use of the BUDataStructures object.
410///
411const DSGraph &IPModRef::getBUDSGraph(const Function &F) {
412 return getAnalysis<BUDataStructures>().getDSGraph(F);
413}
414
415
Chris Lattnerfc928242002-11-06 18:38:18 +0000416// getAnalysisUsage - This pass requires top-down data structure graphs.
417// It modifies nothing.
418//
419void IPModRef::getAnalysisUsage(AnalysisUsage &AU) const {
420 AU.setPreservesAll();
421 AU.addRequired<LocalDataStructures>();
Chris Lattner21108082002-11-06 19:07:13 +0000422 AU.addRequired<BUDataStructures>();
Chris Lattnerfc928242002-11-06 18:38:18 +0000423 AU.addRequired<TDDataStructures>();
424}
425
426
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000427void IPModRef::print(std::ostream &O) const
428{
Vikram S. Adve9a964282002-11-27 17:37:46 +0000429 O << "\nRESULTS OF INTERPROCEDURAL MOD/REF ANALYSIS:\n\n";
Vikram S. Adve895c0bd2002-11-06 17:02:03 +0000430
431 for (std::map<const Function*, FunctionModRefInfo*>::const_iterator
432 mapI = funcToModRefInfoMap.begin(), mapE = funcToModRefInfoMap.end();
433 mapI != mapE; ++mapI)
434 mapI->second->print(O);
435
436 O << "\n";
437}
438
439
440void IPModRef::dump() const
441{
442 print(std::cerr);
443}
Brian Gaeked0fde302003-11-11 22:41:34 +0000444
445} // End llvm namespace