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

Side by Side Diff: src/compiler/move-optimizer.cc

Issue 1271703002: [turbofan] Stand-alone deferred block splitting - full. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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/compiler/instruction.h ('k') | src/compiler/pipeline.cc » ('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/move-optimizer.h" 5 #include "src/compiler/move-optimizer.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 temp_vector_0_(local_zone), 52 temp_vector_0_(local_zone),
53 temp_vector_1_(local_zone) {} 53 temp_vector_1_(local_zone) {}
54 54
55 55
56 void MoveOptimizer::Run() { 56 void MoveOptimizer::Run() {
57 for (auto* block : code()->instruction_blocks()) { 57 for (auto* block : code()->instruction_blocks()) {
58 CompressBlock(block); 58 CompressBlock(block);
59 } 59 }
60 for (auto block : code()->instruction_blocks()) { 60 for (auto block : code()->instruction_blocks()) {
61 if (block->PredecessorCount() <= 1) continue; 61 if (block->PredecessorCount() <= 1) continue;
62 bool has_only_deferred = true;
63 for (RpoNumber pred_id : block->predecessors()) {
64 if (!code()->InstructionBlockAt(pred_id)->IsDeferred()) {
65 has_only_deferred = false;
66 break;
67 }
68 }
69 // This would pull down common moves. If the moves occur in deferred blocks,
70 // and the closest common successor is not deferred, we lose the
71 // optimization of just spilling/filling in deferred blocks.
72 if (has_only_deferred) continue;
62 OptimizeMerge(block); 73 OptimizeMerge(block);
63 } 74 }
64 for (auto gap : to_finalize_) { 75 for (auto gap : to_finalize_) {
65 FinalizeMoves(gap); 76 FinalizeMoves(gap);
66 } 77 }
67 } 78 }
68 79
69 80
70 void MoveOptimizer::CompressMoves(MoveOpVector* eliminated, ParallelMove* left, 81 void MoveOptimizer::CompressMoves(MoveOpVector* eliminated, ParallelMove* left,
71 ParallelMove* right) { 82 ParallelMove* right) {
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 static_cast<Instruction::GapPosition>(1), code_zone()); 287 static_cast<Instruction::GapPosition>(1), code_zone());
277 slot_1->AddMove(group_begin->destination(), load->destination()); 288 slot_1->AddMove(group_begin->destination(), load->destination());
278 load->Eliminate(); 289 load->Eliminate();
279 } 290 }
280 loads.clear(); 291 loads.clear();
281 } 292 }
282 293
283 } // namespace compiler 294 } // namespace compiler
284 } // namespace internal 295 } // namespace internal
285 } // namespace v8 296 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/pipeline.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698