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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 22947006: Add signMask getter to Float32x4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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/disassembler_x64.cc ('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 dcb51ae7be18675ff0b5f0284e261a0fe1f2ecec..c8e6b525aa83bce964e7591c42c6433ff9020824 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -1474,8 +1474,8 @@ bool FlowGraphOptimizer::InlineFloat32x4Getter(InstanceCallInstr* call,
call);
intptr_t mask = 0;
if (getter == MethodRecognizer::kFloat32x4Shuffle) {
- ASSERT(call->ArgumentCount() == 2);
// Extract shuffle mask.
+ ASSERT(call->ArgumentCount() == 2);
Definition* mask_definition = call->ArgumentAt(1);
ASSERT(mask_definition->IsConstant());
ConstantInstr* constant_instruction = mask_definition->AsConstant();
@@ -1485,13 +1485,30 @@ bool FlowGraphOptimizer::InlineFloat32x4Getter(InstanceCallInstr* call,
ASSERT(mask >= 0);
ASSERT(mask <= 255);
}
- Float32x4ShuffleInstr* instr = new Float32x4ShuffleInstr(
- getter,
- new Value(call->ArgumentAt(0)),
- mask,
- call->deopt_id());
- ReplaceCall(call, instr);
- return true;
+ if ((getter == MethodRecognizer::kFloat32x4Shuffle) ||
+ (getter == MethodRecognizer::kFloat32x4ShuffleX) ||
+ (getter == MethodRecognizer::kFloat32x4ShuffleY) ||
+ (getter == MethodRecognizer::kFloat32x4ShuffleZ) ||
+ (getter == MethodRecognizer::kFloat32x4ShuffleW)) {
+ Float32x4ShuffleInstr* instr = new Float32x4ShuffleInstr(
+ getter,
+ new Value(call->ArgumentAt(0)),
+ mask,
+ call->deopt_id());
+ ReplaceCall(call, instr);
+ return true;
+ } else if (getter == MethodRecognizer::kFloat32x4GetSignMask) {
srdjan 2013/08/16 00:19:59 It may be better to do if (getter == MethodRecogn
Cutch 2013/08/19 17:23:22 Done.
+ Float32x4GetSignMaskInstr* instr = new Float32x4GetSignMaskInstr(
+ new Value(call->ArgumentAt(0)),
+ call->deopt_id());
+ ReplaceCall(call, instr);
+ return true;
+ } else {
+ UNIMPLEMENTED();
+ return false;
+ }
+ UNREACHABLE();
+ return false;
}
@@ -1649,6 +1666,7 @@ bool FlowGraphOptimizer::TryInlineInstanceGetter(InstanceCallInstr* call) {
case MethodRecognizer::kFloat32x4ShuffleY:
case MethodRecognizer::kFloat32x4ShuffleZ:
case MethodRecognizer::kFloat32x4ShuffleW:
+ case MethodRecognizer::kFloat32x4GetSignMask:
if (!ic_data.HasReceiverClassId(kFloat32x4Cid) ||
!ic_data.HasOneTarget()) {
return false;
@@ -6469,6 +6487,12 @@ void ConstantPropagator::VisitFloat32x4Shuffle(Float32x4ShuffleInstr* instr) {
}
+void ConstantPropagator::VisitFloat32x4GetSignMask(
+ Float32x4GetSignMaskInstr* instr) {
+ SetValue(instr, non_constant_);
+}
+
+
void ConstantPropagator::VisitFloat32x4Zero(Float32x4ZeroInstr* instr) {
SetValue(instr, non_constant_);
}
« no previous file with comments | « runtime/vm/disassembler_x64.cc ('k') | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698