diff options
author | Chris Lattner <sabre@nondot.org> | 2002-04-27 02:27:48 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-04-27 02:27:48 +0000 |
commit | 2aa51be083ccc8872caa770d13e9e06fd7237eea (patch) | |
tree | beed31f41aef8b47c6ba12abc62af9d700991f39 /lib/Analysis/DataStructure | |
parent | 12be9749d60c647a804fa6f057d7c1cf20fd3714 (diff) | |
download | external_llvm-2aa51be083ccc8872caa770d13e9e06fd7237eea.zip external_llvm-2aa51be083ccc8872caa770d13e9e06fd7237eea.tar.gz external_llvm-2aa51be083ccc8872caa770d13e9e06fd7237eea.tar.bz2 |
Allow the inline limit to be modified on the commandline for debugging
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2327 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure')
-rw-r--r-- | lib/Analysis/DataStructure/ComputeClosure.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Analysis/DataStructure/ComputeClosure.cpp b/lib/Analysis/DataStructure/ComputeClosure.cpp index 4327baa..501fd0c 100644 --- a/lib/Analysis/DataStructure/ComputeClosure.cpp +++ b/lib/Analysis/DataStructure/ComputeClosure.cpp @@ -86,6 +86,8 @@ static bool isResolvableCallNode(CallDSNode *CN) { return false; } +#include "Support/CommandLine.h" +static cl::Int InlineLimit("dsinlinelimit", "Max number of graphs to inline when computing ds closure", cl::Hidden, 100); // computeClosure - Replace all of the resolvable call nodes with the contents // of their corresponding method data structure graph... @@ -107,8 +109,11 @@ void FunctionDSGraph::computeClosure(const DataStructure &DS) { GlobalDSNode *FGDN = cast<GlobalDSNode>(CN->getArgValues(0)[0].Node); Function *F = cast<Function>(FGDN->getGlobal()); - if (NumInlines++ == 100) { // CUTE hack huh? + if (NumInlines++ == InlineLimit) { // CUTE hack huh? cerr << "Infinite (?) recursion halted\n"; + cerr << "Not inlining: " << F->getName() << "\n"; + CN->dump(); + return; } |