#include "src/compiler/redundancy-elimination.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/node-properties.h"
#include "src/compiler/simplified-operator.h"
namespace v8 {
namespace internal {
namespace compiler {
RedundancyElimination::RedundancyElimination(Editor* editor, JSGraph* jsgraph,
Zone* zone)
: … { … }
RedundancyElimination::~RedundancyElimination() = default;
Reduction RedundancyElimination::Reduce(Node* node) { … }
RedundancyElimination::EffectPathChecks*
RedundancyElimination::EffectPathChecks::Copy(Zone* zone,
EffectPathChecks const* checks) { … }
RedundancyElimination::EffectPathChecks const*
RedundancyElimination::EffectPathChecks::Empty(Zone* zone) { … }
bool RedundancyElimination::EffectPathChecks::Equals(
EffectPathChecks const* that) const { … }
void RedundancyElimination::EffectPathChecks::Merge(
EffectPathChecks const* that) { … }
RedundancyElimination::EffectPathChecks const*
RedundancyElimination::EffectPathChecks::AddCheck(Zone* zone,
Node* node) const { … }
namespace {
struct Subsumption { … };
Subsumption CheckSubsumes(Node const* a, Node const* b,
MachineOperatorBuilder* machine) { … }
bool TypeSubsumes(Node* node, Node* replacement) { … }
}
Node* RedundancyElimination::EffectPathChecks::LookupCheck(
Node* node, JSGraph* jsgraph) const { … }
Node* RedundancyElimination::EffectPathChecks::LookupBoundsCheckFor(
Node* node) const { … }
RedundancyElimination::EffectPathChecks const*
RedundancyElimination::PathChecksForEffectNodes::Get(Node* node) const { … }
void RedundancyElimination::PathChecksForEffectNodes::Set(
Node* node, EffectPathChecks const* checks) { … }
Reduction RedundancyElimination::ReduceCheckNode(Node* node) { … }
Reduction RedundancyElimination::ReduceEffectPhi(Node* node) { … }
Reduction RedundancyElimination::ReduceSpeculativeNumberComparison(Node* node) { … }
Reduction RedundancyElimination::ReduceSpeculativeNumberOperation(Node* node) { … }
Reduction RedundancyElimination::ReduceStart(Node* node) { … }
Reduction RedundancyElimination::ReduceOtherNode(Node* node) { … }
Reduction RedundancyElimination::TakeChecksFromFirstEffect(Node* node) { … }
Reduction RedundancyElimination::UpdateChecks(Node* node,
EffectPathChecks const* checks) { … }
}
}
}