#include "src/compiler/turboshaft/late-load-elimination-reducer.h"
#include "src/compiler/backend/instruction.h"
#include "src/compiler/js-heap-broker.h"
#include "src/compiler/turboshaft/operation-matcher.h"
#include "src/compiler/turboshaft/operations.h"
#include "src/compiler/turboshaft/opmasks.h"
#include "src/compiler/turboshaft/phase.h"
#include "src/compiler/turboshaft/representations.h"
#include "src/objects/code-inl.h"
namespace v8::internal::compiler::turboshaft {
void LateLoadEliminationAnalyzer::Run() { … }
void LateLoadEliminationAnalyzer::ProcessBlock(const Block& block,
bool compute_start_snapshot) { … }
namespace {
bool RepIsCompatible(RegisterRepresentation actual,
RegisterRepresentation expected_reg_repr,
MemoryRepresentation expected_loaded_repr) { … }
}
void LateLoadEliminationAnalyzer::ProcessLoad(OpIndex op_idx,
const LoadOp& load) { … }
void LateLoadEliminationAnalyzer::ProcessStore(OpIndex op_idx,
const StoreOp& store) { … }
void LateLoadEliminationAnalyzer::ProcessCall(OpIndex op_idx,
const CallOp& op) { … }
void LateLoadEliminationAnalyzer::DcheckWordBinop(OpIndex op_idx,
const WordBinopOp& binop) { … }
void LateLoadEliminationAnalyzer::InvalidateAllNonAliasingInputs(
const Operation& op) { … }
void LateLoadEliminationAnalyzer::InvalidateIfAlias(OpIndex op_idx) { … }
void LateLoadEliminationAnalyzer::ProcessAllocate(OpIndex op_idx,
const AllocateOp&) { … }
void LateLoadEliminationAnalyzer::ProcessAssumeMap(
OpIndex op_idx, const AssumeMapOp& assume_map) { … }
bool IsInt32TruncatedLoadPattern(const Graph& graph, OpIndex change_idx,
const ChangeOp& change, OpIndex* bitcast_idx,
OpIndex* load_idx) { … }
void LateLoadEliminationAnalyzer::ProcessChange(OpIndex op_idx,
const ChangeOp& change) { … }
void LateLoadEliminationAnalyzer::FinishBlock(const Block* block) { … }
void LateLoadEliminationAnalyzer::SealAndDiscard() { … }
void LateLoadEliminationAnalyzer::StoreLoopSnapshotInForwardPredecessor(
const Block& loop_header) { … }
bool LateLoadEliminationAnalyzer::BackedgeHasSnapshot(
const Block& loop_header) const { … }
template <bool for_loop_revisit>
bool LateLoadEliminationAnalyzer::BeginBlock(const Block* block) { … }
template bool LateLoadEliminationAnalyzer::BeginBlock<true>(const Block* block);
template bool LateLoadEliminationAnalyzer::BeginBlock<false>(
const Block* block);
}