From 31d3f671be9019cda23ceea70f6d65569cb8dfc2 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 31 Oct 2004 23:41:26 +0000 Subject: * Do not refer to ActualCallees in CBU, when we can do it locally. * *DO NOT* print CBU graphs when asked to print our own. This is just FREAKING confusing and misleading: it's better to not print anything. * Simplify and clean up some code * Add some more paranoia assertion checking code that I found to track down this bug: * Fix a nasty bug that was causing us to crash on Prolangs-C++/objects, where we were missing processing some graphs. This hunk is the bugfix: - if (!I->isExternal() && !FoldedGraphsMap.count(I)) + if (!I->isExternal() && !ValMap.count(I)) urg! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17386 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/DataStructure/EquivClassGraphs.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'include/llvm') diff --git a/include/llvm/Analysis/DataStructure/EquivClassGraphs.h b/include/llvm/Analysis/DataStructure/EquivClassGraphs.h index a46da41..8a4b9e2 100644 --- a/include/llvm/Analysis/DataStructure/EquivClassGraphs.h +++ b/include/llvm/Analysis/DataStructure/EquivClassGraphs.h @@ -52,6 +52,10 @@ namespace PA { // FoldedGraphsMap, one graph for each function hash_map FoldedGraphsMap; + + /// ActualCallees - The actual functions callable from indirect call sites. + /// + hash_multimap ActualCallees; // Equivalence class where functions that can potentially be called via the // same function pointer are in the same class. @@ -122,9 +126,9 @@ namespace PA { return *GlobalsGraph; } - typedef llvm::BUDataStructures::ActualCalleesTy ActualCalleesTy; + typedef hash_multimap ActualCalleesTy; const ActualCalleesTy &getActualCallees() const { - return CBU->getActualCallees(); + return ActualCallees; } virtual void getAnalysisUsage(AnalysisUsage &AU) const { @@ -134,7 +138,7 @@ namespace PA { /// print - Print out the analysis results... /// - void print(std::ostream &O, const Module *M) const { CBU->print(O, M); } + void print(std::ostream &O, const Module *M) const {} private: void buildIndirectFunctionSets(Module &M); -- cgit v1.1