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

Unified Diff: src/compiler/graph-unittest.cc

Issue 545153002: [turbofan] Add MachineType to Phi. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test case. Created 6 years, 3 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 | « src/compiler/graph-unittest.h ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/graph-unittest.cc
diff --git a/src/compiler/graph-unittest.cc b/src/compiler/graph-unittest.cc
index 2af9065e007849f720a0fa50f8d1596aae7c83fe..5be2ec540835230f38324ba5b30979da92e2bfeb 100644
--- a/src/compiler/graph-unittest.cc
+++ b/src/compiler/graph-unittest.cc
@@ -285,17 +285,21 @@ class IsConstantMatcher FINAL : public NodeMatcher {
class IsPhiMatcher FINAL : public NodeMatcher {
public:
- IsPhiMatcher(const Matcher<Node*>& value0_matcher,
+ IsPhiMatcher(const Matcher<MachineType>& type_matcher,
+ const Matcher<Node*>& value0_matcher,
const Matcher<Node*>& value1_matcher,
const Matcher<Node*>& control_matcher)
: NodeMatcher(IrOpcode::kPhi),
+ type_matcher_(type_matcher),
value0_matcher_(value0_matcher),
value1_matcher_(value1_matcher),
control_matcher_(control_matcher) {}
virtual void DescribeTo(std::ostream* os) const OVERRIDE {
NodeMatcher::DescribeTo(os);
- *os << " whose value0 (";
+ *os << " whose type (";
+ type_matcher_.DescribeTo(os);
+ *os << "), value0 (";
value0_matcher_.DescribeTo(os);
*os << "), value1 (";
value1_matcher_.DescribeTo(os);
@@ -307,6 +311,8 @@ class IsPhiMatcher FINAL : public NodeMatcher {
virtual bool MatchAndExplain(Node* node, MatchResultListener* listener) const
OVERRIDE {
return (NodeMatcher::MatchAndExplain(node, listener) &&
+ PrintMatchAndExplain(OpParameter<MachineType>(node), "type",
+ type_matcher_, listener) &&
PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0),
"value0", value0_matcher_, listener) &&
PrintMatchAndExplain(NodeProperties::GetValueInput(node, 1),
@@ -316,6 +322,7 @@ class IsPhiMatcher FINAL : public NodeMatcher {
}
private:
+ const Matcher<MachineType> type_matcher_;
const Matcher<Node*> value0_matcher_;
const Matcher<Node*> value1_matcher_;
const Matcher<Node*> control_matcher_;
@@ -669,11 +676,12 @@ Matcher<Node*> IsNumberConstant(const Matcher<double>& value_matcher) {
}
-Matcher<Node*> IsPhi(const Matcher<Node*>& value0_matcher,
+Matcher<Node*> IsPhi(const Matcher<MachineType>& type_matcher,
+ const Matcher<Node*>& value0_matcher,
const Matcher<Node*>& value1_matcher,
const Matcher<Node*>& merge_matcher) {
- return MakeMatcher(
- new IsPhiMatcher(value0_matcher, value1_matcher, merge_matcher));
+ return MakeMatcher(new IsPhiMatcher(type_matcher, value0_matcher,
+ value1_matcher, merge_matcher));
}
« no previous file with comments | « src/compiler/graph-unittest.h ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698