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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 226303002: Begin implementing flag --deoptimize-filter=FUNC for ia32. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 6cfea3213dfc31132f3c50e87f5784277149e6cb..5ba1ab79c7963a5158cdf53abdb5b5d82311a500 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -35,6 +35,8 @@ DECLARE_FLAG(bool, use_cha);
DECLARE_FLAG(bool, use_osr);
DEFINE_FLAG(bool, enable_simd_inline, true,
"Enable inlining of SIMD related method calls.");
+DEFINE_FLAG(charp, deoptimize_filter, NULL,
+ "Force deoptimization in named function");
// Assign locations to incoming arguments, i.e., values pushed above spill slots
// with PushArgument. Recursively allocates from outermost to innermost
@@ -169,6 +171,14 @@ bool FlowGraphCompiler::CanOSRFunction() const {
}
+bool FlowGraphCompiler::ShouldDeoptimizeFunction() const {
+ return (is_optimizing() &&
+ (FLAG_deoptimize_filter != NULL) &&
+ (strstr(parsed_function().function().ToFullyQualifiedCString(),
+ FLAG_deoptimize_filter) != NULL));
+}
+
+
static bool IsEmptyBlock(BlockEntryInstr* block) {
return !block->HasParallelMove() &&
block->next()->IsGoto() &&

Powered by Google App Engine
This is Rietveld 408576698