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

Side by Side Diff: runtime/vm/flow_graph.cc

Issue 2466643002: AOT: Enable branch merging for checked smi comparisons (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/constant_propagator.cc ('k') | runtime/vm/il_printer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/flow_graph.h" 5 #include "vm/flow_graph.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/flow_graph_builder.h" 9 #include "vm/flow_graph_builder.h"
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
2007 disallow_licm(); 2007 disallow_licm();
2008 for (BlockIterator block_it = reverse_postorder_iterator(); 2008 for (BlockIterator block_it = reverse_postorder_iterator();
2009 !block_it.Done(); 2009 !block_it.Done();
2010 block_it.Advance()) { 2010 block_it.Advance()) {
2011 BlockEntryInstr* block = block_it.Current(); 2011 BlockEntryInstr* block = block_it.Current();
2012 if (!block->IsCatchBlockEntry()) { 2012 if (!block->IsCatchBlockEntry()) {
2013 block->RemoveEnvironment(); 2013 block->RemoveEnvironment();
2014 } 2014 }
2015 for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) { 2015 for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
2016 Instruction* current = it.Current(); 2016 Instruction* current = it.Current();
2017 if (!current->CanDeoptimize()) { 2017 if (!current->CanDeoptimize() &&
2018 (!current->MayThrow() || !current->GetBlock()->InsideTryBlock())) {
2019 // Instructions that can throw need an environment for optimized
2020 // try-catch.
2018 // TODO(srdjan): --source-lines needs deopt environments to get at 2021 // TODO(srdjan): --source-lines needs deopt environments to get at
2019 // the code for this instruction, however, leaving the environment 2022 // the code for this instruction, however, leaving the environment
2020 // changes code. 2023 // changes code.
2021 current->RemoveEnvironment(); 2024 current->RemoveEnvironment();
2022 } 2025 }
2023 } 2026 }
2024 } 2027 }
2025 } 2028 }
2026 2029
2027 2030
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2310 ExtractNthOutputInstr* extract = 2313 ExtractNthOutputInstr* extract =
2311 new(Z) ExtractNthOutputInstr(new(Z) Value(instr), index, rep, cid); 2314 new(Z) ExtractNthOutputInstr(new(Z) Value(instr), index, rep, cid);
2312 instr->ReplaceUsesWith(extract); 2315 instr->ReplaceUsesWith(extract);
2313 InsertAfter(instr, extract, NULL, FlowGraph::kValue); 2316 InsertAfter(instr, extract, NULL, FlowGraph::kValue);
2314 } 2317 }
2315 2318
2316 2319
2317 2320
2318 2321
2319 } // namespace dart 2322 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/constant_propagator.cc ('k') | runtime/vm/il_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698