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

Unified Diff: vm/flow_graph_allocator.cc

Issue 10829098: Eliminate unnecessary deoptimization environments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 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: vm/flow_graph_allocator.cc
===================================================================
--- vm/flow_graph_allocator.cc (revision 10050)
+++ vm/flow_graph_allocator.cc (working copy)
@@ -82,6 +82,17 @@
}
+void FlowGraphAllocator::EliminateEnvironmentUses() {
+ for (intptr_t i = 0; i < block_order_.length(); ++i) {
+ BlockEntryInstr* block = block_order_[i];
+ for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
+ Instruction* current = it.Current();
+ if (!current->CanDeoptimize()) current->set_env(NULL);
+ }
+ }
+}
+
+
void FlowGraphAllocator::ComputeInitialSets() {
const intptr_t block_count = postorder_.length();
for (intptr_t i = 0; i < block_count; i++) {
@@ -1654,6 +1665,8 @@
void FlowGraphAllocator::AllocateRegisters() {
+ EliminateEnvironmentUses();
+
AnalyzeLiveness();
BuildLiveRanges();
« no previous file with comments | « vm/flow_graph_allocator.h ('k') | vm/flow_graph_builder.cc » ('j') | vm/flow_graph_compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698