#include "src/compiler/load-elimination.h"
#include <optional>
#include "src/compiler/access-builder.h"
#include "src/compiler/common-operator.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/js-heap-broker.h"
#include "src/compiler/node-properties.h"
#include "src/heap/factory.h"
#include "src/objects/objects-inl.h"
namespace v8 {
namespace internal {
namespace compiler {
namespace {
bool IsRename(Node* node) { … }
Node* ResolveRenames(Node* node) { … }
bool MayAlias(Node* a, Node* b) { … }
bool MustAlias(Node* a, Node* b) { … }
}
Reduction LoadElimination::Reduce(Node* node) { … }
namespace {
bool IsCompatible(MachineRepresentation r1, MachineRepresentation r2) { … }
}
LoadElimination::AbstractState const
LoadElimination::AbstractState::empty_state_;
Node* LoadElimination::AbstractElements::Lookup(
Node* object, Node* index, MachineRepresentation representation) const { … }
LoadElimination::AbstractElements const*
LoadElimination::AbstractElements::Kill(Node* object, Node* index,
Zone* zone) const { … }
bool LoadElimination::AbstractElements::Equals(
AbstractElements const* that) const { … }
LoadElimination::AbstractElements const*
LoadElimination::AbstractElements::Merge(AbstractElements const* that,
Zone* zone) const { … }
void LoadElimination::AbstractElements::Print() const { … }
LoadElimination::FieldInfo const* LoadElimination::AbstractField::Lookup(
Node* object) const { … }
namespace {
bool MayAlias(MaybeHandle<Name> x, MaybeHandle<Name> y) { … }
}
class LoadElimination::AliasStateInfo { … };
LoadElimination::AbstractField const* LoadElimination::AbstractField::KillConst(
Node* object, Zone* zone) const { … }
LoadElimination::AbstractField const* LoadElimination::AbstractField::Kill(
const AliasStateInfo& alias_info, MaybeHandle<Name> name,
Zone* zone) const { … }
void LoadElimination::AbstractField::Print() const { … }
LoadElimination::AbstractMaps::AbstractMaps(Zone* zone)
: … { … }
LoadElimination::AbstractMaps::AbstractMaps(Node* object, ZoneRefSet<Map> maps,
Zone* zone)
: … { … }
bool LoadElimination::AbstractMaps::Lookup(Node* object,
ZoneRefSet<Map>* object_maps) const { … }
LoadElimination::AbstractMaps const* LoadElimination::AbstractMaps::Kill(
const AliasStateInfo& alias_info, Zone* zone) const { … }
LoadElimination::AbstractMaps const* LoadElimination::AbstractMaps::Merge(
AbstractMaps const* that, Zone* zone) const { … }
LoadElimination::AbstractMaps const* LoadElimination::AbstractMaps::Extend(
Node* object, ZoneRefSet<Map> maps, Zone* zone) const { … }
void LoadElimination::AbstractMaps::Print() const { … }
bool LoadElimination::AbstractState::FieldsEquals(
AbstractFields const& this_fields,
AbstractFields const& that_fields) const { … }
bool LoadElimination::AbstractState::Equals(AbstractState const* that) const { … }
void LoadElimination::AbstractState::FieldsMerge(
AbstractFields* this_fields, AbstractFields const& that_fields,
Zone* zone) { … }
void LoadElimination::AbstractState::Merge(AbstractState const* that,
Zone* zone) { … }
bool LoadElimination::AbstractState::LookupMaps(
Node* object, ZoneRefSet<Map>* object_map) const { … }
LoadElimination::AbstractState const* LoadElimination::AbstractState::SetMaps(
Node* object, ZoneRefSet<Map> maps, Zone* zone) const { … }
LoadElimination::AbstractState const* LoadElimination::AbstractState::KillMaps(
const AliasStateInfo& alias_info, Zone* zone) const { … }
LoadElimination::AbstractState const* LoadElimination::AbstractState::KillMaps(
Node* object, Zone* zone) const { … }
Node* LoadElimination::AbstractState::LookupElement(
Node* object, Node* index, MachineRepresentation representation) const { … }
LoadElimination::AbstractState const*
LoadElimination::AbstractState::AddElement(Node* object, Node* index,
Node* value,
MachineRepresentation representation,
Zone* zone) const { … }
LoadElimination::AbstractState const*
LoadElimination::AbstractState::KillElement(Node* object, Node* index,
Zone* zone) const { … }
LoadElimination::AbstractState const* LoadElimination::AbstractState::AddField(
Node* object, IndexRange index_range, LoadElimination::FieldInfo info,
Zone* zone) const { … }
LoadElimination::AbstractState const*
LoadElimination::AbstractState::KillConstField(Node* object,
IndexRange index_range,
Zone* zone) const { … }
LoadElimination::AbstractState const* LoadElimination::AbstractState::KillField(
Node* object, IndexRange index_range, MaybeHandle<Name> name,
Zone* zone) const { … }
LoadElimination::AbstractState const* LoadElimination::AbstractState::KillField(
const AliasStateInfo& alias_info, IndexRange index_range,
MaybeHandle<Name> name, Zone* zone) const { … }
LoadElimination::AbstractState const*
LoadElimination::AbstractState::KillFields(Node* object, MaybeHandle<Name> name,
Zone* zone) const { … }
LoadElimination::AbstractState const* LoadElimination::AbstractState::KillAll(
Zone* zone) const { … }
LoadElimination::FieldInfo const* LoadElimination::AbstractState::LookupField(
Node* object, IndexRange index_range,
ConstFieldInfo const_field_info) const { … }
bool LoadElimination::AliasStateInfo::MayAlias(Node* other) const { … }
void LoadElimination::AbstractState::Print() const { … }
LoadElimination::AbstractState const*
LoadElimination::AbstractStateForEffectNodes::Get(Node* node) const { … }
void LoadElimination::AbstractStateForEffectNodes::Set(
Node* node, AbstractState const* state) { … }
Reduction LoadElimination::ReduceMapGuard(Node* node) { … }
Reduction LoadElimination::ReduceCheckMaps(Node* node) { … }
Reduction LoadElimination::ReduceCompareMaps(Node* node) { … }
Reduction LoadElimination::ReduceEnsureWritableFastElements(Node* node) { … }
Reduction LoadElimination::ReduceMaybeGrowFastElements(Node* node) { … }
Reduction LoadElimination::ReduceTransitionElementsKind(Node* node) { … }
Reduction LoadElimination::ReduceTransitionAndStoreElement(Node* node) { … }
Reduction LoadElimination::ReduceLoadField(Node* node,
FieldAccess const& access) { … }
Reduction LoadElimination::ReduceStoreField(Node* node,
FieldAccess const& access) { … }
Reduction LoadElimination::ReduceLoadElement(Node* node) { … }
Reduction LoadElimination::ReduceStoreElement(Node* node) { … }
Reduction LoadElimination::ReduceStoreTypedElement(Node* node) { … }
LoadElimination::AbstractState const* LoadElimination::UpdateStateForPhi(
AbstractState const* state, Node* effect_phi, Node* phi) { … }
Reduction LoadElimination::ReduceEffectPhi(Node* node) { … }
Reduction LoadElimination::ReduceStart(Node* node) { … }
Reduction LoadElimination::ReduceOtherNode(Node* node) { … }
Reduction LoadElimination::UpdateState(Node* node, AbstractState const* state) { … }
LoadElimination::AbstractState const*
LoadElimination::ComputeLoopStateForStoreField(
Node* current, LoadElimination::AbstractState const* state,
FieldAccess const& access) const { … }
LoadElimination::AbstractState const* LoadElimination::ComputeLoopState(
Node* node, AbstractState const* state) const { … }
LoadElimination::IndexRange LoadElimination::FieldIndexOf(
int offset, int representation_size) { … }
LoadElimination::IndexRange LoadElimination::FieldIndexOf(
FieldAccess const& access) { … }
CommonOperatorBuilder* LoadElimination::common() const { … }
Graph* LoadElimination::graph() const { … }
Isolate* LoadElimination::isolate() const { … }
Factory* LoadElimination::factory() const { … }
}
}
}