From 2aa51be083ccc8872caa770d13e9e06fd7237eea Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 27 Apr 2002 02:27:48 +0000 Subject: 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 --- lib/Analysis/DataStructure/ComputeClosure.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') 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(CN->getArgValues(0)[0].Node); Function *F = cast(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; } -- cgit v1.1