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

Side by Side Diff: src/compiler.h

Issue 1785183003: Don't use TurboFan when Crankshaft has optimized too many times (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_H_ 5 #ifndef V8_COMPILER_H_
6 #define V8_COMPILER_H_ 6 #define V8_COMPILER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast/ast.h" 9 #include "src/ast/ast.h"
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 480
481 StackFrame::Type GetOutputStackFrameType() const; 481 StackFrame::Type GetOutputStackFrameType() const;
482 482
483 protected: 483 protected:
484 ParseInfo* parse_info_; 484 ParseInfo* parse_info_;
485 485
486 void DisableFutureOptimization() { 486 void DisableFutureOptimization() {
487 if (GetFlag(kDisableFutureOptimization) && has_shared_info()) { 487 if (GetFlag(kDisableFutureOptimization) && has_shared_info()) {
488 // If Crankshaft tried to optimize this function, bailed out, and 488 // If Crankshaft tried to optimize this function, bailed out, and
489 // doesn't want to try again, then use TurboFan next time. 489 // doesn't want to try again, then use TurboFan next time.
490 if (!shared_info()->dont_crankshaft()) { 490 if (!shared_info()->dont_crankshaft() &&
491 bailout_reason() != kOptimizedTooManyTimes) {
491 shared_info()->set_dont_crankshaft(true); 492 shared_info()->set_dont_crankshaft(true);
492 if (FLAG_trace_opt) { 493 if (FLAG_trace_opt) {
493 PrintF("[disabled Crankshaft for "); 494 PrintF("[disabled Crankshaft for ");
494 shared_info()->ShortPrint(); 495 shared_info()->ShortPrint();
495 PrintF(", reason: %s]\n", GetBailoutReason(bailout_reason())); 496 PrintF(", reason: %s]\n", GetBailoutReason(bailout_reason()));
496 } 497 }
497 } else { 498 } else {
498 shared_info()->DisableOptimization(bailout_reason()); 499 shared_info()->DisableOptimization(bailout_reason());
499 } 500 }
500 } 501 }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 OptimizedCompileJob* job_; 655 OptimizedCompileJob* job_;
655 base::ElapsedTimer timer_; 656 base::ElapsedTimer timer_;
656 base::TimeDelta* location_; 657 base::TimeDelta* location_;
657 }; 658 };
658 }; 659 };
659 660
660 } // namespace internal 661 } // namespace internal
661 } // namespace v8 662 } // namespace v8
662 663
663 #endif // V8_COMPILER_H_ 664 #endif // V8_COMPILER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698