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

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

Issue 2466643002: AOT: Enable branch merging for checked smi comparisons (Closed)
Patch Set: ported to all architectures 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
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() && !current->MayThrow()) {
Vyacheslav Egorov (Google) 2016/11/01 13:19:06 BranchInstr::CanDeoptimize(...) has some special c
Florian Schneider 2016/11/01 15:26:25 I'll add a check if the instruction is inside a tr
2018 // TODO(srdjan): --source-lines needs deopt environments to get at 2018 // TODO(srdjan): --source-lines needs deopt environments to get at
2019 // the code for this instruction, however, leaving the environment 2019 // the code for this instruction, however, leaving the environment
2020 // changes code. 2020 // changes code.
2021 current->RemoveEnvironment(); 2021 current->RemoveEnvironment();
2022 } 2022 }
2023 } 2023 }
2024 } 2024 }
2025 } 2025 }
2026 2026
2027 2027
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
2310 ExtractNthOutputInstr* extract = 2310 ExtractNthOutputInstr* extract =
2311 new(Z) ExtractNthOutputInstr(new(Z) Value(instr), index, rep, cid); 2311 new(Z) ExtractNthOutputInstr(new(Z) Value(instr), index, rep, cid);
2312 instr->ReplaceUsesWith(extract); 2312 instr->ReplaceUsesWith(extract);
2313 InsertAfter(instr, extract, NULL, FlowGraph::kValue); 2313 InsertAfter(instr, extract, NULL, FlowGraph::kValue);
2314 } 2314 }
2315 2315
2316 2316
2317 2317
2318 2318
2319 } // namespace dart 2319 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698