mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-04 01:42:09 +00:00
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
This commit is contained in:
parent
cf95d4fe42
commit
a366c98077
@ -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!");
|
||||
|
Loading…
Reference in New Issue
Block a user