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

Unified Diff: src/compiler/instruction-selector.cc

Issue 2276003002: [turbofan] Allow tests to enable/disable instruction scheduling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/instruction-selector.h ('k') | test/unittests/compiler/instruction-selector-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index bcf75cc96221bda1e22e739c59d30a992c412523..1be787143506043032ec9041780c65b3db36bbef 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -22,7 +22,8 @@ InstructionSelector::InstructionSelector(
Zone* zone, size_t node_count, Linkage* linkage,
InstructionSequence* sequence, Schedule* schedule,
SourcePositionTable* source_positions, Frame* frame,
- SourcePositionMode source_position_mode, Features features)
+ SourcePositionMode source_position_mode, Features features,
+ EnableScheduling enable_scheduling)
: zone_(zone),
linkage_(linkage),
sequence_(sequence),
@@ -38,6 +39,7 @@ InstructionSelector::InstructionSelector(
virtual_registers_(node_count,
InstructionOperand::kInvalidVirtualRegister, zone),
scheduler_(nullptr),
+ enable_scheduling_(enable_scheduling),
frame_(frame) {
instructions_.reserve(node_count);
}
@@ -65,8 +67,7 @@ void InstructionSelector::SelectInstructions() {
}
// Schedule the selected instructions.
- if (FLAG_turbo_instruction_scheduling &&
- InstructionScheduler::SchedulerSupported()) {
+ if (UseInstructionScheduling()) {
scheduler_ = new (zone()) InstructionScheduler(zone(), sequence());
}
@@ -88,8 +89,7 @@ void InstructionSelector::SelectInstructions() {
}
void InstructionSelector::StartBlock(RpoNumber rpo) {
- if (FLAG_turbo_instruction_scheduling &&
- InstructionScheduler::SchedulerSupported()) {
+ if (UseInstructionScheduling()) {
DCHECK_NOT_NULL(scheduler_);
scheduler_->StartBlock(rpo);
} else {
@@ -99,8 +99,7 @@ void InstructionSelector::StartBlock(RpoNumber rpo) {
void InstructionSelector::EndBlock(RpoNumber rpo) {
- if (FLAG_turbo_instruction_scheduling &&
- InstructionScheduler::SchedulerSupported()) {
+ if (UseInstructionScheduling()) {
DCHECK_NOT_NULL(scheduler_);
scheduler_->EndBlock(rpo);
} else {
@@ -110,8 +109,7 @@ void InstructionSelector::EndBlock(RpoNumber rpo) {
void InstructionSelector::AddInstruction(Instruction* instr) {
- if (FLAG_turbo_instruction_scheduling &&
- InstructionScheduler::SchedulerSupported()) {
+ if (UseInstructionScheduling()) {
DCHECK_NOT_NULL(scheduler_);
scheduler_->AddInstruction(instr);
} else {
« no previous file with comments | « src/compiler/instruction-selector.h ('k') | test/unittests/compiler/instruction-selector-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698