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

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

Issue 875263004: [turbofan] Ensure that NTLs are always properly connected to the end. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | « test/unittests/compiler/node-test-utils.h ('k') | test/unittests/compiler/scheduler-unittest.cc » ('j') | 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 18b072909130a1f4456a609095b789b5199589a5..a35e5d1bc77d7103ed9cb56d5b717dce959e1b3a 100644
--- a/test/unittests/compiler/node-test-utils.cc
+++ b/test/unittests/compiler/node-test-utils.cc
@@ -462,6 +462,37 @@ class IsEffectPhiMatcher FINAL : public NodeMatcher {
};
+class IsEffectSetMatcher FINAL : public NodeMatcher {
+ public:
+ IsEffectSetMatcher(const Matcher<Node*>& effect0_matcher,
+ const Matcher<Node*>& effect1_matcher)
+ : NodeMatcher(IrOpcode::kEffectSet),
+ effect0_matcher_(effect0_matcher),
+ effect1_matcher_(effect1_matcher) {}
+
+ void DescribeTo(std::ostream* os) const FINAL {
+ NodeMatcher::DescribeTo(os);
+ *os << "), effect0 (";
+ effect0_matcher_.DescribeTo(os);
+ *os << ") and effect1 (";
+ effect1_matcher_.DescribeTo(os);
+ *os << ")";
+ }
+
+ bool MatchAndExplain(Node* node, MatchResultListener* listener) const FINAL {
+ return (NodeMatcher::MatchAndExplain(node, listener) &&
+ PrintMatchAndExplain(NodeProperties::GetEffectInput(node, 0),
+ "effect0", effect0_matcher_, listener) &&
+ PrintMatchAndExplain(NodeProperties::GetEffectInput(node, 1),
+ "effect1", effect1_matcher_, listener));
+ }
+
+ private:
+ const Matcher<Node*> effect0_matcher_;
+ const Matcher<Node*> effect1_matcher_;
+};
+
+
class IsProjectionMatcher FINAL : public NodeMatcher {
public:
IsProjectionMatcher(const Matcher<size_t>& index_matcher,
@@ -1148,6 +1179,17 @@ class IsUnopMatcher FINAL : public NodeMatcher {
private:
const Matcher<Node*> input_matcher_;
};
+
+} // namespace
+
+
+Matcher<Node*> IsAlways() {
+ return MakeMatcher(new NodeMatcher(IrOpcode::kAlways));
+}
+
+
+Matcher<Node*> IsEnd(const Matcher<Node*>& control_matcher) {
+ return MakeMatcher(new IsControl1Matcher(IrOpcode::kEnd, control_matcher));
}
@@ -1290,6 +1332,12 @@ Matcher<Node*> IsEffectPhi(const Matcher<Node*>& effect0_matcher,
}
+Matcher<Node*> IsEffectSet(const Matcher<Node*>& effect0_matcher,
+ const Matcher<Node*>& effect1_matcher) {
+ return MakeMatcher(new IsEffectSetMatcher(effect0_matcher, effect1_matcher));
+}
+
+
Matcher<Node*> IsProjection(const Matcher<size_t>& index_matcher,
const Matcher<Node*>& base_matcher) {
return MakeMatcher(new IsProjectionMatcher(index_matcher, base_matcher));
« no previous file with comments | « test/unittests/compiler/node-test-utils.h ('k') | test/unittests/compiler/scheduler-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698