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

Unified Diff: runtime/vm/flow_graph_allocator.cc

Issue 2072823002: VM: Fix frame size computation for optimized DBC code (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_dbc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_allocator.cc
diff --git a/runtime/vm/flow_graph_allocator.cc b/runtime/vm/flow_graph_allocator.cc
index 4778d7a79642f465bf4e7b4afb9590679d607dfa..009e500bb88e655a793046269450829bf7a62c01 100644
--- a/runtime/vm/flow_graph_allocator.cc
+++ b/runtime/vm/flow_graph_allocator.cc
@@ -441,6 +441,10 @@ void FlowGraphAllocator::BlockLocation(Location loc,
intptr_t to) {
if (loc.IsRegister()) {
BlockRegisterLocation(loc, from, to, blocked_cpu_registers_, cpu_regs_);
+#if defined(TARGET_ARCH_DBC)
+ last_used_register_ = Utils::Maximum(last_used_register_,
+ loc.register_code());
+#endif
} else if (loc.IsFpuRegister()) {
BlockRegisterLocation(loc, from, to, blocked_fpu_registers_, fpu_regs_);
} else {
@@ -2742,10 +2746,6 @@ void FlowGraphAllocator::PrepareForAllocation(
registers_[reg]->Add(range);
}
}
-
-#if defined(TARGET_ARCH_DBC)
- last_used_register_ = -1;
-#endif
}
@@ -3010,6 +3010,10 @@ void FlowGraphAllocator::AllocateRegisters() {
DiscoverLoops();
+#if defined(TARGET_ARCH_DBC)
+ last_used_register_ = -1;
+#endif
+
BuildLiveRanges();
if (FLAG_print_ssa_liveranges) {
@@ -3038,6 +3042,7 @@ void FlowGraphAllocator::AllocateRegisters() {
AllocateUnallocatedRanges();
#if defined(TARGET_ARCH_DBC)
const intptr_t last_used_cpu_register = last_used_register_;
+ last_used_register_ = -1;
#endif
cpu_spill_slot_count_ = spill_slots_.length();
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698