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

Side by Side Diff: src/compiler/register-allocator.cc

Issue 2258073002: [Turbofan]: Use new MachineTypes in access-builder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Code comments addressed. Created 4 years, 3 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/base/adapters.h" 5 #include "src/base/adapters.h"
6 #include "src/compiler/linkage.h" 6 #include "src/compiler/linkage.h"
7 #include "src/compiler/register-allocator.h" 7 #include "src/compiler/register-allocator.h"
8 #include "src/string-stream.h" 8 #include "src/string-stream.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 3255 matching lines...) Expand 10 before | Expand all | Expand 10 after
3266 InstructionOperand spill_operand; 3266 InstructionOperand spill_operand;
3267 if (((range->HasSpillOperand() && 3267 if (((range->HasSpillOperand() &&
3268 !range->GetSpillOperand()->IsConstant()) || 3268 !range->GetSpillOperand()->IsConstant()) ||
3269 range->HasSpillRange())) { 3269 range->HasSpillRange())) {
3270 if (range->HasSpillOperand()) { 3270 if (range->HasSpillOperand()) {
3271 spill_operand = *range->GetSpillOperand(); 3271 spill_operand = *range->GetSpillOperand();
3272 } else { 3272 } else {
3273 spill_operand = range->GetSpillRangeOperand(); 3273 spill_operand = range->GetSpillRangeOperand();
3274 } 3274 }
3275 DCHECK(spill_operand.IsStackSlot()); 3275 DCHECK(spill_operand.IsStackSlot());
3276 DCHECK_EQ(MachineRepresentation::kTagged, 3276 DCHECK(AllocatedOperand::cast(spill_operand).representation() ==
3277 AllocatedOperand::cast(spill_operand).representation()); 3277 MachineRepresentation::kTagged ||
3278 AllocatedOperand::cast(spill_operand).representation() ==
3279 MachineRepresentation::kTaggedPointer);
3278 } 3280 }
3279 3281
3280 LiveRange* cur = range; 3282 LiveRange* cur = range;
3281 // Step through the safe points to see whether they are in the range. 3283 // Step through the safe points to see whether they are in the range.
3282 for (auto it = first_it; it != reference_maps->end(); ++it) { 3284 for (auto it = first_it; it != reference_maps->end(); ++it) {
3283 ReferenceMap* map = *it; 3285 ReferenceMap* map = *it;
3284 int safe_point = map->instruction_position(); 3286 int safe_point = map->instruction_position();
3285 3287
3286 // The safe points are sorted so we can stop searching here. 3288 // The safe points are sorted so we can stop searching here.
3287 if (safe_point - 1 > end) break; 3289 if (safe_point - 1 > end) break;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
3329 } 3331 }
3330 3332
3331 if (!cur->spilled()) { 3333 if (!cur->spilled()) {
3332 TRACE( 3334 TRACE(
3333 "Pointer in register for range %d:%d (start at %d) " 3335 "Pointer in register for range %d:%d (start at %d) "
3334 "at safe point %d\n", 3336 "at safe point %d\n",
3335 range->vreg(), cur->relative_id(), cur->Start().value(), 3337 range->vreg(), cur->relative_id(), cur->Start().value(),
3336 safe_point); 3338 safe_point);
3337 InstructionOperand operand = cur->GetAssignedOperand(); 3339 InstructionOperand operand = cur->GetAssignedOperand();
3338 DCHECK(!operand.IsStackSlot()); 3340 DCHECK(!operand.IsStackSlot());
3339 DCHECK_EQ(MachineRepresentation::kTagged, 3341 DCHECK(AllocatedOperand::cast(operand).representation() ==
3340 AllocatedOperand::cast(operand).representation()); 3342 MachineRepresentation::kTagged ||
3343 AllocatedOperand::cast(operand).representation() ==
3344 MachineRepresentation::kTaggedPointer);
3341 map->RecordReference(AllocatedOperand::cast(operand)); 3345 map->RecordReference(AllocatedOperand::cast(operand));
3342 } 3346 }
3343 } 3347 }
3344 } 3348 }
3345 } 3349 }
3346 3350
3347 3351
3348 LiveRangeConnector::LiveRangeConnector(RegisterAllocationData* data) 3352 LiveRangeConnector::LiveRangeConnector(RegisterAllocationData* data)
3349 : data_(data) {} 3353 : data_(data) {}
3350 3354
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
3621 } 3625 }
3622 } 3626 }
3623 } 3627 }
3624 } 3628 }
3625 } 3629 }
3626 3630
3627 3631
3628 } // namespace compiler 3632 } // namespace compiler
3629 } // namespace internal 3633 } // namespace internal
3630 } // namespace v8 3634 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698