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

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

Issue 1922953002: Revert "VM: Improve phi-elimination to improve code inside of try-catch." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/redundancy_elimination.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/constant_propagator.h" 10 #include "vm/constant_propagator.h"
(...skipping 3502 matching lines...) Expand 10 before | Expand all | Expand 10 after
3513 ASSERT(InputCount() > 1); 3513 ASSERT(InputCount() > 1);
3514 Definition* first = InputAt(0)->definition(); 3514 Definition* first = InputAt(0)->definition();
3515 for (intptr_t i = 1; i < InputCount(); ++i) { 3515 for (intptr_t i = 1; i < InputCount(); ++i) {
3516 Definition* def = InputAt(i)->definition(); 3516 Definition* def = InputAt(i)->definition();
3517 if (def != first) return false; 3517 if (def != first) return false;
3518 } 3518 }
3519 return true; 3519 return true;
3520 } 3520 }
3521 3521
3522 3522
3523 bool PhiInstr::HasReplacement(Definition** replacement) const {
3524 ASSERT(InputCount() > 1);
3525 ASSERT(!IsRedundant());
3526 // At least >=1 inputs are different from 'this': Check for
3527 // v <- phi (v, v, ..., r, v, ..., v)
3528 // where r is the replacement.
3529 intptr_t i = 0;
3530 while (InputAt(i)->definition() == this) ++i;
3531 *replacement = InputAt(i)->definition();
3532 while (++i < InputCount()) {
3533 if (InputAt(i)->definition() != this) return false;
3534 }
3535 return true;
3536 }
3537
3538
3539 bool CheckArrayBoundInstr::IsFixedLengthArrayType(intptr_t cid) { 3523 bool CheckArrayBoundInstr::IsFixedLengthArrayType(intptr_t cid) {
3540 return LoadFieldInstr::IsFixedLengthArrayCid(cid); 3524 return LoadFieldInstr::IsFixedLengthArrayCid(cid);
3541 } 3525 }
3542 3526
3543 3527
3544 Instruction* CheckArrayBoundInstr::Canonicalize(FlowGraph* flow_graph) { 3528 Instruction* CheckArrayBoundInstr::Canonicalize(FlowGraph* flow_graph) {
3545 return IsRedundant(RangeBoundary::FromDefinition(length()->definition())) ? 3529 return IsRedundant(RangeBoundary::FromDefinition(length()->definition())) ?
3546 NULL : this; 3530 NULL : this;
3547 } 3531 }
3548 3532
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
3886 set_native_c_function(native_function); 3870 set_native_c_function(native_function);
3887 function().SetIsNativeAutoSetupScope(auto_setup_scope); 3871 function().SetIsNativeAutoSetupScope(auto_setup_scope);
3888 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); 3872 Dart_NativeEntryResolver resolver = library.native_entry_resolver();
3889 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); 3873 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver);
3890 set_is_bootstrap_native(is_bootstrap_native); 3874 set_is_bootstrap_native(is_bootstrap_native);
3891 } 3875 }
3892 3876
3893 #undef __ 3877 #undef __
3894 3878
3895 } // namespace dart 3879 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/redundancy_elimination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698