Remove kOsrCompileFailed bailout.
R=mstarzinger@chromium.org BUG= Review URL: https://codereview.chromium.org/1105133002 Cr-Commit-Position: refs/heads/master@{#28083}
This commit is contained in:
parent
da66e720a3
commit
44350b3d49
@ -323,7 +323,6 @@ namespace internal {
|
||||
"Wrong address or value passed to RecordWrite") \
|
||||
V(kShouldNotDirectlyEnterOsrFunction, \
|
||||
"Should not directly enter OSR-compiled function") \
|
||||
V(kOsrCompileFailed, "OSR compilation failed") \
|
||||
V(kYield, "Yield")
|
||||
|
||||
|
||||
|
@ -357,7 +357,7 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
|
||||
return AbortOptimization(kHydrogenFilter);
|
||||
}
|
||||
|
||||
// Crankshaft requires a version of fullcode with deoptimization support.
|
||||
// Optimization requires a version of fullcode with deoptimization support.
|
||||
// Recompile the unoptimized version of the code if the current version
|
||||
// doesn't have deoptimization support already.
|
||||
// Otherwise, if we are gathering compilation time and space statistics
|
||||
@ -378,9 +378,10 @@ OptimizedCompileJob::Status OptimizedCompileJob::CreateGraph() {
|
||||
|
||||
DCHECK(info()->shared_info()->has_deoptimization_support());
|
||||
|
||||
// Check the whitelist for TurboFan.
|
||||
if ((FLAG_turbo_asm && info()->shared_info()->asm_function()) ||
|
||||
info()->closure()->PassesFilter(FLAG_turbo_filter)) {
|
||||
// Check the enabling conditions for TurboFan.
|
||||
if (((FLAG_turbo_asm && info()->shared_info()->asm_function()) ||
|
||||
info()->closure()->PassesFilter(FLAG_turbo_filter)) &&
|
||||
(FLAG_turbo_osr || !info()->is_osr())) {
|
||||
if (FLAG_trace_opt) {
|
||||
OFStream os(stdout);
|
||||
os << "[compiling method " << Brief(*info()->closure())
|
||||
|
@ -285,7 +285,7 @@ static void TransferOsrValueTypesFromLoopPhis(Zone* zone, Node* osr_loop_entry,
|
||||
}
|
||||
|
||||
|
||||
bool OsrHelper::Deconstruct(JSGraph* jsgraph, CommonOperatorBuilder* common,
|
||||
void OsrHelper::Deconstruct(JSGraph* jsgraph, CommonOperatorBuilder* common,
|
||||
Zone* tmp_zone) {
|
||||
Graph* graph = jsgraph->graph();
|
||||
Node* osr_normal_entry = nullptr;
|
||||
@ -303,7 +303,7 @@ bool OsrHelper::Deconstruct(JSGraph* jsgraph, CommonOperatorBuilder* common,
|
||||
if (osr_loop_entry == nullptr) {
|
||||
// No OSR entry found, do nothing.
|
||||
CHECK(osr_normal_entry);
|
||||
return true;
|
||||
return;
|
||||
}
|
||||
|
||||
for (Node* use : osr_loop_entry->uses()) {
|
||||
@ -345,8 +345,6 @@ bool OsrHelper::Deconstruct(JSGraph* jsgraph, CommonOperatorBuilder* common,
|
||||
// Run the normal control reduction, which naturally trims away the dead
|
||||
// parts of the graph.
|
||||
ControlReducer::ReduceGraph(tmp_zone, jsgraph, common);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -99,8 +99,7 @@ class OsrHelper {
|
||||
|
||||
// Deconstructs the artificial {OsrNormalEntry} and rewrites the graph so
|
||||
// that only the path corresponding to {OsrLoopEntry} remains.
|
||||
// Return {false} if the OSR deconstruction failed somehow.
|
||||
bool Deconstruct(JSGraph* jsgraph, CommonOperatorBuilder* common,
|
||||
void Deconstruct(JSGraph* jsgraph, CommonOperatorBuilder* common,
|
||||
Zone* tmp_zone);
|
||||
|
||||
// Prepares the frame w.r.t. OSR.
|
||||
|
@ -524,9 +524,7 @@ struct OsrDeconstructionPhase {
|
||||
SourcePositionTable::Scope pos(data->source_positions(),
|
||||
SourcePosition::Unknown());
|
||||
OsrHelper osr_helper(data->info());
|
||||
bool success =
|
||||
osr_helper.Deconstruct(data->jsgraph(), data->common(), temp_zone);
|
||||
if (!success) data->info()->RetryOptimization(kOsrCompileFailed);
|
||||
}
|
||||
};
|
||||
|
||||
@ -919,12 +917,6 @@ void Pipeline::RunPrintAndVerify(const char* phase, bool untyped) {
|
||||
|
||||
|
||||
Handle<Code> Pipeline::GenerateCode() {
|
||||
if (info()->is_osr() && !FLAG_turbo_osr) {
|
||||
// TODO(turbofan): remove this flag and always handle OSR
|
||||
info()->RetryOptimization(kOsrCompileFailed);
|
||||
return Handle<Code>::null();
|
||||
}
|
||||
|
||||
// TODO(mstarzinger): This is just a temporary hack to make TurboFan work,
|
||||
// the correct solution is to restore the context register after invoking
|
||||
// builtins from full-codegen.
|
||||
@ -1046,7 +1038,6 @@ Handle<Code> Pipeline::GenerateCode() {
|
||||
|
||||
if (info()->is_osr()) {
|
||||
Run<OsrDeconstructionPhase>();
|
||||
if (info()->bailout_reason() != kNoReason) return Handle<Code>::null();
|
||||
RunPrintAndVerify("OSR deconstruction");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user