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: src/compiler/simd-scalar-lowering.h

Issue 2724973003: [wasm]implement simd lowering for f32x4->i32x4, i32x4 min/max and shift instructions (Closed)
Patch Set: comment Created 3 years, 10 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 | src/compiler/simd-scalar-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simd-scalar-lowering.h
diff --git a/src/compiler/simd-scalar-lowering.h b/src/compiler/simd-scalar-lowering.h
index 04f9d0ff77ca2dc6f2c4438a31e8ff807a99210b..76eeb9b8e24c851f3976a319dbbae78e7b2c68a8 100644
--- a/src/compiler/simd-scalar-lowering.h
+++ b/src/compiler/simd-scalar-lowering.h
@@ -7,6 +7,7 @@
#include "src/compiler/common-operator.h"
#include "src/compiler/graph.h"
+#include "src/compiler/js-graph.h"
#include "src/compiler/machine-operator.h"
#include "src/compiler/node-marker.h"
#include "src/zone/zone-containers.h"
@@ -17,8 +18,7 @@ namespace compiler {
class SimdScalarLowering {
public:
- SimdScalarLowering(Graph* graph, MachineOperatorBuilder* machine,
- CommonOperatorBuilder* common, Zone* zone,
+ SimdScalarLowering(JSGraph* jsgraph,
Signature<MachineRepresentation>* signature);
void LowerGraph();
@@ -38,10 +38,15 @@ class SimdScalarLowering {
SimdType type; // represents what input type is expected
};
- Zone* zone() const { return zone_; }
- Graph* graph() const { return graph_; }
- MachineOperatorBuilder* machine() const { return machine_; }
- CommonOperatorBuilder* common() const { return common_; }
+ struct NodeState {
+ Node* node;
+ int input_index;
+ };
+
+ Zone* zone() const { return jsgraph_->zone(); }
+ Graph* graph() const { return jsgraph_->graph(); }
+ MachineOperatorBuilder* machine() const { return jsgraph_->machine(); }
+ CommonOperatorBuilder* common() const { return jsgraph_->common(); }
Signature<MachineRepresentation>* signature() const { return signature_; }
void LowerNode(Node* node);
@@ -61,16 +66,12 @@ class SimdScalarLowering {
const Operator* store_op, SimdType rep_type);
void LowerBinaryOp(Node* node, SimdType input_rep_type, const Operator* op);
void LowerUnaryOp(Node* node, SimdType input_rep_type, const Operator* op);
+ void LowerIntMinMax(Node* node, const Operator* op, bool is_max);
+ void LowerConvertFromFloat(Node* node, bool is_signed);
+ void LowerShiftOp(Node* node, const Operator* op);
+ Node* BuildF64Trunc(Node* input);
- struct NodeState {
- Node* node;
- int input_index;
- };
-
- Zone* zone_;
- Graph* const graph_;
- MachineOperatorBuilder* machine_;
- CommonOperatorBuilder* common_;
+ JSGraph* const jsgraph_;
NodeMarker<State> state_;
ZoneDeque<NodeState> stack_;
Replacement* replacements_;
« no previous file with comments | « no previous file | src/compiler/simd-scalar-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698