5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_H_
6 #define V8_COMPILER_INSTRUCTION_SELECTOR_H_
21 class FlagsContinuation;
23 class InstructionSelector
FINAL {
29 SourcePositionTable* source_positions,
30 Features features = SupportedFeatures());
65 class Features
FINAL {
68 explicit Features(
unsigned bits) : bits_(bits) {}
79 return features_.Contains(feature);
88 bool IsLive(Node* node)
const {
return !IsDefined(node) && IsUsed(node); }
144 bool call_code_immediate,
145 bool call_address_immediate);
165 #define DECLARE_GENERATOR(x) void Visit##x(Node* node);
167 #undef DECLARE_GENERATOR
184 BasicBlock* deoptimization);
186 void VisitBranch(Node* input, BasicBlock* tbranch, BasicBlock* fbranch);
206 BasicBlock* current_block_;
static unsigned SupportedFeatures()
void MarkAsReference(Node *node)
FrameStateDescriptor * GetFrameStateDescriptor(Node *node)
void VisitControl(BasicBlock *block)
Schedule * schedule() const
void VisitWord32Test(Node *node, FlagsContinuation *cont)
bool CanCover(Node *user, Node *node) const
void VisitNode(Node *node)
void VisitThrow(Node *value)
Instruction * Emit(InstructionCode opcode, InstructionOperand *output, InstructionOperand *a, InstructionOperand *b, InstructionOperand *c, size_t temp_count=0, InstructionOperand **temps=NULL)
Instruction * Emit(InstructionCode opcode, InstructionOperand *output, size_t temp_count=0, InstructionOperand **temps=NULL)
InstructionSelector(InstructionSequence *sequence, SourcePositionTable *source_positions, Features features=SupportedFeatures())
void SelectInstructions()
void MarkAsUsed(Node *node)
Instruction * Emit(InstructionCode opcode, InstructionOperand *output, InstructionOperand *a, InstructionOperand *b, InstructionOperand *c, InstructionOperand *d, size_t temp_count=0, InstructionOperand **temps=NULL)
bool IsSupported(CpuFeature feature) const
void VisitReturn(Node *value)
void VisitBlock(BasicBlock *block)
InstructionSequence * sequence() const
ZoneDeque< Instruction * > instructions_
void VisitDeoptimize(Node *deopt)
void VisitInt32SubWithOverflow(Node *node, FlagsContinuation *cont)
void MarkAsDefined(Node *node)
void VisitPhi(Node *node)
void InitializeCallBuffer(Node *call, CallBuffer *buffer, bool call_code_immediate, bool call_address_immediate)
void VisitWord64Test(Node *node, FlagsContinuation *cont)
void VisitConstant(Node *node)
bool IsDefined(Node *node) const
bool IsNextInAssemblyOrder(const BasicBlock *block) const
bool IsDouble(const Node *node) const
bool IsUsed(Node *node) const
Zone * instruction_zone() const
void VisitGoto(BasicBlock *target)
Instruction * Emit(Instruction *instr)
void VisitWord64Compare(Node *node, FlagsContinuation *cont)
SourcePositionTable * source_positions_
void VisitFinish(Node *node)
void MarkAsRepresentation(MachineType rep, Node *node)
static Features SupportedFeatures()
Linkage * linkage() const
Instruction * Emit(InstructionCode opcode, InstructionOperand *output, InstructionOperand *a, InstructionOperand *b, size_t temp_count=0, InstructionOperand **temps=NULL)
void VisitWord32Compare(Node *node, FlagsContinuation *cont)
void VisitBranch(Node *input, BasicBlock *tbranch, BasicBlock *fbranch)
Instruction * Emit(InstructionCode opcode, size_t output_count, InstructionOperand **outputs, size_t input_count, InstructionOperand **inputs, size_t temp_count=0, InstructionOperand **temps=NULL)
void VisitFloat64Compare(Node *node, FlagsContinuation *cont)
void VisitParameter(Node *node)
bool IsReference(const Node *node) const
void VisitProjection(Node *node)
bool IsLive(Node *node) const
void VisitInt32AddWithOverflow(Node *node, FlagsContinuation *cont)
Instruction * Emit(InstructionCode opcode, InstructionOperand *output, InstructionOperand *a, size_t temp_count=0, InstructionOperand **temps=NULL)
InstructionSequence * sequence_
void AddFrameStateInputs(Node *state, InstructionOperandVector *inputs, FrameStateDescriptor *descriptor)
void MarkAsDouble(Node *node)
void VisitCall(Node *call, BasicBlock *continuation, BasicBlock *deoptimization)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define DECLARE_GENERATOR(x)
Debugger support for the V8 JavaScript engine.
#define MACHINE_OP_LIST(V)
bool Contains(CpuFeature f) const
Features(CpuFeature f1, CpuFeature f2)