[turbofan] Remove fallback to TurboFan when Crankshaft bails out.

This removes the fallback path in question. Now the {AstNumbering} phase
is the only phase deciding whether Crankshaft is supposed to be disabled
or not. This in turn simplifies reasoning about the paths through the
compilation pipeline. We can decide early whether we want Ignition to
kick in depending on whether Crankshaft is enabled or not.

R=mvstanton@chromium.org,rmcilroy@chromium.org

Review-Url: https://codereview.chromium.org/2146573004
Cr-Commit-Position: refs/heads/master@{#37763}
This commit is contained in:
mstarzinger 2016-07-14 06:05:15 -07:00 committed by Commit bot
parent d93fd41aaa
commit 8bad947449
2 changed files with 7 additions and 25 deletions

View File

@ -144,7 +144,9 @@ CompilationInfo::CompilationInfo(ParseInfo* parse_info,
debug_name_(debug_name) {}
CompilationInfo::~CompilationInfo() {
DisableFutureOptimization();
if (GetFlag(kDisableFutureOptimization) && has_shared_info()) {
shared_info()->DisableOptimization(bailout_reason());
}
dependencies()->Rollback();
delete deferred_handles_;
}
@ -621,9 +623,9 @@ bool Renumber(ParseInfo* parse_info) {
if (lit->dont_optimize_reason() != kNoReason) {
shared_info->DisableOptimization(lit->dont_optimize_reason());
}
shared_info->set_dont_crankshaft(
shared_info->dont_crankshaft() ||
(lit->flags() & AstProperties::kDontCrankshaft));
if (lit->flags() & AstProperties::kDontCrankshaft) {
shared_info->set_dont_crankshaft(true);
}
}
return true;
}

View File

@ -434,27 +434,6 @@ class CompilationInfo final {
SourcePositionTableBuilder::RecordingMode SourcePositionRecordingMode() const;
protected:
ParseInfo* parse_info_;
void DisableFutureOptimization() {
if (GetFlag(kDisableFutureOptimization) && has_shared_info()) {
// If Crankshaft tried to optimize this function, bailed out, and
// doesn't want to try again, then use TurboFan next time.
if (!shared_info()->dont_crankshaft() &&
bailout_reason() != kOptimizedTooManyTimes) {
shared_info()->set_dont_crankshaft(true);
if (FLAG_trace_opt) {
PrintF("[disabled Crankshaft for ");
shared_info()->ShortPrint();
PrintF(", reason: %s]\n", GetBailoutReason(bailout_reason()));
}
} else {
shared_info()->DisableOptimization(bailout_reason());
}
}
}
private:
// Compilation mode.
// BASE is generated by the full codegen, optionally prepared for bailouts.
@ -469,6 +448,7 @@ class CompilationInfo final {
Code::Flags code_flags, Mode mode, Isolate* isolate,
Zone* zone);
ParseInfo* parse_info_;
Isolate* isolate_;
void SetMode(Mode mode) {