aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-04 19:21:06 +0000
committerChris Lattner <sabre@nondot.org>2002-04-04 19:21:06 +0000
commitcc0c1b2e1845d30fb6da732a70cb9ad39eda5b85 (patch)
tree5fdf664d7ea1afc60d09a37907b7d71b5c791a6d /lib/Analysis
parent744088c5e0f371824eeaa6835fc2e65cc7652edf (diff)
* Eliminate commented out code
* Do not demand a shadow node when resolving * Raise arbitrary inline limit git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2100 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DataStructure/ComputeClosure.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/Analysis/DataStructure/ComputeClosure.cpp b/lib/Analysis/DataStructure/ComputeClosure.cpp
index 6466f0ba1a..989f9bbcb9 100644
--- a/lib/Analysis/DataStructure/ComputeClosure.cpp
+++ b/lib/Analysis/DataStructure/ComputeClosure.cpp
@@ -29,8 +29,6 @@ static void copyEdgesFromTo(PointerVal Val, DSNode *N) {
if (PVS[j].Node == Val.Node && PVS[j].Index >= ValIdx &&
PVS[j].Index < ValIdx+NLinks)
PVS.add(PointerVal(N, PVS[j].Index-ValIdx));
-
- //PVS.add(PointerVal(N, Val.Index)); // TODO: support index
}
}
}
@@ -39,21 +37,17 @@ static void ResolveNodesTo(const PointerVal &FromPtr,
const PointerValSet &ToVals) {
assert(FromPtr.Index == 0 &&
"Resolved node return pointer should be index 0!");
- assert(isa<ShadowDSNode>(FromPtr.Node) &&
- "Resolved node should be a shadow!");
- ShadowDSNode *Shadow = cast<ShadowDSNode>(FromPtr.Node);
- assert(Shadow->isCriticalNode() && "Shadow node should be a critical node!");
- Shadow->resetCriticalMark();
+ DSNode *N = FromPtr.Node;
// Make everything that pointed to the shadow node also point to the values in
// ToVals...
//
for (unsigned i = 0, e = ToVals.size(); i != e; ++i)
- copyEdgesFromTo(ToVals[i], Shadow);
+ copyEdgesFromTo(ToVals[i], N);
// Make everything that pointed to the shadow node now also point to the
// values it is equivalent to...
- const vector<PointerValSet*> &PVSToUpdate(Shadow->getReferrers());
+ const vector<PointerValSet*> &PVSToUpdate(N->getReferrers());
for (unsigned i = 0, e = PVSToUpdate.size(); i != e; ++i)
PVSToUpdate[i]->add(ToVals);
}
@@ -108,7 +102,7 @@ void FunctionDSGraph::computeClosure(const DataStructure &DS) {
CallDSNode *CN = *NI;
Function *F = CN->getCall()->getCalledFunction();
- if (NumInlines++ == 40) { // CUTE hack huh?
+ if (NumInlines++ == 100) { // CUTE hack huh?
cerr << "Infinite (?) recursion halted\n";
return;
}