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

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

Issue 183923026: Inline of Float64x2 operations round 1 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/flow_graph_optimizer.h ('k') | runtime/vm/flow_graph_type_propagator.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/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.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/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 1925 matching lines...) Expand 10 before | Expand all | Expand 10 after
1936 // Don't generate mint code if the IC data is marked because of an 1936 // Don't generate mint code if the IC data is marked because of an
1937 // overflow. 1937 // overflow.
1938 if (ic_data.deopt_reason() == kDeoptBinaryMintOp) return false; 1938 if (ic_data.deopt_reason() == kDeoptBinaryMintOp) return false;
1939 operands_type = kMintCid; 1939 operands_type = kMintCid;
1940 } else if (ShouldSpecializeForDouble(ic_data)) { 1940 } else if (ShouldSpecializeForDouble(ic_data)) {
1941 operands_type = kDoubleCid; 1941 operands_type = kDoubleCid;
1942 } else if (HasOnlyTwoOf(ic_data, kFloat32x4Cid)) { 1942 } else if (HasOnlyTwoOf(ic_data, kFloat32x4Cid)) {
1943 operands_type = kFloat32x4Cid; 1943 operands_type = kFloat32x4Cid;
1944 } else if (HasOnlyTwoOf(ic_data, kInt32x4Cid)) { 1944 } else if (HasOnlyTwoOf(ic_data, kInt32x4Cid)) {
1945 operands_type = kInt32x4Cid; 1945 operands_type = kInt32x4Cid;
1946 } else if (HasOnlyTwoOf(ic_data, kFloat64x2Cid)) {
1947 operands_type = kFloat64x2Cid;
1946 } else { 1948 } else {
1947 return false; 1949 return false;
1948 } 1950 }
1949 break; 1951 break;
1950 case Token::kMUL: 1952 case Token::kMUL:
1951 if (HasOnlyTwoOf(ic_data, kSmiCid)) { 1953 if (HasOnlyTwoOf(ic_data, kSmiCid)) {
1952 // Don't generate smi code if the IC data is marked because of an 1954 // Don't generate smi code if the IC data is marked because of an
1953 // overflow. 1955 // overflow.
1954 // TODO(fschneider): Add unboxed mint multiplication. 1956 // TODO(fschneider): Add unboxed mint multiplication.
1955 if (ic_data.deopt_reason() == kDeoptBinarySmiOp) return false; 1957 if (ic_data.deopt_reason() == kDeoptBinarySmiOp) return false;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2056 } else { 2058 } else {
2057 BinaryMintOpInstr* bin_op = 2059 BinaryMintOpInstr* bin_op =
2058 new BinaryMintOpInstr(op_kind, new Value(left), new Value(right), 2060 new BinaryMintOpInstr(op_kind, new Value(left), new Value(right),
2059 call->deopt_id()); 2061 call->deopt_id());
2060 ReplaceCall(call, bin_op); 2062 ReplaceCall(call, bin_op);
2061 } 2063 }
2062 } else if (operands_type == kFloat32x4Cid) { 2064 } else if (operands_type == kFloat32x4Cid) {
2063 return InlineFloat32x4BinaryOp(call, op_kind); 2065 return InlineFloat32x4BinaryOp(call, op_kind);
2064 } else if (operands_type == kInt32x4Cid) { 2066 } else if (operands_type == kInt32x4Cid) {
2065 return InlineInt32x4BinaryOp(call, op_kind); 2067 return InlineInt32x4BinaryOp(call, op_kind);
2068 } else if (operands_type == kFloat64x2Cid) {
2069 return InlineFloat64x2BinaryOp(call, op_kind);
2066 } else if (op_kind == Token::kMOD) { 2070 } else if (op_kind == Token::kMOD) {
2067 ASSERT(operands_type == kSmiCid); 2071 ASSERT(operands_type == kSmiCid);
2068 if (right->IsConstant()) { 2072 if (right->IsConstant()) {
2069 const Object& obj = right->AsConstant()->value(); 2073 const Object& obj = right->AsConstant()->value();
2070 if (obj.IsSmi() && Utils::IsPowerOfTwo(Smi::Cast(obj).Value())) { 2074 if (obj.IsSmi() && Utils::IsPowerOfTwo(Smi::Cast(obj).Value())) {
2071 // Insert smi check and attach a copy of the original environment 2075 // Insert smi check and attach a copy of the original environment
2072 // because the smi operation can still deoptimize. 2076 // because the smi operation can still deoptimize.
2073 InsertBefore(call, 2077 InsertBefore(call,
2074 new CheckSmiInstr(new Value(left), call->deopt_id()), 2078 new CheckSmiInstr(new Value(left), call->deopt_id()),
2075 call->env(), 2079 call->env(),
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
2326 mask, 2330 mask,
2327 call->deopt_id()); 2331 call->deopt_id());
2328 ReplaceCall(call, instr); 2332 ReplaceCall(call, instr);
2329 return true; 2333 return true;
2330 } 2334 }
2331 UNREACHABLE(); 2335 UNREACHABLE();
2332 return false; 2336 return false;
2333 } 2337 }
2334 2338
2335 2339
2340 bool FlowGraphOptimizer::InlineFloat64x2Getter(InstanceCallInstr* call,
2341 MethodRecognizer::Kind getter) {
2342 AddCheckClass(call->ArgumentAt(0),
2343 ICData::ZoneHandle(
2344 call->ic_data()->AsUnaryClassChecksForArgNr(0)),
2345 call->deopt_id(),
2346 call->env(),
2347 call);
2348 if ((getter == MethodRecognizer::kFloat64x2GetX) ||
2349 (getter == MethodRecognizer::kFloat64x2GetY)) {
2350 Simd64x2ShuffleInstr* instr = new Simd64x2ShuffleInstr(
2351 getter,
2352 new Value(call->ArgumentAt(0)),
2353 0,
2354 call->deopt_id());
2355 ReplaceCall(call, instr);
2356 return true;
2357 }
2358 UNREACHABLE();
2359 return false;
2360 }
2361
2362
2336 bool FlowGraphOptimizer::InlineInt32x4Getter(InstanceCallInstr* call, 2363 bool FlowGraphOptimizer::InlineInt32x4Getter(InstanceCallInstr* call,
2337 MethodRecognizer::Kind getter) { 2364 MethodRecognizer::Kind getter) {
2338 if (!ShouldInlineSimd()) { 2365 if (!ShouldInlineSimd()) {
2339 return false; 2366 return false;
2340 } 2367 }
2341 AddCheckClass(call->ArgumentAt(0), 2368 AddCheckClass(call->ArgumentAt(0),
2342 ICData::ZoneHandle( 2369 ICData::ZoneHandle(
2343 call->ic_data()->AsUnaryClassChecksForArgNr(0)), 2370 call->ic_data()->AsUnaryClassChecksForArgNr(0)),
2344 call->deopt_id(), 2371 call->deopt_id(),
2345 call->env(), 2372 call->env(),
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
2464 call); 2491 call);
2465 // Replace call. 2492 // Replace call.
2466 BinaryInt32x4OpInstr* int32x4_bin_op = 2493 BinaryInt32x4OpInstr* int32x4_bin_op =
2467 new BinaryInt32x4OpInstr(op_kind, new Value(left), new Value(right), 2494 new BinaryInt32x4OpInstr(op_kind, new Value(left), new Value(right),
2468 call->deopt_id()); 2495 call->deopt_id());
2469 ReplaceCall(call, int32x4_bin_op); 2496 ReplaceCall(call, int32x4_bin_op);
2470 return true; 2497 return true;
2471 } 2498 }
2472 2499
2473 2500
2501 bool FlowGraphOptimizer::InlineFloat64x2BinaryOp(InstanceCallInstr* call,
2502 Token::Kind op_kind) {
2503 if (!ShouldInlineSimd()) {
2504 return false;
2505 }
2506 ASSERT(call->ArgumentCount() == 2);
2507 Definition* left = call->ArgumentAt(0);
2508 Definition* right = call->ArgumentAt(1);
2509 // Type check left.
2510 AddCheckClass(left,
2511 ICData::ZoneHandle(
2512 call->ic_data()->AsUnaryClassChecksForArgNr(0)),
2513 call->deopt_id(),
2514 call->env(),
2515 call);
2516 // Type check right.
2517 AddCheckClass(right,
2518 ICData::ZoneHandle(
2519 call->ic_data()->AsUnaryClassChecksForArgNr(1)),
2520 call->deopt_id(),
2521 call->env(),
2522 call);
2523 // Replace call.
2524 BinaryFloat64x2OpInstr* float64x2_bin_op =
2525 new BinaryFloat64x2OpInstr(op_kind, new Value(left), new Value(right),
2526 call->deopt_id());
2527 ReplaceCall(call, float64x2_bin_op);
2528 return true;
2529 }
2530
2531
2474 // Only unique implicit instance getters can be currently handled. 2532 // Only unique implicit instance getters can be currently handled.
2475 bool FlowGraphOptimizer::TryInlineInstanceGetter(InstanceCallInstr* call) { 2533 bool FlowGraphOptimizer::TryInlineInstanceGetter(InstanceCallInstr* call) {
2476 ASSERT(call->HasICData()); 2534 ASSERT(call->HasICData());
2477 const ICData& ic_data = *call->ic_data(); 2535 const ICData& ic_data = *call->ic_data();
2478 if (ic_data.NumberOfChecks() == 0) { 2536 if (ic_data.NumberOfChecks() == 0) {
2479 // No type feedback collected. 2537 // No type feedback collected.
2480 return false; 2538 return false;
2481 } 2539 }
2482 2540
2483 if (!ic_data.HasOneTarget()) { 2541 if (!ic_data.HasOneTarget()) {
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
2856 } 2914 }
2857 2915
2858 if ((class_ids[0] == kFloat32x4Cid) && (ic_data.NumberOfChecks() == 1)) { 2916 if ((class_ids[0] == kFloat32x4Cid) && (ic_data.NumberOfChecks() == 1)) {
2859 return TryInlineFloat32x4Method(call, recognized_kind); 2917 return TryInlineFloat32x4Method(call, recognized_kind);
2860 } 2918 }
2861 2919
2862 if ((class_ids[0] == kInt32x4Cid) && (ic_data.NumberOfChecks() == 1)) { 2920 if ((class_ids[0] == kInt32x4Cid) && (ic_data.NumberOfChecks() == 1)) {
2863 return TryInlineInt32x4Method(call, recognized_kind); 2921 return TryInlineInt32x4Method(call, recognized_kind);
2864 } 2922 }
2865 2923
2924 if ((class_ids[0] == kFloat64x2Cid) && (ic_data.NumberOfChecks() == 1)) {
2925 return TryInlineFloat64x2Method(call, recognized_kind);
2926 }
2927
2866 if (recognized_kind == MethodRecognizer::kIntegerLeftShiftWithMask32) { 2928 if (recognized_kind == MethodRecognizer::kIntegerLeftShiftWithMask32) {
2867 ASSERT(call->ArgumentCount() == 3); 2929 ASSERT(call->ArgumentCount() == 3);
2868 ASSERT(ic_data.num_args_tested() == 2); 2930 ASSERT(ic_data.num_args_tested() == 2);
2869 Definition* value = call->ArgumentAt(0); 2931 Definition* value = call->ArgumentAt(0);
2870 Definition* count = call->ArgumentAt(1); 2932 Definition* count = call->ArgumentAt(1);
2871 Definition* int32_mask = call->ArgumentAt(2); 2933 Definition* int32_mask = call->ArgumentAt(2);
2872 if (HasOnlyTwoOf(ic_data, kSmiCid)) { 2934 if (HasOnlyTwoOf(ic_data, kSmiCid)) {
2873 if (ic_data.deopt_reason() == kDeoptShiftMintOp) { 2935 if (ic_data.deopt_reason() == kDeoptShiftMintOp) {
2874 return false; 2936 return false;
2875 } 2937 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
2951 new Value(call->ArgumentAt(4)), 3013 new Value(call->ArgumentAt(4)),
2952 call->deopt_id()); 3014 call->deopt_id());
2953 ReplaceCall(call, con); 3015 ReplaceCall(call, con);
2954 return true; 3016 return true;
2955 } else if (recognized_kind == MethodRecognizer::kFloat32x4FromInt32x4Bits) { 3017 } else if (recognized_kind == MethodRecognizer::kFloat32x4FromInt32x4Bits) {
2956 Int32x4ToFloat32x4Instr* cast = 3018 Int32x4ToFloat32x4Instr* cast =
2957 new Int32x4ToFloat32x4Instr(new Value(call->ArgumentAt(1)), 3019 new Int32x4ToFloat32x4Instr(new Value(call->ArgumentAt(1)),
2958 call->deopt_id()); 3020 call->deopt_id());
2959 ReplaceCall(call, cast); 3021 ReplaceCall(call, cast);
2960 return true; 3022 return true;
3023 } else if (recognized_kind == MethodRecognizer::kFloat32x4FromFloat64x2) {
3024 Float64x2ToFloat32x4Instr* cast =
3025 new Float64x2ToFloat32x4Instr(new Value(call->ArgumentAt(1)),
3026 call->deopt_id());
3027 ReplaceCall(call, cast);
3028 return true;
3029 }
3030 return false;
3031 }
3032
3033
3034 bool FlowGraphOptimizer::TryInlineFloat64x2Constructor(
3035 StaticCallInstr* call,
3036 MethodRecognizer::Kind recognized_kind) {
3037 if (!ShouldInlineSimd()) {
3038 return false;
3039 }
3040 if (recognized_kind == MethodRecognizer::kFloat64x2Zero) {
3041 Float64x2ZeroInstr* zero = new Float64x2ZeroInstr(call->deopt_id());
3042 ReplaceCall(call, zero);
3043 return true;
3044 } else if (recognized_kind == MethodRecognizer::kFloat64x2Splat) {
3045 Float64x2SplatInstr* splat =
3046 new Float64x2SplatInstr(new Value(call->ArgumentAt(1)),
3047 call->deopt_id());
3048 ReplaceCall(call, splat);
3049 return true;
3050 } else if (recognized_kind == MethodRecognizer::kFloat64x2Constructor) {
3051 Float64x2ConstructorInstr* con =
3052 new Float64x2ConstructorInstr(new Value(call->ArgumentAt(1)),
3053 new Value(call->ArgumentAt(2)),
3054 call->deopt_id());
3055 ReplaceCall(call, con);
3056 return true;
3057 } else if (recognized_kind == MethodRecognizer::kFloat64x2FromFloat32x4) {
3058 Float32x4ToFloat64x2Instr* cast =
3059 new Float32x4ToFloat64x2Instr(new Value(call->ArgumentAt(1)),
3060 call->deopt_id());
3061 ReplaceCall(call, cast);
3062 return true;
2961 } 3063 }
2962 return false; 3064 return false;
2963 } 3065 }
2964 3066
2965 3067
2966 bool FlowGraphOptimizer::TryInlineInt32x4Constructor( 3068 bool FlowGraphOptimizer::TryInlineInt32x4Constructor(
2967 StaticCallInstr* call, 3069 StaticCallInstr* call,
2968 MethodRecognizer::Kind recognized_kind) { 3070 MethodRecognizer::Kind recognized_kind) {
2969 if (!ShouldInlineSimd()) { 3071 if (!ShouldInlineSimd()) {
2970 return false; 3072 return false;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
3137 case MethodRecognizer::kFloat32x4ShuffleMix: 3239 case MethodRecognizer::kFloat32x4ShuffleMix:
3138 case MethodRecognizer::kFloat32x4Shuffle: { 3240 case MethodRecognizer::kFloat32x4Shuffle: {
3139 return InlineFloat32x4Getter(call, recognized_kind); 3241 return InlineFloat32x4Getter(call, recognized_kind);
3140 } 3242 }
3141 default: 3243 default:
3142 return false; 3244 return false;
3143 } 3245 }
3144 } 3246 }
3145 3247
3146 3248
3249 bool FlowGraphOptimizer::TryInlineFloat64x2Method(
3250 InstanceCallInstr* call,
3251 MethodRecognizer::Kind recognized_kind) {
3252 if (!ShouldInlineSimd()) {
3253 return false;
3254 }
3255 ASSERT(call->HasICData());
3256 switch (recognized_kind) {
3257 case MethodRecognizer::kFloat64x2GetX:
3258 case MethodRecognizer::kFloat64x2GetY:
3259 ASSERT(call->ic_data()->HasReceiverClassId(kFloat64x2Cid));
3260 ASSERT(call->ic_data()->HasOneTarget());
3261 return InlineFloat64x2Getter(call, recognized_kind);
3262 default:
3263 return false;
3264 }
3265 }
3266
3267
3147 bool FlowGraphOptimizer::TryInlineInt32x4Method( 3268 bool FlowGraphOptimizer::TryInlineInt32x4Method(
3148 InstanceCallInstr* call, 3269 InstanceCallInstr* call,
3149 MethodRecognizer::Kind recognized_kind) { 3270 MethodRecognizer::Kind recognized_kind) {
3150 if (!ShouldInlineSimd()) { 3271 if (!ShouldInlineSimd()) {
3151 return false; 3272 return false;
3152 } 3273 }
3153 ASSERT(call->HasICData()); 3274 ASSERT(call->HasICData());
3154 switch (recognized_kind) { 3275 switch (recognized_kind) {
3155 case MethodRecognizer::kInt32x4ShuffleMix: 3276 case MethodRecognizer::kInt32x4ShuffleMix:
3156 case MethodRecognizer::kInt32x4Shuffle: 3277 case MethodRecognizer::kInt32x4Shuffle:
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
3811 if ((recognized_kind == MethodRecognizer::kMathSqrt) || 3932 if ((recognized_kind == MethodRecognizer::kMathSqrt) ||
3812 (recognized_kind == MethodRecognizer::kMathSin) || 3933 (recognized_kind == MethodRecognizer::kMathSin) ||
3813 (recognized_kind == MethodRecognizer::kMathCos)) { 3934 (recognized_kind == MethodRecognizer::kMathCos)) {
3814 MathUnaryInstr* math_unary = 3935 MathUnaryInstr* math_unary =
3815 new MathUnaryInstr(recognized_kind, 3936 new MathUnaryInstr(recognized_kind,
3816 new Value(call->ArgumentAt(0)), 3937 new Value(call->ArgumentAt(0)),
3817 call->deopt_id()); 3938 call->deopt_id());
3818 ReplaceCall(call, math_unary); 3939 ReplaceCall(call, math_unary);
3819 } else if ((recognized_kind == MethodRecognizer::kFloat32x4Zero) || 3940 } else if ((recognized_kind == MethodRecognizer::kFloat32x4Zero) ||
3820 (recognized_kind == MethodRecognizer::kFloat32x4Splat) || 3941 (recognized_kind == MethodRecognizer::kFloat32x4Splat) ||
3821 (recognized_kind == MethodRecognizer::kFloat32x4Constructor)) { 3942 (recognized_kind == MethodRecognizer::kFloat32x4Constructor) ||
3943 (recognized_kind == MethodRecognizer::kFloat32x4FromFloat64x2)) {
3822 TryInlineFloat32x4Constructor(call, recognized_kind); 3944 TryInlineFloat32x4Constructor(call, recognized_kind);
3945 } else if ((recognized_kind == MethodRecognizer::kFloat64x2Constructor) ||
3946 (recognized_kind == MethodRecognizer::kFloat64x2Zero) ||
3947 (recognized_kind == MethodRecognizer::kFloat64x2Splat) ||
3948 (recognized_kind == MethodRecognizer::kFloat64x2FromFloat32x4)) {
3949 TryInlineFloat64x2Constructor(call, recognized_kind);
3823 } else if (recognized_kind == MethodRecognizer::kInt32x4BoolConstructor) { 3950 } else if (recognized_kind == MethodRecognizer::kInt32x4BoolConstructor) {
3824 TryInlineInt32x4Constructor(call, recognized_kind); 3951 TryInlineInt32x4Constructor(call, recognized_kind);
3825 } else if (recognized_kind == MethodRecognizer::kObjectConstructor) { 3952 } else if (recognized_kind == MethodRecognizer::kObjectConstructor) {
3826 // Remove the original push arguments. 3953 // Remove the original push arguments.
3827 for (intptr_t i = 0; i < call->ArgumentCount(); ++i) { 3954 for (intptr_t i = 0; i < call->ArgumentCount(); ++i) {
3828 PushArgumentInstr* push = call->PushArgumentAt(i); 3955 PushArgumentInstr* push = call->PushArgumentAt(i);
3829 push->ReplaceUsesWith(push->value()->definition()); 3956 push->ReplaceUsesWith(push->value()->definition());
3830 push->RemoveFromGraph(); 3957 push->RemoveFromGraph();
3831 } 3958 }
3832 // Manually replace call with global null constant. ReplaceCall can't 3959 // Manually replace call with global null constant. ReplaceCall can't
(...skipping 3895 matching lines...) Expand 10 before | Expand all | Expand 10 after
7728 Int32x4ToFloat32x4Instr* instr) { 7855 Int32x4ToFloat32x4Instr* instr) {
7729 SetValue(instr, non_constant_); 7856 SetValue(instr, non_constant_);
7730 } 7857 }
7731 7858
7732 7859
7733 void ConstantPropagator::VisitBinaryInt32x4Op(BinaryInt32x4OpInstr* instr) { 7860 void ConstantPropagator::VisitBinaryInt32x4Op(BinaryInt32x4OpInstr* instr) {
7734 SetValue(instr, non_constant_); 7861 SetValue(instr, non_constant_);
7735 } 7862 }
7736 7863
7737 7864
7865 void ConstantPropagator::VisitSimd64x2Shuffle(Simd64x2ShuffleInstr* instr) {
7866 SetValue(instr, non_constant_);
7867 }
7868
7869
7870 void ConstantPropagator::VisitBinaryFloat64x2Op(BinaryFloat64x2OpInstr* instr) {
7871 SetValue(instr, non_constant_);
7872 }
7873
7874
7875 void ConstantPropagator::VisitFloat32x4ToFloat64x2(
7876 Float32x4ToFloat64x2Instr* instr) {
7877 SetValue(instr, non_constant_);
7878 }
7879
7880
7881 void ConstantPropagator::VisitFloat64x2ToFloat32x4(
7882 Float64x2ToFloat32x4Instr* instr) {
7883 SetValue(instr, non_constant_);
7884 }
7885
7886
7887 void ConstantPropagator::VisitFloat64x2Zero(
7888 Float64x2ZeroInstr* instr) {
7889 SetValue(instr, non_constant_);
7890 }
7891
7892
7893 void ConstantPropagator::VisitFloat64x2Splat(
7894 Float64x2SplatInstr* instr) {
7895 SetValue(instr, non_constant_);
7896 }
7897
7898
7899 void ConstantPropagator::VisitFloat64x2Constructor(
7900 Float64x2ConstructorInstr* instr) {
7901 SetValue(instr, non_constant_);
7902 }
7903
7904
7738 void ConstantPropagator::VisitMathUnary(MathUnaryInstr* instr) { 7905 void ConstantPropagator::VisitMathUnary(MathUnaryInstr* instr) {
7739 const Object& value = instr->value()->definition()->constant_value(); 7906 const Object& value = instr->value()->definition()->constant_value();
7740 if (IsNonConstant(value)) { 7907 if (IsNonConstant(value)) {
7741 SetValue(instr, non_constant_); 7908 SetValue(instr, non_constant_);
7742 } else if (IsConstant(value)) { 7909 } else if (IsConstant(value)) {
7743 // TODO(kmillikin): Handle Math's unary operations (sqrt, cos, sin). 7910 // TODO(kmillikin): Handle Math's unary operations (sqrt, cos, sin).
7744 SetValue(instr, non_constant_); 7911 SetValue(instr, non_constant_);
7745 } 7912 }
7746 } 7913 }
7747 7914
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
8662 } 8829 }
8663 8830
8664 // Insert materializations at environment uses. 8831 // Insert materializations at environment uses.
8665 for (intptr_t i = 0; i < exits.length(); i++) { 8832 for (intptr_t i = 0; i < exits.length(); i++) {
8666 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields); 8833 CreateMaterializationAt(exits[i], alloc, alloc->cls(), *fields);
8667 } 8834 }
8668 } 8835 }
8669 8836
8670 8837
8671 } // namespace dart 8838 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.h ('k') | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698