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

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

Issue 1921563002: [turbofan] Initial version of number type feedback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add tests for the checks and fix check insertion Created 4 years, 6 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
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/adapters.h" 10 #include "src/base/adapters.h"
(...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 JSCreateLowering create_lowering( 875 JSCreateLowering create_lowering(
876 &graph_reducer, data->info()->dependencies(), data->jsgraph(), 876 &graph_reducer, data->info()->dependencies(), data->jsgraph(),
877 literals_array, temp_zone); 877 literals_array, temp_zone);
878 JSTypedLowering::Flags typed_lowering_flags = JSTypedLowering::kNoFlags; 878 JSTypedLowering::Flags typed_lowering_flags = JSTypedLowering::kNoFlags;
879 if (data->info()->is_deoptimization_enabled()) { 879 if (data->info()->is_deoptimization_enabled()) {
880 typed_lowering_flags |= JSTypedLowering::kDeoptimizationEnabled; 880 typed_lowering_flags |= JSTypedLowering::kDeoptimizationEnabled;
881 } 881 }
882 if (data->info()->shared_info()->HasBytecodeArray()) { 882 if (data->info()->shared_info()->HasBytecodeArray()) {
883 typed_lowering_flags |= JSTypedLowering::kDisableBinaryOpReduction; 883 typed_lowering_flags |= JSTypedLowering::kDisableBinaryOpReduction;
884 } 884 }
885 if (FLAG_turbo_type_feedback) {
Benedikt Meurer 2016/05/30 18:39:50 Can you add a CompilationInfo flag for this?
Jarin 2016/05/31 20:28:53 Done.
886 typed_lowering_flags |= JSTypedLowering::kTypeFeedbackEnabled;
887 }
885 JSTypedLowering typed_lowering(&graph_reducer, data->info()->dependencies(), 888 JSTypedLowering typed_lowering(&graph_reducer, data->info()->dependencies(),
886 typed_lowering_flags, data->jsgraph(), 889 typed_lowering_flags, data->jsgraph(),
887 temp_zone); 890 temp_zone);
888 JSIntrinsicLowering intrinsic_lowering( 891 JSIntrinsicLowering intrinsic_lowering(
889 &graph_reducer, data->jsgraph(), 892 &graph_reducer, data->jsgraph(),
890 data->info()->is_deoptimization_enabled() 893 data->info()->is_deoptimization_enabled()
891 ? JSIntrinsicLowering::kDeoptimizationEnabled 894 ? JSIntrinsicLowering::kDeoptimizationEnabled
892 : JSIntrinsicLowering::kDeoptimizationDisabled); 895 : JSIntrinsicLowering::kDeoptimizationDisabled);
893 SimplifiedOperatorReducer simple_reducer(data->jsgraph()); 896 SimplifiedOperatorReducer simple_reducer(data->jsgraph());
894 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), 897 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 AddReducer(data, &graph_reducer, &escape_reducer); 940 AddReducer(data, &graph_reducer, &escape_reducer);
938 graph_reducer.ReduceGraph(); 941 graph_reducer.ReduceGraph();
939 escape_reducer.VerifyReplacement(); 942 escape_reducer.VerifyReplacement();
940 } 943 }
941 }; 944 };
942 945
943 struct RepresentationSelectionPhase { 946 struct RepresentationSelectionPhase {
944 static const char* phase_name() { return "representation selection"; } 947 static const char* phase_name() { return "representation selection"; }
945 948
946 void Run(PipelineData* data, Zone* temp_zone) { 949 void Run(PipelineData* data, Zone* temp_zone) {
950 SimplifiedLowering::Flags flags =
951 FLAG_turbo_type_feedback ? SimplifiedLowering::kTypeFeedbackEnabled
Benedikt Meurer 2016/05/30 18:39:50 See comment above.
952 : SimplifiedLowering::kNoFlag;
947 SimplifiedLowering lowering(data->jsgraph(), temp_zone, 953 SimplifiedLowering lowering(data->jsgraph(), temp_zone,
948 data->source_positions()); 954 data->source_positions(), flags);
949 lowering.LowerAllNodes(); 955 lowering.LowerAllNodes();
950 } 956 }
951 }; 957 };
952 958
953 struct EarlyOptimizationPhase { 959 struct EarlyOptimizationPhase {
954 static const char* phase_name() { return "early optimization"; } 960 static const char* phase_name() { return "early optimization"; }
955 961
956 void Run(PipelineData* data, Zone* temp_zone) { 962 void Run(PipelineData* data, Zone* temp_zone) {
957 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); 963 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
958 JSGenericLowering generic_lowering(data->jsgraph()); 964 JSGenericLowering generic_lowering(data->jsgraph());
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1796 data->DeleteRegisterAllocationZone(); 1802 data->DeleteRegisterAllocationZone();
1797 } 1803 }
1798 1804
1799 CompilationInfo* PipelineImpl::info() const { return data_->info(); } 1805 CompilationInfo* PipelineImpl::info() const { return data_->info(); }
1800 1806
1801 Isolate* PipelineImpl::isolate() const { return info()->isolate(); } 1807 Isolate* PipelineImpl::isolate() const { return info()->isolate(); }
1802 1808
1803 } // namespace compiler 1809 } // namespace compiler
1804 } // namespace internal 1810 } // namespace internal
1805 } // namespace v8 1811 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698