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

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

Issue 2891113002: Use same range info when emitting code and computing if instruction can deopt. (Closed)
Patch Set: Add a comment to the test Created 3 years, 7 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_arm64.cc ('k') | runtime/vm/intermediate_language_ia32.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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/globals.h" // Needed here to get TARGET_ARCH_DBC. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC.
6 #if defined(TARGET_ARCH_DBC) 6 #if defined(TARGET_ARCH_DBC)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 17 matching lines...) Expand all
28 DECLARE_FLAG(bool, emit_edge_counters); 28 DECLARE_FLAG(bool, emit_edge_counters);
29 DECLARE_FLAG(int, optimization_counter_threshold); 29 DECLARE_FLAG(int, optimization_counter_threshold);
30 30
31 // List of instructions that are still unimplemented by DBC backend. 31 // List of instructions that are still unimplemented by DBC backend.
32 #define FOR_EACH_UNIMPLEMENTED_INSTRUCTION(M) \ 32 #define FOR_EACH_UNIMPLEMENTED_INSTRUCTION(M) \
33 M(LoadCodeUnits) \ 33 M(LoadCodeUnits) \
34 M(BinaryInt32Op) \ 34 M(BinaryInt32Op) \
35 M(Int32ToDouble) \ 35 M(Int32ToDouble) \
36 M(DoubleToInteger) \ 36 M(DoubleToInteger) \
37 M(BoxInt64) \ 37 M(BoxInt64) \
38 M(MergedMath) \ 38 M(TruncDivMod) \
39 M(GuardFieldClass) \ 39 M(GuardFieldClass) \
40 M(GuardFieldLength) \ 40 M(GuardFieldLength) \
41 M(IfThenElse) \ 41 M(IfThenElse) \
42 M(ExtractNthOutput) \ 42 M(ExtractNthOutput) \
43 M(BinaryUint32Op) \ 43 M(BinaryUint32Op) \
44 M(ShiftUint32Op) \ 44 M(ShiftUint32Op) \
45 M(UnaryUint32Op) \ 45 M(UnaryUint32Op) \
46 M(UnboxedIntConverter) 46 M(UnboxedIntConverter)
47 47
48 // List of instructions that are not used by DBC. 48 // List of instructions that are not used by DBC.
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1324 CompileType ShiftUint32OpInstr::ComputeType() const { 1324 CompileType ShiftUint32OpInstr::ComputeType() const {
1325 return CompileType::Int(); 1325 return CompileType::Int();
1326 } 1326 }
1327 1327
1328 1328
1329 CompileType UnaryUint32OpInstr::ComputeType() const { 1329 CompileType UnaryUint32OpInstr::ComputeType() const {
1330 return CompileType::Int(); 1330 return CompileType::Int();
1331 } 1331 }
1332 1332
1333 1333
1334 static const intptr_t kMintShiftCountLimit = 63;
1335
1336
1337 bool ShiftMintOpInstr::has_shift_count_check() const {
1338 return !RangeUtils::IsWithin(right()->definition()->range(), 0,
1339 kMintShiftCountLimit);
1340 }
1341
1342
1343 CompileType LoadIndexedInstr::ComputeType() const { 1334 CompileType LoadIndexedInstr::ComputeType() const {
1344 switch (class_id_) { 1335 switch (class_id_) {
1345 case kArrayCid: 1336 case kArrayCid:
1346 case kImmutableArrayCid: 1337 case kImmutableArrayCid:
1347 return CompileType::Dynamic(); 1338 return CompileType::Dynamic();
1348 1339
1349 case kTypedDataFloat32ArrayCid: 1340 case kTypedDataFloat32ArrayCid:
1350 case kTypedDataFloat64ArrayCid: 1341 case kTypedDataFloat64ArrayCid:
1351 return CompileType::FromCid(kDoubleCid); 1342 return CompileType::FromCid(kDoubleCid);
1352 case kTypedDataFloat32x4ArrayCid: 1343 case kTypedDataFloat32x4ArrayCid:
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
2083 } 2074 }
2084 __ IfULe(length, index); 2075 __ IfULe(length, index);
2085 compiler->EmitDeopt(deopt_id(), ICData::kDeoptCheckArrayBound, 2076 compiler->EmitDeopt(deopt_id(), ICData::kDeoptCheckArrayBound,
2086 (generalized_ ? ICData::kGeneralized : 0) | 2077 (generalized_ ? ICData::kGeneralized : 0) |
2087 (licm_hoisted_ ? ICData::kHoisted : 0)); 2078 (licm_hoisted_ ? ICData::kHoisted : 0));
2088 } 2079 }
2089 2080
2090 } // namespace dart 2081 } // namespace dart
2091 2082
2092 #endif // defined TARGET_ARCH_DBC 2083 #endif // defined TARGET_ARCH_DBC
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698