Skip to content

Commit a6e8777

Browse files
committed
mi-sched: Load clustering is a bit to expensive to enable unconditionally.
llvm-svn: 189990
1 parent 8c699c9 commit a6e8777

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

llvm/include/llvm/Target/TargetInstrInfo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,8 @@ class TargetInstrInfo : public MCInstrInfo {
615615
return false;
616616
}
617617

618+
virtual bool enableClusterLoads() const { return false; }
619+
618620
virtual bool shouldClusterLoads(MachineInstr *FirstLdSt,
619621
MachineInstr *SecondLdSt,
620622
unsigned NumLoads) const {

llvm/lib/CodeGen/MachineScheduler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2753,7 +2753,7 @@ static ScheduleDAGInstrs *createConvergingSched(MachineSchedContext *C) {
27532753
// data and pass it to later mutations. Have a single mutation that gathers
27542754
// the interesting nodes in one pass.
27552755
DAG->addMutation(new CopyConstrain(DAG->TII, DAG->TRI));
2756-
if (EnableLoadCluster)
2756+
if (EnableLoadCluster && DAG->TII->enableClusterLoads())
27572757
DAG->addMutation(new LoadClusterMutation(DAG->TII, DAG->TRI));
27582758
if (EnableMacroFusion)
27592759
DAG->addMutation(new MacroFusion(DAG->TII));

0 commit comments

Comments
 (0)