Bail out the LiveVariables analysis when the CFG is very large, as
we are encountering some scalability issues with memory usage. The appropriate long term fix is to make the analysis more scalable, but this will at least prevent the analyzer swapping when analyzing very large functions. llvm-svn: 159578
This commit is contained in:
@@ -486,6 +486,11 @@ LiveVariables::computeLiveness(AnalysisDeclContext &AC,
|
||||
if (!cfg)
|
||||
return 0;
|
||||
|
||||
// The analysis currently has scalability issues for very large CFGs.
|
||||
// Bail out if it looks too large.
|
||||
if (cfg->getNumBlockIDs() > 300000)
|
||||
return 0;
|
||||
|
||||
LiveVariablesImpl *LV = new LiveVariablesImpl(AC, killAtAssign);
|
||||
|
||||
// Construct the dataflow worklist. Enqueue the exit block as the
|
||||
|
||||
Reference in New Issue
Block a user