[llvm] r307851 - [AArch64] Only run macro fusion for CPUs with any fusion support.
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 14:41:28 PDT 2017
Author: fhahn
Date: Wed Jul 12 14:41:28 2017
New Revision: 307851
URL: http://llvm.org/viewvc/llvm-project?rev=307851&view=rev
Log:
[AArch64] Only run macro fusion for CPUs with any fusion support.
Reviewers: evandro, t.p.northover, javed.absar
Reviewed By: evandro
Subscribers: aemerson, rengolin, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D34959
Modified:
llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp
Modified: llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp?rev=307851&r1=307850&r2=307851&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp Wed Jul 12 14:41:28 2017
@@ -277,10 +277,12 @@ public:
ScheduleDAGInstrs *
createMachineScheduler(MachineSchedContext *C) const override {
+ const AArch64Subtarget &ST = C->MF->getSubtarget<AArch64Subtarget>();
ScheduleDAGMILive *DAG = createGenericSchedLive(C);
DAG->addMutation(createLoadClusterDAGMutation(DAG->TII, DAG->TRI));
DAG->addMutation(createStoreClusterDAGMutation(DAG->TII, DAG->TRI));
- DAG->addMutation(createAArch64MacroFusionDAGMutation());
+ if (ST.hasFusion())
+ DAG->addMutation(createAArch64MacroFusionDAGMutation());
return DAG;
}
More information about the llvm-commits
mailing list