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

Side by Side Diff: src/compiler/pipeline.cc

Issue 817293005: Avoid unintentional optimization of hot builtins by TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed. Created 5 years, 11 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 | « src/builtins.h ('k') | test/mjsunit/regress/regress-crbug-451016.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/compiler/pipeline.h" 5 #include "src/compiler/pipeline.h"
6 6
7 #include <fstream> // NOLINT(readability/streams) 7 #include <fstream> // NOLINT(readability/streams)
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/base/platform/elapsed-timer.h" 10 #include "src/base/platform/elapsed-timer.h"
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 } 770 }
771 771
772 772
773 Handle<Code> Pipeline::GenerateCode() { 773 Handle<Code> Pipeline::GenerateCode() {
774 // TODO(turbofan): Make OSR work with inner loops and remove this bailout. 774 // TODO(turbofan): Make OSR work with inner loops and remove this bailout.
775 if (info()->is_osr() && !FLAG_turbo_osr) return Handle<Code>::null(); 775 if (info()->is_osr() && !FLAG_turbo_osr) return Handle<Code>::null();
776 776
777 // TODO(mstarzinger): This is just a temporary hack to make TurboFan work, 777 // TODO(mstarzinger): This is just a temporary hack to make TurboFan work,
778 // the correct solution is to restore the context register after invoking 778 // the correct solution is to restore the context register after invoking
779 // builtins from full-codegen. 779 // builtins from full-codegen.
780 if (isolate()->bootstrapper()->IsActive()) return Handle<Code>::null(); 780 Handle<SharedFunctionInfo> shared = info()->shared_info();
781 if (isolate()->bootstrapper()->IsActive() ||
782 shared->disable_optimization_reason() ==
783 kBuiltinFunctionCannotBeOptimized) {
784 shared->DisableOptimization(kBuiltinFunctionCannotBeOptimized);
785 return Handle<Code>::null();
786 }
781 787
782 ZonePool zone_pool(isolate()); 788 ZonePool zone_pool(isolate());
783 SmartPointer<PipelineStatistics> pipeline_statistics; 789 SmartPointer<PipelineStatistics> pipeline_statistics;
784 790
785 if (FLAG_turbo_stats) { 791 if (FLAG_turbo_stats) {
786 pipeline_statistics.Reset(new PipelineStatistics(info(), &zone_pool)); 792 pipeline_statistics.Reset(new PipelineStatistics(info(), &zone_pool));
787 pipeline_statistics->BeginPhaseKind("initializing"); 793 pipeline_statistics->BeginPhaseKind("initializing");
788 } 794 }
789 795
790 PipelineData data(&zone_pool, info()); 796 PipelineData data(&zone_pool, info());
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 } 1110 }
1105 1111
1106 1112
1107 void Pipeline::TearDown() { 1113 void Pipeline::TearDown() {
1108 InstructionOperand::TearDownCaches(); 1114 InstructionOperand::TearDownCaches();
1109 } 1115 }
1110 1116
1111 } // namespace compiler 1117 } // namespace compiler
1112 } // namespace internal 1118 } // namespace internal
1113 } // namespace v8 1119 } // namespace v8
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | test/mjsunit/regress/regress-crbug-451016.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698