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

Side by Side Diff: src/compiler/instruction-selector.cc

Issue 2396923003: [turbofan][x64] Use the root register for comparisons with certain roots. (Closed)
Patch Set: Created 4 years, 2 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-selector.h ('k') | src/compiler/x64/instruction-selector-x64.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/instruction-selector.h" 5 #include "src/compiler/instruction-selector.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/adapters.h" 9 #include "src/base/adapters.h"
10 #include "src/compiler/instruction-selector-impl.h" 10 #include "src/compiler/instruction-selector-impl.h"
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 } 385 }
386 386
387 void InstructionSelector::SetEffectLevel(Node* node, int effect_level) { 387 void InstructionSelector::SetEffectLevel(Node* node, int effect_level) {
388 DCHECK_NOT_NULL(node); 388 DCHECK_NOT_NULL(node);
389 size_t const id = node->id(); 389 size_t const id = node->id();
390 DCHECK_LT(id, effect_level_.size()); 390 DCHECK_LT(id, effect_level_.size());
391 effect_level_[id] = effect_level; 391 effect_level_[id] = effect_level;
392 } 392 }
393 393
394 bool InstructionSelector::CanAddressRelativeToRootsRegister() const { 394 bool InstructionSelector::CanAddressRelativeToRootsRegister() const {
395 return (enable_serialization_ == kDisableSerialization && 395 return enable_serialization_ == kDisableSerialization &&
396 (linkage()->GetIncomingDescriptor()->flags() & 396 CanUseRootsRegister();
397 CallDescriptor::kCanUseRoots)); 397 }
398
399 bool InstructionSelector::CanUseRootsRegister() const {
400 return linkage()->GetIncomingDescriptor()->flags() &
401 CallDescriptor::kCanUseRoots;
398 } 402 }
399 403
400 void InstructionSelector::MarkAsRepresentation(MachineRepresentation rep, 404 void InstructionSelector::MarkAsRepresentation(MachineRepresentation rep,
401 const InstructionOperand& op) { 405 const InstructionOperand& op) {
402 UnallocatedOperand unalloc = UnallocatedOperand::cast(op); 406 UnallocatedOperand unalloc = UnallocatedOperand::cast(op);
403 sequence()->MarkAsRepresentation(rep, unalloc.virtual_register()); 407 sequence()->MarkAsRepresentation(rep, unalloc.virtual_register());
404 } 408 }
405 409
406 410
407 void InstructionSelector::MarkAsRepresentation(MachineRepresentation rep, 411 void InstructionSelector::MarkAsRepresentation(MachineRepresentation rep,
(...skipping 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after
2121 return new (instruction_zone()) FrameStateDescriptor( 2125 return new (instruction_zone()) FrameStateDescriptor(
2122 instruction_zone(), state_info.type(), state_info.bailout_id(), 2126 instruction_zone(), state_info.type(), state_info.bailout_id(),
2123 state_info.state_combine(), parameters, locals, stack, 2127 state_info.state_combine(), parameters, locals, stack,
2124 state_info.shared_info(), outer_state); 2128 state_info.shared_info(), outer_state);
2125 } 2129 }
2126 2130
2127 2131
2128 } // namespace compiler 2132 } // namespace compiler
2129 } // namespace internal 2133 } // namespace internal
2130 } // namespace v8 2134 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.h ('k') | src/compiler/x64/instruction-selector-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698