#ifndef V8_MAGLEV_MAGLEV_REGALLOC_DATA_H_
#define V8_MAGLEV_MAGLEV_REGALLOC_DATA_H_
#include "src/base/pointer-with-payload.h"
#include "src/codegen/register.h"
#include "src/compiler/backend/instruction.h"
#include "src/maglev/maglev-assembler.h"
namespace v8 {
namespace internal {
namespace maglev {
class ValueNode;
static constexpr int kAllocatableGeneralRegisterCount = …MaglevAssembler::GetAllocatableRegisters().Count();
static constexpr int kAllocatableDoubleRegisterCount = …MaglevAssembler::GetAllocatableDoubleRegisters().Count();
template <typename T>
struct AllocatableRegisters;
template <>
struct AllocatableRegisters<Register> { … };
template <>
struct AllocatableRegisters<DoubleRegister> { … };
struct RegisterStateFlags { … };
constexpr bool operator==(const RegisterStateFlags& left,
const RegisterStateFlags& right) { … }
RegisterState;
struct RegisterMerge { … };
inline bool LoadMergeState(RegisterState state, RegisterMerge** merge) { … }
inline bool LoadMergeState(RegisterState state, ValueNode** node,
RegisterMerge** merge) { … }
}
}
}
#endif