5 #ifndef V8_COMPILER_REDUNDANCY_ELIMINATION_H_ 6 #define V8_COMPILER_REDUNDANCY_ELIMINATION_H_ 8 #include "src/compiler/graph-reducer.h" 19 const char* reducer_name()
const override {
return "RedundancyElimination"; }
25 Check(
Node* node, Check* next) : node(node), next(next) {}
30 class EffectPathChecks final {
32 static EffectPathChecks* Copy(
Zone* zone, EffectPathChecks
const* checks);
33 static EffectPathChecks
const* Empty(
Zone* zone);
34 bool Equals(EffectPathChecks
const* that)
const;
35 void Merge(EffectPathChecks
const* that);
37 EffectPathChecks
const* AddCheck(
Zone* zone,
Node* node)
const;
39 Node* LookupBoundsCheckFor(
Node* node)
const;
42 EffectPathChecks(Check* head,
size_t size) : head_(head), size_(size) {}
50 class PathChecksForEffectNodes final {
52 explicit PathChecksForEffectNodes(
Zone* zone) : info_for_node_(zone) {}
53 EffectPathChecks
const* Get(
Node* node)
const;
54 void Set(
Node* node, EffectPathChecks
const* checks);
68 Reduction UpdateChecks(
Node* node, EffectPathChecks
const* checks);
70 Zone* zone()
const {
return zone_; }
72 PathChecksForEffectNodes node_checks_;
82 #endif // V8_COMPILER_REDUNDANCY_ELIMINATION_H_