Chromium Code Reviews| Index: runtime/vm/flow_graph_optimizer.cc |
| diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc |
| index 7f3796df6c3c9f172b6ecfe2a1c340eb4cba2898..5ea99323e2ec77209261f70e6ba2ee5ee0b73692 100644 |
| --- a/runtime/vm/flow_graph_optimizer.cc |
| +++ b/runtime/vm/flow_graph_optimizer.cc |
| @@ -612,6 +612,10 @@ void FlowGraphOptimizer::InsertConversion(Representation from, |
| converted = new(I) UnboxedIntConverterInstr(from, to, use->CopyWithType()); |
| } else if ((from == kUnboxedUint32) && (to == kUnboxedMint)) { |
| converted = new(I) UnboxedIntConverterInstr(from, to, use->CopyWithType()); |
| + } else if ((from == kTagged) && (to == kUnboxedUint32)) { |
| + const intptr_t deopt_id = (deopt_target != NULL) ? |
| + deopt_target->DeoptimizationTarget() : Isolate::kNoDeoptId; |
| + converted = new UnboxUint32Instr(use->CopyWithType(), deopt_id); |
| } else if (from == kUnboxedMint && to == kUnboxedDouble) { |
| ASSERT(CanUnboxDouble()); |
| // Convert by boxing/unboxing. |
| @@ -3233,6 +3237,16 @@ bool FlowGraphOptimizer::TryInlineInt32x4Constructor( |
| new(I) Value(call->ArgumentAt(1)), call->deopt_id()); |
| ReplaceCall(call, cast); |
| return true; |
| + } else if (recognized_kind == MethodRecognizer::kInt32x4Constructor) { |
| + Int32x4ConstructorInstr* con = |
| + new(I) Int32x4ConstructorInstr( |
| + new(I) Value(call->ArgumentAt(1)), |
| + new(I) Value(call->ArgumentAt(2)), |
| + new(I) Value(call->ArgumentAt(3)), |
| + new(I) Value(call->ArgumentAt(4)), |
| + call->deopt_id()); |
| + ReplaceCall(call, con); |
| + return true; |
| } |
| return false; |
| } |
| @@ -4275,7 +4289,8 @@ void FlowGraphOptimizer::VisitStaticCall(StaticCallInstr* call) { |
| (recognized_kind == MethodRecognizer::kFloat64x2Splat) || |
| (recognized_kind == MethodRecognizer::kFloat64x2FromFloat32x4)) { |
| TryInlineFloat64x2Constructor(call, recognized_kind); |
| - } else if (recognized_kind == MethodRecognizer::kInt32x4BoolConstructor) { |
| + } else if ((recognized_kind == MethodRecognizer::kInt32x4BoolConstructor) || |
| + (recognized_kind == MethodRecognizer::kInt32x4Constructor)) { |
| TryInlineInt32x4Constructor(call, recognized_kind); |
| } else if (recognized_kind == MethodRecognizer::kObjectConstructor) { |
| // Remove the original push arguments. |
| @@ -8098,6 +8113,14 @@ void ConstantPropagator::VisitFloat32x4ToInt32x4( |
| } |
| + |
|
zra
2014/08/13 22:05:31
Extra newline.
Cutch
2014/08/14 14:41:04
Done.
|
| +void ConstantPropagator::VisitInt32x4Constructor( |
| + Int32x4ConstructorInstr* instr) { |
| + SetValue(instr, non_constant_); |
| +} |
| + |
| + |
| + |
|
zra
2014/08/13 22:05:31
Extra newline.
Cutch
2014/08/14 14:41:04
Done.
|
| void ConstantPropagator::VisitInt32x4BoolConstructor( |
| Int32x4BoolConstructorInstr* instr) { |
| SetValue(instr, non_constant_); |