[llvm-commits] CVS: llvm/lib/Analysis/IPA/IPModRef.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Nov 6 23:01:01 PST 2002
Changes in directory llvm/lib/Analysis/IPA:
IPModRef.cpp updated: 1.5 -> 1.6
---
Log message:
Fix problem with dangling referrers
---
Diffs of the changes:
Index: llvm/lib/Analysis/IPA/IPModRef.cpp
diff -u llvm/lib/Analysis/IPA/IPModRef.cpp:1.5 llvm/lib/Analysis/IPA/IPModRef.cpp:1.6
--- llvm/lib/Analysis/IPA/IPModRef.cpp:1.5 Wed Nov 6 13:59:33 2002
+++ llvm/lib/Analysis/IPA/IPModRef.cpp Wed Nov 6 23:00:35 2002
@@ -158,6 +158,9 @@
if (csgNodes[i]->isRead())
callModRefInfo->setNodeIsRef(getNodeId(origNodes[i]));
}
+
+ // Drop nodemap before we delete the graph...
+ NodeMap.clear();
delete csgp;
}
@@ -194,7 +197,6 @@
// class IPModRef: An interprocedural pass that computes IP Mod/Ref info.
//----------------------------------------------------------------------------
-
// Free the FunctionModRefInfo objects cached in funcToModRefInfoMap.
//
void IPModRef::releaseMemory()
@@ -215,6 +217,7 @@
bool IPModRef::run(Module &theModule)
{
M = &theModule;
+
for (Module::const_iterator FI = M->begin(), FE = M->end(); FI != FE; ++FI)
if (! FI->isExternal())
getFuncInfo(*FI, /*computeIfMissing*/ true);
More information about the llvm-commits
mailing list