Index: src/compiler/instruction-selector.cc |
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc |
index 89f7de6b8f02c98f6109b84117a2da62b4adcb66..7cb990888b8a08069158c272bbdab9c1879e70ab 100644 |
--- a/src/compiler/instruction-selector.cc |
+++ b/src/compiler/instruction-selector.cc |
@@ -23,7 +23,8 @@ InstructionSelector::InstructionSelector( |
InstructionSequence* sequence, Schedule* schedule, |
SourcePositionTable* source_positions, Frame* frame, |
SourcePositionMode source_position_mode, Features features, |
- EnableScheduling enable_scheduling) |
+ EnableScheduling enable_scheduling, |
+ EnableSerialization enable_serialization) |
: zone_(zone), |
linkage_(linkage), |
sequence_(sequence), |
@@ -41,6 +42,7 @@ InstructionSelector::InstructionSelector( |
virtual_register_rename_(zone), |
scheduler_(nullptr), |
enable_scheduling_(enable_scheduling), |
+ enable_serialization_(enable_serialization), |
frame_(frame), |
instruction_selection_failed_(false) { |
instructions_.reserve(node_count); |
@@ -389,6 +391,12 @@ void InstructionSelector::SetEffectLevel(Node* node, int effect_level) { |
effect_level_[id] = effect_level; |
} |
+bool InstructionSelector::CanAddressRelativeToRootsRegister() const { |
+ return (enable_serialization_ == kDisableSerialization && |
+ (linkage()->GetIncomingDescriptor()->flags() & |
+ CallDescriptor::kCanUseRoots)); |
+} |
+ |
void InstructionSelector::MarkAsRepresentation(MachineRepresentation rep, |
const InstructionOperand& op) { |
UnallocatedOperand unalloc = UnallocatedOperand::cast(op); |