| OLD | NEW |
| 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 12 matching lines...) Expand all Loading... |
| 23 #include "src/compiler/graph-trimmer.h" | 23 #include "src/compiler/graph-trimmer.h" |
| 24 #include "src/compiler/graph-visualizer.h" | 24 #include "src/compiler/graph-visualizer.h" |
| 25 #include "src/compiler/greedy-allocator.h" | 25 #include "src/compiler/greedy-allocator.h" |
| 26 #include "src/compiler/instruction.h" | 26 #include "src/compiler/instruction.h" |
| 27 #include "src/compiler/instruction-selector.h" | 27 #include "src/compiler/instruction-selector.h" |
| 28 #include "src/compiler/js-builtin-reducer.h" | 28 #include "src/compiler/js-builtin-reducer.h" |
| 29 #include "src/compiler/js-context-relaxation.h" | 29 #include "src/compiler/js-context-relaxation.h" |
| 30 #include "src/compiler/js-context-specialization.h" | 30 #include "src/compiler/js-context-specialization.h" |
| 31 #include "src/compiler/js-frame-specialization.h" | 31 #include "src/compiler/js-frame-specialization.h" |
| 32 #include "src/compiler/js-generic-lowering.h" | 32 #include "src/compiler/js-generic-lowering.h" |
| 33 #include "src/compiler/js-global-specialization.h" | |
| 34 #include "src/compiler/js-inlining.h" | 33 #include "src/compiler/js-inlining.h" |
| 35 #include "src/compiler/js-intrinsic-lowering.h" | 34 #include "src/compiler/js-intrinsic-lowering.h" |
| 36 #include "src/compiler/js-type-feedback.h" | 35 #include "src/compiler/js-type-feedback.h" |
| 37 #include "src/compiler/js-type-feedback-lowering.h" | 36 #include "src/compiler/js-type-feedback-lowering.h" |
| 38 #include "src/compiler/js-typed-lowering.h" | 37 #include "src/compiler/js-typed-lowering.h" |
| 39 #include "src/compiler/jump-threading.h" | 38 #include "src/compiler/jump-threading.h" |
| 40 #include "src/compiler/live-range-separator.h" | 39 #include "src/compiler/live-range-separator.h" |
| 41 #include "src/compiler/load-elimination.h" | 40 #include "src/compiler/load-elimination.h" |
| 42 #include "src/compiler/loop-analysis.h" | 41 #include "src/compiler/loop-analysis.h" |
| 43 #include "src/compiler/loop-peeling.h" | 42 #include "src/compiler/loop-peeling.h" |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 data->common()); | 504 data->common()); |
| 506 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), | 505 CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
| 507 data->common(), data->machine()); | 506 data->common(), data->machine()); |
| 508 JSContextSpecialization context_specialization( | 507 JSContextSpecialization context_specialization( |
| 509 &graph_reducer, data->jsgraph(), | 508 &graph_reducer, data->jsgraph(), |
| 510 data->info()->is_function_context_specializing() | 509 data->info()->is_function_context_specializing() |
| 511 ? data->info()->context() | 510 ? data->info()->context() |
| 512 : MaybeHandle<Context>()); | 511 : MaybeHandle<Context>()); |
| 513 JSFrameSpecialization frame_specialization(data->info()->osr_frame(), | 512 JSFrameSpecialization frame_specialization(data->info()->osr_frame(), |
| 514 data->jsgraph()); | 513 data->jsgraph()); |
| 515 JSGlobalSpecialization::Flags global_flags = | |
| 516 JSGlobalSpecialization::kNoFlags; | |
| 517 if (data->info()->is_deoptimization_enabled()) { | |
| 518 global_flags |= JSGlobalSpecialization::kDeoptimizationEnabled; | |
| 519 } | |
| 520 if (data->info()->is_typing_enabled()) { | |
| 521 global_flags |= JSGlobalSpecialization::kTypingEnabled; | |
| 522 } | |
| 523 JSGlobalSpecialization global_specialization( | |
| 524 &graph_reducer, data->jsgraph(), global_flags, | |
| 525 data->info()->has_global_object() | |
| 526 ? handle(data->info()->global_object()) | |
| 527 : Handle<GlobalObject>(), | |
| 528 data->info()->dependencies()); | |
| 529 JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled() | 514 JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled() |
| 530 ? JSInliner::kGeneralInlining | 515 ? JSInliner::kGeneralInlining |
| 531 : JSInliner::kRestrictedInlining, | 516 : JSInliner::kRestrictedInlining, |
| 532 temp_zone, data->info(), data->jsgraph()); | 517 temp_zone, data->info(), data->jsgraph()); |
| 533 AddReducer(data, &graph_reducer, &dead_code_elimination); | 518 AddReducer(data, &graph_reducer, &dead_code_elimination); |
| 534 AddReducer(data, &graph_reducer, &common_reducer); | 519 AddReducer(data, &graph_reducer, &common_reducer); |
| 535 if (data->info()->is_frame_specializing()) { | 520 if (data->info()->is_frame_specializing()) { |
| 536 AddReducer(data, &graph_reducer, &frame_specialization); | 521 AddReducer(data, &graph_reducer, &frame_specialization); |
| 537 } | 522 } |
| 538 if (data->info()->is_native_context_specializing()) { | |
| 539 AddReducer(data, &graph_reducer, &global_specialization); | |
| 540 } | |
| 541 AddReducer(data, &graph_reducer, &context_specialization); | 523 AddReducer(data, &graph_reducer, &context_specialization); |
| 542 AddReducer(data, &graph_reducer, &inliner); | 524 AddReducer(data, &graph_reducer, &inliner); |
| 543 graph_reducer.ReduceGraph(); | 525 graph_reducer.ReduceGraph(); |
| 544 } | 526 } |
| 545 }; | 527 }; |
| 546 | 528 |
| 547 | 529 |
| 548 struct TyperPhase { | 530 struct TyperPhase { |
| 549 static const char* phase_name() { return "typer"; } | 531 static const char* phase_name() { return "typer"; } |
| 550 | 532 |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1429 tcf << AsC1VRegisterAllocationData("CodeGen", | 1411 tcf << AsC1VRegisterAllocationData("CodeGen", |
| 1430 data->register_allocation_data()); | 1412 data->register_allocation_data()); |
| 1431 } | 1413 } |
| 1432 | 1414 |
| 1433 data->DeleteRegisterAllocationZone(); | 1415 data->DeleteRegisterAllocationZone(); |
| 1434 } | 1416 } |
| 1435 | 1417 |
| 1436 } // namespace compiler | 1418 } // namespace compiler |
| 1437 } // namespace internal | 1419 } // namespace internal |
| 1438 } // namespace v8 | 1420 } // namespace v8 |
| OLD | NEW |