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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 193183003: Inline Float64x2 methods that take 1 argument (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index 3b505442a95c3a3973240cb1ddf6beaecbfe801c..feac93eb05c4c3ceb3e624467bcffde7cfe34c6e 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -3277,6 +3277,26 @@ bool FlowGraphOptimizer::TryInlineFloat64x2Method(
ReplaceCall(call, zeroArg);
return true;
}
+ case MethodRecognizer::kFloat64x2Scale:
+ case MethodRecognizer::kFloat64x2WithX:
+ case MethodRecognizer::kFloat64x2WithY:
+ case MethodRecognizer::kFloat64x2Min:
+ case MethodRecognizer::kFloat64x2Max: {
+ Definition* left = call->ArgumentAt(0);
+ Definition* right = call->ArgumentAt(1);
+ // Type check left.
+ AddCheckClass(left,
+ ICData::ZoneHandle(
+ call->ic_data()->AsUnaryClassChecksForArgNr(0)),
+ call->deopt_id(),
+ call->env(),
+ call);
+ Float64x2OneArgInstr* zeroArg =
+ new Float64x2OneArgInstr(recognized_kind, new Value(left),
+ new Value(right), call->deopt_id());
+ ReplaceCall(call, zeroArg);
+ return true;
+ }
default:
return false;
}
@@ -7982,12 +8002,19 @@ void ConstantPropagator::VisitFloat64x2Constructor(
SetValue(instr, non_constant_);
}
+
void ConstantPropagator::VisitFloat64x2ZeroArg(Float64x2ZeroArgInstr* instr) {
// TODO(johnmccutchan): Implement constant propagation.
SetValue(instr, non_constant_);
}
+void ConstantPropagator::VisitFloat64x2OneArg(Float64x2OneArgInstr* instr) {
+ // TODO(johnmccutchan): Implement constant propagation.
+ SetValue(instr, non_constant_);
+}
+
+
void ConstantPropagator::VisitMathUnary(MathUnaryInstr* instr) {
const Object& value = instr->value()->definition()->constant_value();
if (IsNonConstant(value)) {
« no previous file with comments | « no previous file | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698