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 {
return Load(rep, base, IntPtrConstant(0));
}
Node* Load(MachineType rep, Node* base, Node* index) {
return AddNode(machine()->Load(rep), base, index, graph()->start(),
graph()->start());
return AddNode(machine()->Load(rep), base, index);
}
Node* Store(MachineType rep, Node* base, Node* value,
WriteBarrierKind write_barrier) {
......@@ -121,7 +120,7 @@ class RawMachineAssembler {
Node* Store(MachineType rep, Node* base, Node* index, Node* value,
WriteBarrierKind write_barrier) {
return AddNode(machine()->Store(StoreRepresentation(rep, write_barrier)),
base, index, value, graph()->start(), graph()->start());
base, index, value);
}
// Arithmetic Operations.
......@@ -246,10 +245,10 @@ class RawMachineAssembler {
return AddNode(machine()->Int32MulHigh(), a, 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) {
return AddNode(machine()->Int32Mod(), a, b, graph()->start());
return AddNode(machine()->Int32Mod(), a, b);
}
Node* Int32LessThan(Node* a, Node* b) {
return AddNode(machine()->Int32LessThan(), a, b);
......@@ -258,7 +257,7 @@ class RawMachineAssembler {
return AddNode(machine()->Int32LessThanOrEqual(), a, 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) {
return AddNode(machine()->Uint32LessThan(), a, b);
......@@ -267,7 +266,7 @@ class RawMachineAssembler {
return AddNode(machine()->Uint32LessThanOrEqual(), a, 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) {
return AddNode(machine()->Uint32MulHigh(), a, b);
......
......@@ -69,8 +69,7 @@ Matcher<Node*> IsWordOr(const Matcher<Node*>& lhs_matcher,
Matcher<Node*> InterpreterAssemblerTest::InterpreterAssemblerForTest::IsLoad(
const Matcher<LoadRepresentation>& rep_matcher,
const Matcher<Node*>& base_matcher, const Matcher<Node*>& index_matcher) {
return ::i::compiler::IsLoad(rep_matcher, base_matcher, index_matcher,
graph()->start(), graph()->start());
return ::i::compiler::IsLoad(rep_matcher, base_matcher, index_matcher, _, _);
}
......@@ -79,8 +78,7 @@ Matcher<Node*> InterpreterAssemblerTest::InterpreterAssemblerForTest::IsStore(
const Matcher<Node*>& base_matcher, const Matcher<Node*>& index_matcher,
const Matcher<Node*>& value_matcher) {
return ::i::compiler::IsStore(rep_matcher, base_matcher, index_matcher,
value_matcher, graph()->start(),
graph()->start());
value_matcher, _, _);
}
......
......@@ -1212,6 +1212,14 @@ class IsLoadMatcher final : public NodeMatcher {
}
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) &&
PrintMatchAndExplain(OpParameter<LoadRepresentation>(node), "rep",
rep_matcher_, listener) &&
......@@ -1219,10 +1227,10 @@ class IsLoadMatcher final : public NodeMatcher {
base_matcher_, listener) &&
PrintMatchAndExplain(NodeProperties::GetValueInput(node, 1),
"index", index_matcher_, listener) &&
PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect",
effect_matcher_, listener) &&
PrintMatchAndExplain(NodeProperties::GetControlInput(node),
"control", control_matcher_, listener));
PrintMatchAndExplain(effect_node, "effect", effect_matcher_,
listener) &&
PrintMatchAndExplain(control_node, "control", control_matcher_,
listener));
}
private:
......@@ -1268,6 +1276,14 @@ class IsStoreMatcher final : public NodeMatcher {
}
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) &&
PrintMatchAndExplain(OpParameter<StoreRepresentation>(node), "rep",
rep_matcher_, listener) &&
......@@ -1277,10 +1293,10 @@ class IsStoreMatcher final : public NodeMatcher {
"index", index_matcher_, listener) &&
PrintMatchAndExplain(NodeProperties::GetValueInput(node, 2),
"value", value_matcher_, listener) &&
PrintMatchAndExplain(NodeProperties::GetEffectInput(node), "effect",
effect_matcher_, listener) &&
PrintMatchAndExplain(NodeProperties::GetControlInput(node),
"control", control_matcher_, listener));
PrintMatchAndExplain(effect_node, "effect", effect_matcher_,
listener) &&
PrintMatchAndExplain(control_node, "control", control_matcher_,
listener));
}
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