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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 13936009: Inline Float32x4 constructors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | 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 35dc377d8caf71108332c906bcde1700fb414ac7..1dfc04c1701d5cc8461d113adcd0eb35def7794b 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -2107,6 +2107,21 @@ void FlowGraphOptimizer::VisitStaticCall(StaticCallInstr* call) {
MathSqrtInstr* sqrt =
new MathSqrtInstr(new Value(call->ArgumentAt(0)), call);
ReplaceCall(call, sqrt);
+ } else if (recognized_kind == MethodRecognizer::kFloat32x4Zero) {
+ Float32x4ZeroInstr* zero = new Float32x4ZeroInstr(call);
+ ReplaceCall(call, zero);
+ } else if (recognized_kind == MethodRecognizer::kFloat32x4Splat) {
+ Float32x4SplatInstr* splat =
+ new Float32x4SplatInstr(new Value(call->ArgumentAt(1)), call);
+ ReplaceCall(call, splat);
+ } else if (recognized_kind == MethodRecognizer::kFloat32x4Constructor) {
+ Float32x4ConstructorInstr* con =
+ new Float32x4ConstructorInstr(new Value(call->ArgumentAt(1)),
+ new Value(call->ArgumentAt(2)),
+ new Value(call->ArgumentAt(3)),
+ new Value(call->ArgumentAt(4)),
+ call);
+ ReplaceCall(call, con);
}
}
@@ -4729,11 +4744,27 @@ void ConstantPropagator::VisitBinaryFloat32x4Op(
}
+void ConstantPropagator::VisitFloat32x4Constructor(
+ Float32x4ConstructorInstr* instr) {
+ SetValue(instr, non_constant_);
+}
+
+
void ConstantPropagator::VisitFloat32x4Shuffle(Float32x4ShuffleInstr* instr) {
SetValue(instr, non_constant_);
}
+void ConstantPropagator::VisitFloat32x4Zero(Float32x4ZeroInstr* instr) {
+ SetValue(instr, non_constant_);
+}
+
+
+void ConstantPropagator::VisitFloat32x4Splat(Float32x4SplatInstr* instr) {
+ SetValue(instr, non_constant_);
+}
+
+
void ConstantPropagator::VisitMathSqrt(MathSqrtInstr* instr) {
const Object& value = instr->value()->definition()->constant_value();
if (IsNonConstant(value)) {
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698