[PATCH] D34959: [AArch64] Only run macro fusion for CPUs with any fusion support.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 3 10:03:59 PDT 2017
fhahn created this revision.
Herald added subscribers: kristof.beyls, rengolin, aemerson.
https://reviews.llvm.org/D34959
Files:
lib/Target/AArch64/AArch64TargetMachine.cpp
Index: lib/Target/AArch64/AArch64TargetMachine.cpp
===================================================================
--- lib/Target/AArch64/AArch64TargetMachine.cpp
+++ lib/Target/AArch64/AArch64TargetMachine.cpp
@@ -277,10 +277,12 @@
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;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34959.105106.patch
Type: text/x-patch
Size: 783 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170703/083e5a24/attachment.bin>
More information about the llvm-commits
mailing list