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

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
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 if (has_only_deferred) continue;
Jarin 2015/08/04 19:39:43 Could you explain why we skip the optimization her
Mircea Trofin 2015/08/04 20:34:46 This would pull down common fills. If the fills oc
Mircea Trofin 2015/08/04 20:39:04 Should have added: the last statement of the Multi
62 OptimizeMerge(block); 70 OptimizeMerge(block);
63 } 71 }
64 for (auto gap : to_finalize_) { 72 for (auto gap : to_finalize_) {
65 FinalizeMoves(gap); 73 FinalizeMoves(gap);
66 } 74 }
67 } 75 }
68 76
69 77
70 void MoveOptimizer::CompressMoves(MoveOpVector* eliminated, ParallelMove* left, 78 void MoveOptimizer::CompressMoves(MoveOpVector* eliminated, ParallelMove* left,
71 ParallelMove* right) { 79 ParallelMove* right) {
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 static_cast<Instruction::GapPosition>(1), code_zone()); 284 static_cast<Instruction::GapPosition>(1), code_zone());
277 slot_1->AddMove(group_begin->destination(), load->destination()); 285 slot_1->AddMove(group_begin->destination(), load->destination());
278 load->Eliminate(); 286 load->Eliminate();
279 } 287 }
280 loads.clear(); 288 loads.clear();
281 } 289 }
282 290
283 } // namespace compiler 291 } // namespace compiler
284 } // namespace internal 292 } // namespace internal
285 } // namespace v8 293 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/pipeline.cc » ('j') | src/compiler/pipeline.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698