| Index: runtime/vm/redundancy_elimination.cc
|
| diff --git a/runtime/vm/redundancy_elimination.cc b/runtime/vm/redundancy_elimination.cc
|
| index 32fe07be391a6001033337bcfd889b56779c177e..f7bc9b77c655b6f49491380f6c4680d4f592d191 100644
|
| --- a/runtime/vm/redundancy_elimination.cc
|
| +++ b/runtime/vm/redundancy_elimination.cc
|
| @@ -1549,6 +1549,15 @@ class LoadOptimizer : public ValueObject {
|
| FlowGraphPrinter::PrintGraph("Before LoadOptimizer", graph);
|
| }
|
|
|
| + // For now, bail out for large functions to avoid OOM situations.
|
| + // TODO(fschneider): Fix the memory consumption issue.
|
| + intptr_t function_length =
|
| + graph->function().end_token_pos().Pos() -
|
| + graph->function().token_pos().Pos();
|
| + if (function_length >= FLAG_huge_method_cutoff_in_tokens) {
|
| + return false;
|
| + }
|
| +
|
| DirectChainedHashMap<PointerKeyValueTrait<Place> > map;
|
| AliasedSet* aliased_set = NumberPlaces(graph, &map, kOptimizeLoads);
|
| if ((aliased_set != NULL) && !aliased_set->IsEmpty()) {
|
| @@ -2514,6 +2523,15 @@ class StoreOptimizer : public LivenessAnalysis {
|
| FlowGraphPrinter::PrintGraph("Before StoreOptimizer", graph);
|
| }
|
|
|
| + // For now, bail out for large functions to avoid OOM situations.
|
| + // TODO(fschneider): Fix the memory consumption issue.
|
| + intptr_t function_length =
|
| + graph->function().end_token_pos().Pos() -
|
| + graph->function().token_pos().Pos();
|
| + if (function_length >= FLAG_huge_method_cutoff_in_tokens) {
|
| + return;
|
| + }
|
| +
|
| DirectChainedHashMap<PointerKeyValueTrait<Place> > map;
|
| AliasedSet* aliased_set = NumberPlaces(graph, &map, kOptimizeStores);
|
| if ((aliased_set != NULL) && !aliased_set->IsEmpty()) {
|
|
|