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

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

Issue 1913663002: vm: Generate 'and' instruction for Smi values. (Closed) Base URL: https://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
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/jit_optimizer.h" 5 #include "vm/jit_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/branch_optimizer.h" 8 #include "vm/branch_optimizer.h"
9 #include "vm/cha.h" 9 #include "vm/cha.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 } 1874 }
1875 1875
1876 if ((class_ids[0] == kInt32x4Cid) && (ic_data.NumberOfChecks() == 1)) { 1876 if ((class_ids[0] == kInt32x4Cid) && (ic_data.NumberOfChecks() == 1)) {
1877 return TryInlineInt32x4Method(call, recognized_kind); 1877 return TryInlineInt32x4Method(call, recognized_kind);
1878 } 1878 }
1879 1879
1880 if ((class_ids[0] == kFloat64x2Cid) && (ic_data.NumberOfChecks() == 1)) { 1880 if ((class_ids[0] == kFloat64x2Cid) && (ic_data.NumberOfChecks() == 1)) {
1881 return TryInlineFloat64x2Method(call, recognized_kind); 1881 return TryInlineFloat64x2Method(call, recognized_kind);
1882 } 1882 }
1883 1883
1884 if (recognized_kind == MethodRecognizer::kSmi_bitAndFromSmi) {
1885 AddReceiverCheck(call);
1886 BinarySmiOpInstr* op =
1887 new(Z) BinarySmiOpInstr(
1888 Token::kBIT_AND,
1889 new(Z) Value(call->ArgumentAt(0)),
1890 new(Z) Value(call->ArgumentAt(1)),
1891 call->deopt_id());
1892 ReplaceCall(call, op);
1893 return true;
1894 }
1895
1884 return false; 1896 return false;
1885 } 1897 }
1886 1898
1887 1899
1888 bool JitOptimizer::TryInlineFloat32x4Constructor( 1900 bool JitOptimizer::TryInlineFloat32x4Constructor(
1889 StaticCallInstr* call, 1901 StaticCallInstr* call,
1890 MethodRecognizer::Kind recognized_kind) { 1902 MethodRecognizer::Kind recognized_kind) {
1891 if (!ShouldInlineSimd()) { 1903 if (!ShouldInlineSimd()) {
1892 return false; 1904 return false;
1893 } 1905 }
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
3066 3078
3067 // Discard the environment from the original instruction because the store 3079 // Discard the environment from the original instruction because the store
3068 // can't deoptimize. 3080 // can't deoptimize.
3069 instr->RemoveEnvironment(); 3081 instr->RemoveEnvironment();
3070 ReplaceCall(instr, store); 3082 ReplaceCall(instr, store);
3071 return true; 3083 return true;
3072 } 3084 }
3073 3085
3074 3086
3075 } // namespace dart 3087 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698