Commit 8e5e6333 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Remove obsolete EffectSet common operator.

This operator was initially designed to handle arbitrary effect merging
for effect relaxation, but we don't do that (at least currently). So no
need to keep the dead operator around.

R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/1954983002
Cr-Commit-Position: refs/heads/master@{#36063}
parent f6df485d
......@@ -768,15 +768,6 @@ const Operator* CommonOperatorBuilder::Guard(Type* type) {
}
const Operator* CommonOperatorBuilder::EffectSet(int arguments) {
DCHECK(arguments > 1); // Disallow empty/singleton sets.
return new (zone()) Operator( // --
IrOpcode::kEffectSet, Operator::kPure, // opcode
"EffectSet", // name
0, arguments, 0, 0, 1, 0); // counts
}
const Operator* CommonOperatorBuilder::StateValues(int arguments) {
switch (arguments) {
#define CACHED_STATE_VALUES(arguments) \
......
......@@ -190,7 +190,6 @@ class CommonOperatorBuilder final : public ZoneObject {
const Operator* Phi(MachineRepresentation representation,
int value_input_count);
const Operator* EffectPhi(int effect_input_count);
const Operator* EffectSet(int arguments);
const Operator* Guard(Type* type);
const Operator* BeginRegion();
const Operator* FinishRegion();
......
......@@ -46,7 +46,6 @@
#define INNER_OP_LIST(V) \
V(Select) \
V(Phi) \
V(EffectSet) \
V(EffectPhi) \
V(Guard) \
V(BeginRegion) \
......
......@@ -700,12 +700,6 @@ Type* Typer::Visitor::TypeEffectPhi(Node* node) {
}
Type* Typer::Visitor::TypeEffectSet(Node* node) {
UNREACHABLE();
return nullptr;
}
Type* Typer::Visitor::TypeGuard(Node* node) {
Type* input_type = Operand(node, 0);
Type* guard_type = OpParameter<Type*>(node);
......
......@@ -417,12 +417,6 @@ void Verifier::Visitor::Check(Node* node) {
CHECK_EQ(input_count, 1 + effect_count);
break;
}
case IrOpcode::kEffectSet: {
CHECK_EQ(0, value_count);
CHECK_EQ(0, control_count);
CHECK_LT(1, effect_count);
break;
}
case IrOpcode::kGuard:
// TODO(bmeurer): what are the constraints on these?
break;
......
......@@ -612,49 +612,6 @@ 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 {
if (!NodeMatcher::MatchAndExplain(node, listener)) return false;
Node* effect0 = NodeProperties::GetEffectInput(node, 0);
Node* effect1 = NodeProperties::GetEffectInput(node, 1);
{
// Try matching in the reverse order first.
StringMatchResultListener value_listener;
if (effect0_matcher_.MatchAndExplain(effect1, &value_listener) &&
effect1_matcher_.MatchAndExplain(effect0, &value_listener)) {
return true;
}
}
return PrintMatchAndExplain(effect0, "effect0", effect0_matcher_,
listener) &&
PrintMatchAndExplain(effect1, "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,
......@@ -1818,12 +1775,6 @@ 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));
......
......@@ -97,8 +97,6 @@ Matcher<Node*> IsPhi(const Matcher<MachineRepresentation>& type_matcher,
Matcher<Node*> IsEffectPhi(const Matcher<Node*>& effect0_matcher,
const Matcher<Node*>& effect1_matcher,
const Matcher<Node*>& merge_matcher);
Matcher<Node*> IsEffectSet(const Matcher<Node*>& effect0_matcher,
const Matcher<Node*>& effect1_matcher);
Matcher<Node*> IsProjection(const Matcher<size_t>& index_matcher,
const Matcher<Node*>& base_matcher);
Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
......
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