5#ifndef V8_COMPILER_BACKEND_REGISTER_ALLOCATOR_VERIFIER_H_
6#define V8_COMPILER_BACKEND_REGISTER_ALLOCATOR_VERIFIER_H_
17class InstructionBlock;
18class InstructionSequence;
131 return a.CompareCanonicalized(b);
157 auto existent =
map_.find(operand);
158 if (existent !=
map_.end()) {
160 map_.erase(existent);
174 map_.insert(other->map_.begin(), other->map_.end());
176 other->stale_ref_stack_slots_.end());
180 std::optional<int> vreg = std::nullopt);
260 auto it =
map_.find(op);
261 if (it ==
map_.end()) {
262 map_.insert(std::make_pair(op, vreg));
278 static void VerifyInput(
const OperandConstraint& constraint);
279 static void VerifyTemp(
const OperandConstraint& constraint);
280 static void VerifyOutput(
const OperandConstraint& constraint);
283 OperandConstraint* constraint);
285 const OperandConstraint* constraint);
293 int virtual_register);
Assessment & operator=(const Assessment &)=delete
Assessment(AssessmentKind kind)
Assessment(const Assessment &)=delete
AssessmentKind kind() const
const InstructionSequence * sequence_
OperandSet stale_ref_stack_slots_
void CheckReferenceMap(const ReferenceMap *reference_map)
void PerformParallelMoves(const ParallelMove *moves)
bool IsStaleReferenceStackSlot(InstructionOperand op, std::optional< int > vreg=std::nullopt)
const OperandMap & map() const
BlockAssessments(Zone *zone, int spill_slot_delta, const InstructionSequence *sequence)
void CopyFrom(const BlockAssessments *other)
void PerformMoves(const Instruction *instruction)
void AddDefinition(InstructionOperand operand, int virtual_register)
const OperandSet & stale_ref_stack_slots() const
BlockAssessments(const BlockAssessments &)=delete
OperandMap map_for_moves_
OperandSet & stale_ref_stack_slots()
int spill_slot_delta() const
BlockAssessments & operator=(const BlockAssessments &)=delete
void Drop(InstructionOperand operand)
FinalAssessment & operator=(const FinalAssessment &)=delete
static const FinalAssessment * cast(const Assessment *assessment)
int virtual_register() const
FinalAssessment(int virtual_register)
FinalAssessment(const FinalAssessment &)=delete
const InstructionBlock *const origin_
const InstructionBlock * origin() const
InstructionOperand operand_
PendingAssessment(const PendingAssessment &)=delete
InstructionOperand operand() const
static const PendingAssessment * cast(const Assessment *assessment)
bool IsAliasOf(int vreg) const
PendingAssessment(Zone *zone, const InstructionBlock *origin, InstructionOperand operand)
PendingAssessment & operator=(const PendingAssessment &)=delete
static PendingAssessment * cast(Assessment *assessment)
void AddDelayedAssessment(InstructionOperand op, int vreg)
DelayedAssessments(Zone *zone)
const ZoneMap< InstructionOperand, int, OperandAsKeyLess > & map() const
ZoneMap< InstructionOperand, int, OperandAsKeyLess > map_
RegisterAllocatorVerifier(const RegisterAllocatorVerifier &)=delete
static void VerifyOutput(const OperandConstraint &constraint)
void VerifyAssignment(const char *caller_info)
BlockAssessments * CreateForBlock(const InstructionBlock *block)
@ kRegisterOrSlotOrConstant
ZoneMap< RpoNumber, BlockAssessments * > assessments_
static void VerifyInput(const OperandConstraint &constraint)
const RegisterConfiguration * config()
RegisterAllocatorVerifier(Zone *zone, const RegisterConfiguration *config, const InstructionSequence *sequence, const Frame *frame)
const InstructionSequence *const sequence_
static void VerifyTemp(const OperandConstraint &constraint)
const InstructionSequence * sequence() const
void ValidateUse(RpoNumber block_id, BlockAssessments *current_assessments, InstructionOperand op, int virtual_register)
RegisterAllocatorVerifier & operator=(const RegisterAllocatorVerifier &)=delete
void BuildConstraint(const InstructionOperand *op, OperandConstraint *constraint)
void ValidatePendingAssessment(RpoNumber block_id, InstructionOperand op, const BlockAssessments *current_assessments, PendingAssessment *const assessment, int virtual_register)
const char * caller_info_
Constraints * constraints()
int spill_slot_delta() const
ZoneMap< RpoNumber, DelayedAssessments * > outstanding_assessments_
void CheckConstraint(const InstructionOperand *op, const OperandConstraint *constraint)
const RegisterConfiguration * config_
#define CHECK_NOT_NULL(val)
#define CHECK_EQ(lhs, rhs)
bool operator()(const InstructionOperand &a, const InstructionOperand &b) const
OperandConstraint * operand_constraints_
size_t operand_constaints_size_
const Instruction * instruction_