| Index: src/compiler/pipeline.cc
|
| diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
|
| index d2c5fa6f35c3e2b465df7d6d07daab2b52df8187..c1e2eb663e0a0d4fccfaf19eb00c42e7f356a4dd 100644
|
| --- a/src/compiler/pipeline.cc
|
| +++ b/src/compiler/pipeline.cc
|
| @@ -42,6 +42,7 @@
|
| #include "src/compiler/move-optimizer.h"
|
| #include "src/compiler/osr.h"
|
| #include "src/compiler/pipeline-statistics.h"
|
| +#include "src/compiler/preprocess-live-ranges.h"
|
| #include "src/compiler/register-allocator.h"
|
| #include "src/compiler/register-allocator-verifier.h"
|
| #include "src/compiler/schedule.h"
|
| @@ -785,6 +786,17 @@ struct BuildLiveRangesPhase {
|
| };
|
|
|
|
|
| +struct PreprocessLiveRangesPhase {
|
| + static const char* phase_name() { return "preprocess live ranges"; }
|
| +
|
| + void Run(PipelineData* data, Zone* temp_zone) {
|
| + PreprocessLiveRanges live_range_preprocessor(
|
| + data->register_allocation_data(), temp_zone);
|
| + live_range_preprocessor.PreprocessRanges();
|
| + }
|
| +};
|
| +
|
| +
|
| template <typename RegAllocator>
|
| struct AllocateGeneralRegistersPhase {
|
| static const char* phase_name() { return "allocate general registers"; }
|
| @@ -1320,14 +1332,15 @@ void Pipeline::AllocateRegisters(const RegisterConfiguration* config,
|
| if (verifier != nullptr) {
|
| CHECK(!data->register_allocation_data()->ExistsUseWithoutDefinition());
|
| }
|
| - if (FLAG_turbo_greedy_regalloc) {
|
| - Run<AllocateGeneralRegistersPhase<GreedyAllocator>>();
|
| - Run<AllocateDoubleRegistersPhase<GreedyAllocator>>();
|
| - } else {
|
| - Run<AllocateGeneralRegistersPhase<LinearScanAllocator>>();
|
| - Run<AllocateDoubleRegistersPhase<LinearScanAllocator>>();
|
| +
|
| + if (FLAG_turbo_preprocess_ranges) {
|
| + Run<PreprocessLiveRangesPhase>();
|
| }
|
|
|
| + // TODO(mtrofin): re-enable greedy once we have bots for range preprocessing.
|
| + Run<AllocateGeneralRegistersPhase<LinearScanAllocator>>();
|
| + Run<AllocateDoubleRegistersPhase<LinearScanAllocator>>();
|
| +
|
| if (FLAG_turbo_frame_elision) {
|
| Run<LocateSpillSlotsPhase>();
|
| Run<FrameElisionPhase>();
|
|
|