aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-13 18:48:11 +0000
committerChris Lattner <sabre@nondot.org>2003-11-13 18:48:11 +0000
commita366c98077d49d2df7e047d204a097c2c94be9c0 (patch)
treeaae58278c87adda462be9267b0aaf109d0737a8d /lib/Analysis
parentcf95d4fe42b4f8220d4365a8730d1f07b3ff231e (diff)
downloadexternal_llvm-a366c98077d49d2df7e047d204a097c2c94be9c0.zip
external_llvm-a366c98077d49d2df7e047d204a097c2c94be9c0.tar.gz
external_llvm-a366c98077d49d2df7e047d204a097c2c94be9c0.tar.bz2
Trying to get the dsgraph for an external function is bad for DSA's health
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9979 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DataStructure/CompleteBottomUp.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/Analysis/DataStructure/CompleteBottomUp.cpp b/lib/Analysis/DataStructure/CompleteBottomUp.cpp
index 326a794..8695537 100644
--- a/lib/Analysis/DataStructure/CompleteBottomUp.cpp
+++ b/lib/Analysis/DataStructure/CompleteBottomUp.cpp
@@ -116,17 +116,18 @@ unsigned CompleteBUDataStructures::calculateSCCGraphs(DSGraph &FG,
// Loop over all of the actually called functions...
ActualCalleesTy::iterator I, E;
- for (tie(I, E) = ActualCallees.equal_range(Call); I != E; ++I) {
- DSGraph &Callee = getOrCreateGraph(*I->second);
- unsigned M;
- // Have we visited the destination function yet?
- hash_map<DSGraph*, unsigned>::iterator It = ValMap.find(&Callee);
- if (It == ValMap.end()) // No, visit it now.
- M = calculateSCCGraphs(Callee, Stack, NextID, ValMap);
- else // Yes, get it's number.
- M = It->second;
- if (M < Min) Min = M;
- }
+ for (tie(I, E) = ActualCallees.equal_range(Call); I != E; ++I)
+ if (!I->second->isExternal()) {
+ DSGraph &Callee = getOrCreateGraph(*I->second);
+ unsigned M;
+ // Have we visited the destination function yet?
+ hash_map<DSGraph*, unsigned>::iterator It = ValMap.find(&Callee);
+ if (It == ValMap.end()) // No, visit it now.
+ M = calculateSCCGraphs(Callee, Stack, NextID, ValMap);
+ else // Yes, get it's number.
+ M = It->second;
+ if (M < Min) Min = M;
+ }
}
assert(ValMap[&FG] == MyID && "SCC construction assumption wrong!");