MIPS: Refactor bailout reasons and disable optimization in more cases.
Port r24161 (008f335) BUG= R=dusan.milosavljevic@imgtec.com Review URL: https://codereview.chromium.org/593313004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24175 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
b0b59073ac
commit
7301ee52f7
@ -430,12 +430,6 @@ LPlatformChunk* LChunkBuilder::Build() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LChunkBuilder::Abort(BailoutReason reason) {
|
|
||||||
info()->set_bailout_reason(reason);
|
|
||||||
status_ = ABORTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LUnallocated* LChunkBuilder::ToUnallocated(Register reg) {
|
LUnallocated* LChunkBuilder::ToUnallocated(Register reg) {
|
||||||
return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER,
|
return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER,
|
||||||
Register::ToAllocationIndex(reg));
|
Register::ToAllocationIndex(reg));
|
||||||
@ -2425,7 +2419,7 @@ LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
|
|||||||
} else {
|
} else {
|
||||||
spill_index = env_index - instr->environment()->first_local_index();
|
spill_index = env_index - instr->environment()->first_local_index();
|
||||||
if (spill_index > LUnallocated::kMaxFixedSlotIndex) {
|
if (spill_index > LUnallocated::kMaxFixedSlotIndex) {
|
||||||
Abort(kTooManySpillSlotsNeededForOSR);
|
Retry(kTooManySpillSlotsNeededForOSR);
|
||||||
spill_index = 0;
|
spill_index = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2718,17 +2718,11 @@ class LPlatformChunk FINAL : public LChunk {
|
|||||||
class LChunkBuilder FINAL : public LChunkBuilderBase {
|
class LChunkBuilder FINAL : public LChunkBuilderBase {
|
||||||
public:
|
public:
|
||||||
LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
|
LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
|
||||||
: LChunkBuilderBase(graph->zone()),
|
: LChunkBuilderBase(info, graph),
|
||||||
chunk_(NULL),
|
|
||||||
info_(info),
|
|
||||||
graph_(graph),
|
|
||||||
status_(UNUSED),
|
|
||||||
current_instruction_(NULL),
|
current_instruction_(NULL),
|
||||||
current_block_(NULL),
|
current_block_(NULL),
|
||||||
next_block_(NULL),
|
next_block_(NULL),
|
||||||
allocator_(allocator) { }
|
allocator_(allocator) {}
|
||||||
|
|
||||||
Isolate* isolate() const { return graph_->isolate(); }
|
|
||||||
|
|
||||||
// Build the sequence for the graph.
|
// Build the sequence for the graph.
|
||||||
LPlatformChunk* Build();
|
LPlatformChunk* Build();
|
||||||
@ -2762,24 +2756,6 @@ class LChunkBuilder FINAL : public LChunkBuilderBase {
|
|||||||
LInstruction* DoFlooringDivI(HMathFloorOfDiv* instr);
|
LInstruction* DoFlooringDivI(HMathFloorOfDiv* instr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum Status {
|
|
||||||
UNUSED,
|
|
||||||
BUILDING,
|
|
||||||
DONE,
|
|
||||||
ABORTED
|
|
||||||
};
|
|
||||||
|
|
||||||
LPlatformChunk* chunk() const { return chunk_; }
|
|
||||||
CompilationInfo* info() const { return info_; }
|
|
||||||
HGraph* graph() const { return graph_; }
|
|
||||||
|
|
||||||
bool is_unused() const { return status_ == UNUSED; }
|
|
||||||
bool is_building() const { return status_ == BUILDING; }
|
|
||||||
bool is_done() const { return status_ == DONE; }
|
|
||||||
bool is_aborted() const { return status_ == ABORTED; }
|
|
||||||
|
|
||||||
void Abort(BailoutReason reason);
|
|
||||||
|
|
||||||
// Methods for getting operands for Use / Define / Temp.
|
// Methods for getting operands for Use / Define / Temp.
|
||||||
LUnallocated* ToUnallocated(Register reg);
|
LUnallocated* ToUnallocated(Register reg);
|
||||||
LUnallocated* ToUnallocated(DoubleRegister reg);
|
LUnallocated* ToUnallocated(DoubleRegister reg);
|
||||||
@ -2865,10 +2841,6 @@ class LChunkBuilder FINAL : public LChunkBuilderBase {
|
|||||||
LInstruction* DoArithmeticT(Token::Value op,
|
LInstruction* DoArithmeticT(Token::Value op,
|
||||||
HBinaryOperation* instr);
|
HBinaryOperation* instr);
|
||||||
|
|
||||||
LPlatformChunk* chunk_;
|
|
||||||
CompilationInfo* info_;
|
|
||||||
HGraph* const graph_;
|
|
||||||
Status status_;
|
|
||||||
HInstruction* current_instruction_;
|
HInstruction* current_instruction_;
|
||||||
HBasicBlock* current_block_;
|
HBasicBlock* current_block_;
|
||||||
HBasicBlock* next_block_;
|
HBasicBlock* next_block_;
|
||||||
|
@ -430,12 +430,6 @@ LPlatformChunk* LChunkBuilder::Build() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LChunkBuilder::Abort(BailoutReason reason) {
|
|
||||||
info()->set_bailout_reason(reason);
|
|
||||||
status_ = ABORTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
LUnallocated* LChunkBuilder::ToUnallocated(Register reg) {
|
LUnallocated* LChunkBuilder::ToUnallocated(Register reg) {
|
||||||
return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER,
|
return new(zone()) LUnallocated(LUnallocated::FIXED_REGISTER,
|
||||||
Register::ToAllocationIndex(reg));
|
Register::ToAllocationIndex(reg));
|
||||||
@ -2425,7 +2419,7 @@ LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
|
|||||||
} else {
|
} else {
|
||||||
spill_index = env_index - instr->environment()->first_local_index();
|
spill_index = env_index - instr->environment()->first_local_index();
|
||||||
if (spill_index > LUnallocated::kMaxFixedSlotIndex) {
|
if (spill_index > LUnallocated::kMaxFixedSlotIndex) {
|
||||||
Abort(kTooManySpillSlotsNeededForOSR);
|
Retry(kTooManySpillSlotsNeededForOSR);
|
||||||
spill_index = 0;
|
spill_index = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2702,17 +2702,11 @@ class LPlatformChunk FINAL : public LChunk {
|
|||||||
class LChunkBuilder FINAL : public LChunkBuilderBase {
|
class LChunkBuilder FINAL : public LChunkBuilderBase {
|
||||||
public:
|
public:
|
||||||
LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
|
LChunkBuilder(CompilationInfo* info, HGraph* graph, LAllocator* allocator)
|
||||||
: LChunkBuilderBase(graph->zone()),
|
: LChunkBuilderBase(info, graph),
|
||||||
chunk_(NULL),
|
|
||||||
info_(info),
|
|
||||||
graph_(graph),
|
|
||||||
status_(UNUSED),
|
|
||||||
current_instruction_(NULL),
|
current_instruction_(NULL),
|
||||||
current_block_(NULL),
|
current_block_(NULL),
|
||||||
next_block_(NULL),
|
next_block_(NULL),
|
||||||
allocator_(allocator) { }
|
allocator_(allocator) {}
|
||||||
|
|
||||||
Isolate* isolate() const { return graph_->isolate(); }
|
|
||||||
|
|
||||||
// Build the sequence for the graph.
|
// Build the sequence for the graph.
|
||||||
LPlatformChunk* Build();
|
LPlatformChunk* Build();
|
||||||
@ -2746,24 +2740,6 @@ class LChunkBuilder FINAL : public LChunkBuilderBase {
|
|||||||
LInstruction* DoFlooringDivI(HMathFloorOfDiv* instr);
|
LInstruction* DoFlooringDivI(HMathFloorOfDiv* instr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum Status {
|
|
||||||
UNUSED,
|
|
||||||
BUILDING,
|
|
||||||
DONE,
|
|
||||||
ABORTED
|
|
||||||
};
|
|
||||||
|
|
||||||
LPlatformChunk* chunk() const { return chunk_; }
|
|
||||||
CompilationInfo* info() const { return info_; }
|
|
||||||
HGraph* graph() const { return graph_; }
|
|
||||||
|
|
||||||
bool is_unused() const { return status_ == UNUSED; }
|
|
||||||
bool is_building() const { return status_ == BUILDING; }
|
|
||||||
bool is_done() const { return status_ == DONE; }
|
|
||||||
bool is_aborted() const { return status_ == ABORTED; }
|
|
||||||
|
|
||||||
void Abort(BailoutReason reason);
|
|
||||||
|
|
||||||
// Methods for getting operands for Use / Define / Temp.
|
// Methods for getting operands for Use / Define / Temp.
|
||||||
LUnallocated* ToUnallocated(Register reg);
|
LUnallocated* ToUnallocated(Register reg);
|
||||||
LUnallocated* ToUnallocated(DoubleRegister reg);
|
LUnallocated* ToUnallocated(DoubleRegister reg);
|
||||||
@ -2849,10 +2825,6 @@ class LChunkBuilder FINAL : public LChunkBuilderBase {
|
|||||||
LInstruction* DoArithmeticT(Token::Value op,
|
LInstruction* DoArithmeticT(Token::Value op,
|
||||||
HBinaryOperation* instr);
|
HBinaryOperation* instr);
|
||||||
|
|
||||||
LPlatformChunk* chunk_;
|
|
||||||
CompilationInfo* info_;
|
|
||||||
HGraph* const graph_;
|
|
||||||
Status status_;
|
|
||||||
HInstruction* current_instruction_;
|
HInstruction* current_instruction_;
|
||||||
HBasicBlock* current_block_;
|
HBasicBlock* current_block_;
|
||||||
HBasicBlock* next_block_;
|
HBasicBlock* next_block_;
|
||||||
|
Loading…
Reference in New Issue
Block a user