Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: src/compiler.h

Issue 1751873002: When Crankshaft aborts compilation, use TurboFan next time (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/bailout-reason.h ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.h
diff --git a/src/compiler.h b/src/compiler.h
index e6b5f8df550b2715e7156de2b01f7d0abd79f2ff..6f192a9434babf0d15171d2561ef10a8c1a88bc5 100644
--- a/src/compiler.h
+++ b/src/compiler.h
@@ -387,7 +387,18 @@ class CompilationInfo {
void DisableFutureOptimization() {
if (GetFlag(kDisableFutureOptimization) && has_shared_info()) {
- shared_info()->DisableOptimization(bailout_reason());
+ // 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()) {
+ shared_info()->set_dont_crankshaft(true);
Michael Starzinger 2016/03/01 14:34:56 Just for posterity: This will also disable Cranksh
adamk 2016/03/01 19:15:44 The second one of these examples, kOptimizedTooMan
+ if (FLAG_trace_opt) {
+ PrintF("[disabled Crankshaft for ");
+ shared_info()->ShortPrint();
+ PrintF(", reason: %s]\n", GetBailoutReason(bailout_reason()));
+ }
+ } else {
+ shared_info()->DisableOptimization(bailout_reason());
+ }
}
}
« no previous file with comments | « src/bailout-reason.h ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698