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

Unified Diff: test/unittests/compiler/node-test-utils.cc

Issue 1510173004: Remove dummy control / effect edges from RMA Load / Store / Div nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@rma_edges_calls
Patch Set: Created 5 years 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 | « test/unittests/compiler/interpreter-assembler-unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/compiler/node-test-utils.cc
diff --git a/test/unittests/compiler/node-test-utils.cc b/test/unittests/compiler/node-test-utils.cc
index 7f6ddaec13388a850eb160db50d899cef151b8c3..886314e0cd7ec8437eb636a255f95cecd7c3d71e 100644
--- a/test/unittests/compiler/node-test-utils.cc
+++ b/test/unittests/compiler/node-test-utils.cc
@@ -1211,6 +1211,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) &&
@@ -1218,10 +1226,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:
@@ -1267,6 +1275,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) &&
@@ -1276,10 +1292,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:
« no previous file with comments | « test/unittests/compiler/interpreter-assembler-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698