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

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

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 | « no previous file | src/compiler/instruction-selector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.h
diff --git a/src/compiler/instruction-selector.h b/src/compiler/instruction-selector.h
index 2365d9c671182e2fbd5203765577ab8e75aef03b..73884906a250fe1ea1421798b6ea3aa9daf042c8 100644
--- a/src/compiler/instruction-selector.h
+++ b/src/compiler/instruction-selector.h
@@ -48,13 +48,17 @@ class InstructionSelector final {
class Features;
enum SourcePositionMode { kCallSourcePositions, kAllSourcePositions };
+ enum EnableScheduling { kDisableScheduling, kEnableScheduling };
InstructionSelector(
Zone* zone, size_t node_count, Linkage* linkage,
InstructionSequence* sequence, Schedule* schedule,
SourcePositionTable* source_positions, Frame* frame,
SourcePositionMode source_position_mode = kCallSourcePositions,
- Features features = SupportedFeatures());
+ Features features = SupportedFeatures(),
+ EnableScheduling enable_scheduling = FLAG_turbo_instruction_scheduling
+ ? kEnableScheduling
+ : kDisableScheduling);
// Visit code for the entire graph with the included schedule.
void SelectInstructions();
@@ -199,6 +203,11 @@ class InstructionSelector final {
private:
friend class OperandGenerator;
+ bool UseInstructionScheduling() const {
+ return (enable_scheduling_ == kEnableScheduling) &&
+ InstructionScheduler::SchedulerSupported();
+ }
+
void EmitTableSwitch(const SwitchInfo& sw, InstructionOperand& index_operand);
void EmitLookupSwitch(const SwitchInfo& sw,
InstructionOperand& value_operand);
@@ -333,6 +342,7 @@ class InstructionSelector final {
IntVector effect_level_;
IntVector virtual_registers_;
InstructionScheduler* scheduler_;
+ EnableScheduling enable_scheduling_;
Frame* frame_;
};
« no previous file with comments | « no previous file | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698