Chromium Code Reviews| 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()); |
| + } |
| } |
| } |