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 1678833002: [turbofan] Introduce JSCreateLowering for optimizing JSCreate nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix length_type check. 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 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 14 matching lines...) Expand all
25 #include "src/compiler/graph-replay.h" 25 #include "src/compiler/graph-replay.h"
26 #include "src/compiler/graph-trimmer.h" 26 #include "src/compiler/graph-trimmer.h"
27 #include "src/compiler/graph-visualizer.h" 27 #include "src/compiler/graph-visualizer.h"
28 #include "src/compiler/greedy-allocator.h" 28 #include "src/compiler/greedy-allocator.h"
29 #include "src/compiler/instruction.h" 29 #include "src/compiler/instruction.h"
30 #include "src/compiler/instruction-selector.h" 30 #include "src/compiler/instruction-selector.h"
31 #include "src/compiler/js-builtin-reducer.h" 31 #include "src/compiler/js-builtin-reducer.h"
32 #include "src/compiler/js-call-reducer.h" 32 #include "src/compiler/js-call-reducer.h"
33 #include "src/compiler/js-context-relaxation.h" 33 #include "src/compiler/js-context-relaxation.h"
34 #include "src/compiler/js-context-specialization.h" 34 #include "src/compiler/js-context-specialization.h"
35 #include "src/compiler/js-create-lowering.h"
35 #include "src/compiler/js-frame-specialization.h" 36 #include "src/compiler/js-frame-specialization.h"
36 #include "src/compiler/js-generic-lowering.h" 37 #include "src/compiler/js-generic-lowering.h"
37 #include "src/compiler/js-global-object-specialization.h" 38 #include "src/compiler/js-global-object-specialization.h"
38 #include "src/compiler/js-inlining-heuristic.h" 39 #include "src/compiler/js-inlining-heuristic.h"
39 #include "src/compiler/js-intrinsic-lowering.h" 40 #include "src/compiler/js-intrinsic-lowering.h"
40 #include "src/compiler/js-native-context-specialization.h" 41 #include "src/compiler/js-native-context-specialization.h"
41 #include "src/compiler/js-typed-lowering.h" 42 #include "src/compiler/js-typed-lowering.h"
42 #include "src/compiler/jump-threading.h" 43 #include "src/compiler/jump-threading.h"
43 #include "src/compiler/live-range-separator.h" 44 #include "src/compiler/live-range-separator.h"
44 #include "src/compiler/load-elimination.h" 45 #include "src/compiler/load-elimination.h"
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 606
606 struct TypedLoweringPhase { 607 struct TypedLoweringPhase {
607 static const char* phase_name() { return "typed lowering"; } 608 static const char* phase_name() { return "typed lowering"; }
608 609
609 void Run(PipelineData* data, Zone* temp_zone) { 610 void Run(PipelineData* data, Zone* temp_zone) {
610 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone); 611 JSGraphReducer graph_reducer(data->jsgraph(), temp_zone);
611 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(), 612 DeadCodeElimination dead_code_elimination(&graph_reducer, data->graph(),
612 data->common()); 613 data->common());
613 LoadElimination load_elimination(&graph_reducer); 614 LoadElimination load_elimination(&graph_reducer);
614 JSBuiltinReducer builtin_reducer(&graph_reducer, data->jsgraph()); 615 JSBuiltinReducer builtin_reducer(&graph_reducer, data->jsgraph());
616 JSCreateLowering create_lowering(
617 &graph_reducer, data->info()->dependencies(), data->jsgraph());
615 JSTypedLowering::Flags typed_lowering_flags = JSTypedLowering::kNoFlags; 618 JSTypedLowering::Flags typed_lowering_flags = JSTypedLowering::kNoFlags;
616 if (data->info()->is_deoptimization_enabled()) { 619 if (data->info()->is_deoptimization_enabled()) {
617 typed_lowering_flags |= JSTypedLowering::kDeoptimizationEnabled; 620 typed_lowering_flags |= JSTypedLowering::kDeoptimizationEnabled;
618 } 621 }
619 if (data->info()->shared_info()->HasBytecodeArray()) { 622 if (data->info()->shared_info()->HasBytecodeArray()) {
620 typed_lowering_flags |= JSTypedLowering::kDisableBinaryOpReduction; 623 typed_lowering_flags |= JSTypedLowering::kDisableBinaryOpReduction;
621 } 624 }
622 JSTypedLowering typed_lowering(&graph_reducer, data->info()->dependencies(), 625 JSTypedLowering typed_lowering(&graph_reducer, data->info()->dependencies(),
623 typed_lowering_flags, data->jsgraph(), 626 typed_lowering_flags, data->jsgraph(),
624 temp_zone); 627 temp_zone);
625 JSIntrinsicLowering intrinsic_lowering( 628 JSIntrinsicLowering intrinsic_lowering(
626 &graph_reducer, data->jsgraph(), 629 &graph_reducer, data->jsgraph(),
627 data->info()->is_deoptimization_enabled() 630 data->info()->is_deoptimization_enabled()
628 ? JSIntrinsicLowering::kDeoptimizationEnabled 631 ? JSIntrinsicLowering::kDeoptimizationEnabled
629 : JSIntrinsicLowering::kDeoptimizationDisabled); 632 : JSIntrinsicLowering::kDeoptimizationDisabled);
630 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), 633 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(),
631 data->common(), data->machine()); 634 data->common(), data->machine());
632 AddReducer(data, &graph_reducer, &dead_code_elimination); 635 AddReducer(data, &graph_reducer, &dead_code_elimination);
633 AddReducer(data, &graph_reducer, &builtin_reducer); 636 AddReducer(data, &graph_reducer, &builtin_reducer);
637 if (data->info()->is_deoptimization_enabled()) {
638 AddReducer(data, &graph_reducer, &create_lowering);
639 }
634 AddReducer(data, &graph_reducer, &typed_lowering); 640 AddReducer(data, &graph_reducer, &typed_lowering);
635 AddReducer(data, &graph_reducer, &intrinsic_lowering); 641 AddReducer(data, &graph_reducer, &intrinsic_lowering);
636 AddReducer(data, &graph_reducer, &load_elimination); 642 AddReducer(data, &graph_reducer, &load_elimination);
637 AddReducer(data, &graph_reducer, &common_reducer); 643 AddReducer(data, &graph_reducer, &common_reducer);
638 graph_reducer.ReduceGraph(); 644 graph_reducer.ReduceGraph();
639 } 645 }
640 }; 646 };
641 647
642 648
643 struct BranchEliminationPhase { 649 struct BranchEliminationPhase {
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1486 tcf << AsC1VRegisterAllocationData("CodeGen", 1492 tcf << AsC1VRegisterAllocationData("CodeGen",
1487 data->register_allocation_data()); 1493 data->register_allocation_data());
1488 } 1494 }
1489 1495
1490 data->DeleteRegisterAllocationZone(); 1496 data->DeleteRegisterAllocationZone();
1491 } 1497 }
1492 1498
1493 } // namespace compiler 1499 } // namespace compiler
1494 } // namespace internal 1500 } // namespace internal
1495 } // namespace v8 1501 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698