5#ifndef V8_COMPILER_WASM_LOAD_ELIMINATION_H_
6#define V8_COMPILER_WASM_LOAD_ELIMINATION_H_
17class CommonOperatorBuilder;
20class MachineOperatorBuilder;
31 const
char* reducer_name()
const override {
return "WasmLoadElimination"; }
41 return value == other.value;
45 return !(*
this == other);
48 bool IsEmpty()
const {
return value ==
nullptr; }
61 return fields_ == that->fields_ &&
elements_ == that->elements_;
64 return fields_.begin() == fields_.end() &&
67 void IntersectWith(
HalfState const* that);
68 HalfState const* KillField(
int field_index,
Node*
object)
const;
75 template <
typename OuterKey>
83 template <
typename OuterKey>
86 InnerMap map_copy(map.Get(outer_key));
87 map_copy.
Set(inner_key, info);
88 map.Set(outer_key, map_copy);
104 : mutable_state(zone), immutable_state(zone) {}
106 : mutable_state(mutable_state), immutable_state(immutable_state) {}
109 return this->immutable_state.Equals(&that->immutable_state) &&
110 this->mutable_state.Equals(&that->mutable_state);
113 mutable_state.IntersectWith(&that->mutable_state);
114 immutable_state.IntersectWith(&that->immutable_state);
134 Reduction ReduceLoadLikeFromImmutable(
Node* node,
int index);
142 std::tuple<Node*, Node*> TruncateAndExtendOrType(
Node* value,
Node* effect,
void Set(Key key, Value value)
static void Update(OuterMap< OuterKey > &map, OuterKey outer_key, Node *inner_key, FieldOrElementValue info)
bool Equals(HalfState const *that) const
static void Print(const ElementInfos &infos)
static void Print(const FieldInfos &infos)
JSGraph * jsgraph() const
Reduction AssertUnreachable(Node *node)
NodeAuxData< AbstractState const * > node_states_
~WasmLoadElimination() final=default
AbstractState const empty_state_
AbstractState const * empty_state() const
Handle< FixedArray > elements_
#define NON_EXPORTED_BASE(code)
#define V8_EXPORT_PRIVATE
AbstractState(HalfState mutable_state, HalfState immutable_state)
AbstractState(Zone *zone)
HalfState immutable_state
void IntersectWith(AbstractState const *that)
bool Equals(AbstractState const *that) const
bool operator!=(const FieldOrElementValue &other) const
FieldOrElementValue()=default
FieldOrElementValue(Node *value)
bool operator==(const FieldOrElementValue &other) const