Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: runtime/vm/flow_graph_range_analysis.cc

Issue 1423063005: VM: Speculative inlining in precompiled code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add retry Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/flow_graph_range_analysis.cc
diff --git a/runtime/vm/flow_graph_range_analysis.cc b/runtime/vm/flow_graph_range_analysis.cc
index 4e3eaaf8ed055943094297f7eb453d385267d73e..cfa01036854d145f060ea31eb0524b360886882f 100644
--- a/runtime/vm/flow_graph_range_analysis.cc
+++ b/runtime/vm/flow_graph_range_analysis.cc
@@ -5,6 +5,7 @@
#include "vm/flow_graph_range_analysis.h"
#include "vm/bit_vector.h"
+#include "vm/compiler.h"
#include "vm/il_printer.h"
namespace dart {
@@ -1529,7 +1530,8 @@ void RangeAnalysis::EliminateRedundantBoundsChecks() {
if (FLAG_array_bounds_check_elimination) {
const Function& function = flow_graph_->function();
const bool try_generalization =
- function.allows_bounds_check_generalization();
+ function.allows_bounds_check_generalization() &&
+ !Compiler::always_optimize();
srdjan 2015/11/17 17:35:24 Please add a comment why we should not try_general
Florian Schneider 2015/11/17 19:38:57 Done.
BoundsCheckGeneralizer generalizer(this, flow_graph_);

Powered by Google App Engine
This is Rietveld 408576698