Commit 42718a4c authored by rmcilroy's avatar rmcilroy Committed by Commit bot

Remove dummy control / effect edges from RMA Load / Store / Div nodes.

Review URL: https://codereview.chromium.org/1510173004

Cr-Commit-Position: refs/heads/master@{#32762}
parent 909f93d0
...@@ -111,8 +111,7 @@ class RawMachineAssembler { ...@@ -111,8 +111,7 @@ class RawMachineAssembler {
return Load(rep, base, IntPtrConstant(0)); return Load(rep, base, IntPtrConstant(0));
} }
Node* Load(MachineType rep, Node* base, Node* index) { Node* Load(MachineType rep, Node* base, Node* index) {
return AddNode(machine()->Load(rep), base, index, graph()->start(), return AddNode(machine()->Load(rep), base, index);
graph()->start());
} }
Node* Store(MachineType rep, Node* base, Node* value, Node* Store(MachineType rep, Node* base, Node* value,
WriteBarrierKind write_barrier) { WriteBarrierKind write_barrier) {
...@@ -121,7 +120,7 @@ class RawMachineAssembler { ...@@ -121,7 +120,7 @@ class RawMachineAssembler {
Node* Store(MachineType rep, Node* base, Node* index, Node* value, Node* Store(MachineType rep, Node* base, Node* index, Node* value,
WriteBarrierKind write_barrier) { WriteBarrierKind write_barrier) {
return AddNode(machine()->Store(StoreRepresentation(rep, write_barrier)), return AddNode(machine()->Store(StoreRepresentation(rep, write_barrier)),
base, index, value, graph()->start(), graph()->start()); base, index, value);
} }
// Arithmetic Operations. // Arithmetic Operations.
...@@ -246,10 +245,10 @@ class RawMachineAssembler { ...@@ -246,10 +245,10 @@ class RawMachineAssembler {
return AddNode(machine()->Int32MulHigh(), a, b); return AddNode(machine()->Int32MulHigh(), a, b);
} }
Node* Int32Div(Node* a, Node* b) { Node* Int32Div(Node* a, Node* b) {
return AddNode(machine()->Int32Div(), a, b, graph()->start()); return AddNode(machine()->Int32Div(), a, b);
} }
Node* Int32Mod(Node* a, Node* b) { Node* Int32Mod(Node* a, Node* b) {
return AddNode(machine()->Int32Mod(), a, b, graph()->start()); return AddNode(machine()->Int32Mod(), a, b);
} }
Node* Int32LessThan(Node* a, Node* b) { Node* Int32LessThan(Node* a, Node* b) {
return AddNode(machine()->Int32LessThan(), a, b); return AddNode(machine()->Int32LessThan(), a, b);
...@@ -258,7 +257,7 @@ class RawMachineAssembler { ...@@ -258,7 +257,7 @@ class RawMachineAssembler {
return AddNode(machine()->Int32LessThanOrEqual(), a, b); return AddNode(machine()->Int32LessThanOrEqual(), a, b);
} }
Node* Uint32Div(Node* a, Node* b) { Node* Uint32Div(Node* a, Node* b) {
return AddNode(machine()->Uint32Div(), a, b, graph()->start()); return AddNode(machine()->Uint32Div(), a, b);
} }
Node* Uint32LessThan(Node* a, Node* b) { Node* Uint32LessThan(Node* a, Node* b) {
return AddNode(machine()->Uint32LessThan(), a, b); return AddNode(machine()->Uint32LessThan(), a, b);
...@@ -267,7 +266,7 @@ class RawMachineAssembler { ...@@ -267,7 +266,7 @@ class RawMachineAssembler {
return AddNode(machine()->Uint32LessThanOrEqual(), a, b); return AddNode(machine()->Uint32LessThanOrEqual(), a, b);
} }
Node* Uint32Mod(Node* a, Node* b) { Node* Uint32Mod(Node* a, Node* b) {
return AddNode(machine()->Uint32Mod(), a, b, graph()->start()); return AddNode(machine()->Uint32Mod(), a, b);
} }
Node* Uint32MulHigh(Node* a, Node* b) { Node* Uint32MulHigh(Node* a, Node* b) {
return AddNode(machine()->Uint32MulHigh(), a, b); return AddNode(machine()->Uint32MulHigh(), a, b);
......
...@@ -69,8 +69,7 @@ Matcher<Node*> IsWordOr(const Matcher<Node*>& lhs_matcher, ...@@ -69,8 +69,7 @@ Matcher<Node*> IsWordOr(const Matcher<Node*>& lhs_matcher,
Matcher<Node*> InterpreterAssemblerTest::InterpreterAssemblerForTest::IsLoad( Matcher<Node*> InterpreterAssemblerTest::InterpreterAssemblerForTest::IsLoad(
const Matcher<LoadRepresentation>& rep_matcher, const Matcher<LoadRepresentation>& rep_matcher,
const Matcher<Node*>& base_matcher, const Matcher<Node*>& index_matcher) { const Matcher<Node*>& base_matcher, const Matcher<Node*>& index_matcher) {
return ::i::compiler::IsLoad(rep_matcher, base_matcher, index_matcher, return ::i::compiler::IsLoad(rep_matcher, base_matcher, index_matcher, _, _);
graph()->start(), graph()->start());
} }
...@@ -79,8 +78,7 @@ Matcher<Node*> InterpreterAssemblerTest::InterpreterAssemblerForTest::IsStore( ...@@ -79,8 +78,7 @@ Matcher<Node*> InterpreterAssemblerTest::InterpreterAssemblerForTest::IsStore(
const Matcher<Node*>& base_matcher, const Matcher<Node*>& index_matcher, const Matcher<Node*>& base_matcher, const Matcher<Node*>& index_matcher,
const Matcher<Node*>& value_matcher) { const Matcher<Node*>& value_matcher) {
return ::i::compiler::IsStore(rep_matcher, base_matcher, index_matcher, return ::i::compiler::IsStore(rep_matcher, base_matcher, index_matcher,
value_matcher, graph()->start(), value_matcher, _, _);
graph()->start());
} }
......
...@@ -1212,6 +1212,14 @@ class IsLoadMatcher final : public NodeMatcher { ...@@ -1212,6 +1212,14 @@ class IsLoadMatcher final : public NodeMatcher {
} }
bool MatchAndExplain(Node* node, MatchResultListener* listener) const final { bool MatchAndExplain(Node* node, MatchResultListener* listener) const final {
Node* effect_node = nullptr;
Node* control_node = nullptr;
if (NodeProperties::FirstEffectIndex(node) < node->InputCount()) {
effect_node = NodeProperties::GetEffectInput(node);
}
if (NodeProperties::FirstControlIndex(node) < node->InputCount()) {
control_node = NodeProperties::GetControlInput(node);
}
return (NodeMatcher::MatchAndExplain(node, listener) && return (NodeMatcher::MatchAndExplain(node, listener) &&
PrintMatchAndExplain(OpParameter<LoadRepresentation>(node), "rep", PrintMatchAndExplain(OpParameter<LoadRepresentation>(node), "rep",
rep_matcher_, listener) && rep_matcher_, listener) &&
...@@ -1219,10 +1227,10 @@ class IsLoadMatcher final : public NodeMatcher { ...@@ -1219,10 +1227,10 @@ class IsLoadMatcher final : public NodeMatcher {
base_matcher_, listener) && base_matcher_, listener) &&
PrintMatchAndExplain(NodeProperties::GetValueInput(node, 1), PrintMatchAndExplain(NodeProperties::GetValueInput(node, 1),
"index", index_matcher_, listener) && "index", index_matcher_, listener) &&
PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect", PrintMatchAndExplain(effect_node, "effect", effect_matcher_,
effect_matcher_, listener) && listener) &&
PrintMatchAndExplain(NodeProperties::GetControlInput(node), PrintMatchAndExplain(control_node, "control", control_matcher_,
"control", control_matcher_, listener)); listener));
} }
private: private:
...@@ -1268,6 +1276,14 @@ class IsStoreMatcher final : public NodeMatcher { ...@@ -1268,6 +1276,14 @@ class IsStoreMatcher final : public NodeMatcher {
} }
bool MatchAndExplain(Node* node, MatchResultListener* listener) const final { bool MatchAndExplain(Node* node, MatchResultListener* listener) const final {
Node* effect_node = nullptr;
Node* control_node = nullptr;
if (NodeProperties::FirstEffectIndex(node) < node->InputCount()) {
effect_node = NodeProperties::GetEffectInput(node);
}
if (NodeProperties::FirstControlIndex(node) < node->InputCount()) {
control_node = NodeProperties::GetControlInput(node);
}
return (NodeMatcher::MatchAndExplain(node, listener) && return (NodeMatcher::MatchAndExplain(node, listener) &&
PrintMatchAndExplain(OpParameter<StoreRepresentation>(node), "rep", PrintMatchAndExplain(OpParameter<StoreRepresentation>(node), "rep",
rep_matcher_, listener) && rep_matcher_, listener) &&
...@@ -1277,10 +1293,10 @@ class IsStoreMatcher final : public NodeMatcher { ...@@ -1277,10 +1293,10 @@ class IsStoreMatcher final : public NodeMatcher {
"index", index_matcher_, listener) && "index", index_matcher_, listener) &&
PrintMatchAndExplain(NodeProperties::GetValueInput(node, 2), PrintMatchAndExplain(NodeProperties::GetValueInput(node, 2),
"value", value_matcher_, listener) && "value", value_matcher_, listener) &&
PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect", PrintMatchAndExplain(effect_node, "effect", effect_matcher_,
effect_matcher_, listener) && listener) &&
PrintMatchAndExplain(NodeProperties::GetControlInput(node), PrintMatchAndExplain(control_node, "control", control_matcher_,
"control", control_matcher_, listener)); listener));
} }
private: private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment