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

Unified Diff: runtime/vm/code_generator.cc

Issue 10559035: Implement a simple register allocator that tries to keep instruction results in registers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index 725858bc713d7946dc32cfd15bbd7e4fc34e102f..ef724d289ba89b3ff30e7139f0b84e90bfd3f018 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -32,6 +32,7 @@ DECLARE_FLAG(bool, enable_type_checks);
DECLARE_FLAG(bool, trace_type_checks);
DECLARE_FLAG(bool, report_usage_count);
DECLARE_FLAG(int, deoptimization_counter_threshold);
+DEFINE_FLAG(charp, optimization_filter, NULL, "Optimize only named function");
bool CodeGenerator::CanOptimize() {
@@ -1341,6 +1342,13 @@ DEFINE_RUNTIME_ENTRY(OptimizeInvokedFunction, 1) {
function.set_usage_counter(kLowInvocationCount);
return;
}
+ if ((FLAG_optimization_filter != NULL) &&
+ (strncmp(function.ToFullyQualifiedCString(),
+ FLAG_optimization_filter,
+ strlen(FLAG_optimization_filter)) != 0)) {
+ function.set_usage_counter(kLowInvocationCount);
srdjan 2012/06/18 16:33:20 Why not doing this in the compiler and "Bailout" f
Vyacheslav Egorov (Google) 2012/06/18 17:51:16 I don't see any profit in bailing out so late in t
+ return;
+ }
if (function.is_optimizable()) {
ASSERT(!function.HasOptimizedCode());
const Code& unoptimized_code = Code::Handle(function.unoptimized_code());

Powered by Google App Engine
This is Rietveld 408576698