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

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: A bit of refactoring. 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(CanBeTaggedPointer(
3277 AllocatedOperand::cast(spill_operand).representation()); 3277 AllocatedOperand::cast(spill_operand).representation()));
3278 } 3278 }
3279 3279
3280 LiveRange* cur = range; 3280 LiveRange* cur = range;
3281 // Step through the safe points to see whether they are in the range. 3281 // Step through the safe points to see whether they are in the range.
3282 for (auto it = first_it; it != reference_maps->end(); ++it) { 3282 for (auto it = first_it; it != reference_maps->end(); ++it) {
3283 ReferenceMap* map = *it; 3283 ReferenceMap* map = *it;
3284 int safe_point = map->instruction_position(); 3284 int safe_point = map->instruction_position();
3285 3285
3286 // The safe points are sorted so we can stop searching here. 3286 // The safe points are sorted so we can stop searching here.
3287 if (safe_point - 1 > end) break; 3287 if (safe_point - 1 > end) break;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
3329 } 3329 }
3330 3330
3331 if (!cur->spilled()) { 3331 if (!cur->spilled()) {
3332 TRACE( 3332 TRACE(
3333 "Pointer in register for range %d:%d (start at %d) " 3333 "Pointer in register for range %d:%d (start at %d) "
3334 "at safe point %d\n", 3334 "at safe point %d\n",
3335 range->vreg(), cur->relative_id(), cur->Start().value(), 3335 range->vreg(), cur->relative_id(), cur->Start().value(),
3336 safe_point); 3336 safe_point);
3337 InstructionOperand operand = cur->GetAssignedOperand(); 3337 InstructionOperand operand = cur->GetAssignedOperand();
3338 DCHECK(!operand.IsStackSlot()); 3338 DCHECK(!operand.IsStackSlot());
3339 DCHECK_EQ(MachineRepresentation::kTagged, 3339 DCHECK(CanBeTaggedPointer(
3340 AllocatedOperand::cast(operand).representation()); 3340 AllocatedOperand::cast(operand).representation()));
3341 map->RecordReference(AllocatedOperand::cast(operand)); 3341 map->RecordReference(AllocatedOperand::cast(operand));
3342 } 3342 }
3343 } 3343 }
3344 } 3344 }
3345 } 3345 }
3346 3346
3347 3347
3348 LiveRangeConnector::LiveRangeConnector(RegisterAllocationData* data) 3348 LiveRangeConnector::LiveRangeConnector(RegisterAllocationData* data)
3349 : data_(data) {} 3349 : data_(data) {}
3350 3350
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
3621 } 3621 }
3622 } 3622 }
3623 } 3623 }
3624 } 3624 }
3625 } 3625 }
3626 3626
3627 3627
3628 } // namespace compiler 3628 } // namespace compiler
3629 } // namespace internal 3629 } // namespace internal
3630 } // namespace v8 3630 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips64/instruction-selector-mips64.cc ('k') | src/compiler/representation-change.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698