mi-sched: Load clustering is a bit to expensive to enable unconditionally.
authorAndrew Trick <atrick@apple.com>
Wed, 4 Sep 2013 21:00:08 +0000 (21:00 +0000)
committerAndrew Trick <atrick@apple.com>
Wed, 4 Sep 2013 21:00:08 +0000 (21:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189990 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetInstrInfo.h
lib/CodeGen/MachineScheduler.cpp

index f746daf921b8ae1ec64d36bf5bfe82507fc6e85c..d92ad42a8795c737896f353f75655386877cfe0d 100644 (file)
@@ -615,6 +615,8 @@ public:
     return false;
   }
 
+  virtual bool enableClusterLoads() const { return false; }
+
   virtual bool shouldClusterLoads(MachineInstr *FirstLdSt,
                                   MachineInstr *SecondLdSt,
                                   unsigned NumLoads) const {
index 0aacc3a59dc87adb95632ed6f373f1c24f4b2e1c..d9da8381eaaec11681a6446d064a455792a38afd 100644 (file)
@@ -2753,7 +2753,7 @@ static ScheduleDAGInstrs *createConvergingSched(MachineSchedContext *C) {
   // data and pass it to later mutations. Have a single mutation that gathers
   // the interesting nodes in one pass.
   DAG->addMutation(new CopyConstrain(DAG->TII, DAG->TRI));
-  if (EnableLoadCluster)
+  if (EnableLoadCluster && DAG->TII->enableClusterLoads())
     DAG->addMutation(new LoadClusterMutation(DAG->TII, DAG->TRI));
   if (EnableMacroFusion)
     DAG->addMutation(new MacroFusion(DAG->TII));