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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 1119013003: Add --noopt flag that sets all kind of flags to make unoptimzied code as fast as possible (and not … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 months 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
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
===================================================================
--- runtime/vm/flow_graph_compiler.cc (revision 45469)
+++ runtime/vm/flow_graph_compiler.cc (working copy)
@@ -27,6 +27,8 @@
namespace dart {
+DEFINE_FLAG(bool, always_megamorphic_calls, false,
+ "Instance call always as megamorphic.");
DEFINE_FLAG(bool, trace_inlining_intervals, false,
"Inlining interval diagnostics");
DEFINE_FLAG(bool, enable_simd_inline, true,
@@ -52,9 +54,27 @@
DECLARE_FLAG(int, stacktrace_every);
DECLARE_FLAG(charp, stacktrace_filter);
DECLARE_FLAG(bool, use_cha);
+DECLARE_FLAG(bool, use_field_guards);
DECLARE_FLAG(bool, use_osr);
DECLARE_FLAG(bool, warn_on_javascript_compatibility);
+static void NooptModeHandler(bool value) {
+ if (value) {
+ FLAG_always_megamorphic_calls = value;
+ FLAG_optimization_counter_threshold = -1;
+ FLAG_use_field_guards = false;
+ FLAG_use_osr = false;
+ }
+}
+
+
+// --noopt disables optimizer and tunes unoptimized code to run as fast
+// as possible.
+DEFINE_FLAG_HANDLER(NooptModeHandler,
+ noopt,
+ "Run fast unoptimized code only.");
+
+
// Assign locations to incoming arguments, i.e., values pushed above spill slots
// with PushArgument. Recursively allocates from outermost to innermost
// environment.
@@ -983,6 +1003,11 @@
intptr_t argument_count,
LocationSummary* locs,
const ICData& ic_data) {
+ if (FLAG_always_megamorphic_calls) {
+ EmitMegamorphicInstanceCall(ic_data, argument_count,
+ deopt_id, token_pos, locs);
+ return;
+ }
ASSERT(!ic_data.IsNull());
uword label_address = 0;
StubCode* stub_code = isolate()->stub_code();
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698