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

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

Issue 1578723002: [turbofan] Build s/NULL/nullptr/g and CHECK(x != nullptr) to CHECK_NOT_NULL(x). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/mips64/instruction-selector-mips64.cc ('k') | src/compiler/node.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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 } 248 }
249 if (move_map.empty() || correct_counts != move_map.size()) return; 249 if (move_map.empty() || correct_counts != move_map.size()) return;
250 // Find insertion point. 250 // Find insertion point.
251 Instruction* instr = nullptr; 251 Instruction* instr = nullptr;
252 for (int i = block->first_instruction_index(); 252 for (int i = block->first_instruction_index();
253 i <= block->last_instruction_index(); ++i) { 253 i <= block->last_instruction_index(); ++i) {
254 instr = code()->instructions()[i]; 254 instr = code()->instructions()[i];
255 if (!GapsCanMoveOver(instr, local_zone()) || !instr->AreMovesRedundant()) 255 if (!GapsCanMoveOver(instr, local_zone()) || !instr->AreMovesRedundant())
256 break; 256 break;
257 } 257 }
258 DCHECK(instr != nullptr); 258 DCHECK_NOT_NULL(instr);
259 bool gap_initialized = true; 259 bool gap_initialized = true;
260 if (instr->parallel_moves()[0] == nullptr || 260 if (instr->parallel_moves()[0] == nullptr ||
261 instr->parallel_moves()[0]->empty()) { 261 instr->parallel_moves()[0]->empty()) {
262 to_finalize_.push_back(instr); 262 to_finalize_.push_back(instr);
263 } else { 263 } else {
264 // Will compress after insertion. 264 // Will compress after insertion.
265 gap_initialized = false; 265 gap_initialized = false;
266 std::swap(instr->parallel_moves()[0], instr->parallel_moves()[1]); 266 std::swap(instr->parallel_moves()[0], instr->parallel_moves()[1]);
267 } 267 }
268 ParallelMove* moves = instr->GetOrCreateParallelMove( 268 ParallelMove* moves = instr->GetOrCreateParallelMove(
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 static_cast<Instruction::GapPosition>(1), code_zone()); 342 static_cast<Instruction::GapPosition>(1), code_zone());
343 slot_1->AddMove(group_begin->destination(), load->destination()); 343 slot_1->AddMove(group_begin->destination(), load->destination());
344 load->Eliminate(); 344 load->Eliminate();
345 } 345 }
346 loads.clear(); 346 loads.clear();
347 } 347 }
348 348
349 } // namespace compiler 349 } // namespace compiler
350 } // namespace internal 350 } // namespace internal
351 } // namespace v8 351 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips64/instruction-selector-mips64.cc ('k') | src/compiler/node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698