[PATCH] D34958: [AArch64] Add AArch64Subtarget::isFusion function.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 4 10:15:28 PDT 2017


fhahn added reviewers: joelkevinjones, joel_k_jones.
fhahn added a subscriber: joel_k_jones.
fhahn added a comment.

Adding @joel_k_jones as a reviewer, as this change potentially changes code generated for thunderx2t99.



================
Comment at: lib/Target/AArch64/AArch64TargetMachine.cpp:290
     const AArch64Subtarget &ST = C->MF->getSubtarget<AArch64Subtarget>();
-    if (ST.hasFuseAES() || ST.hasFuseLiterals()) {
+    if (ST.hasFusion()) {
       // Run the Macro Fusion after RA again since literals are expanded from
----------------
javed.absar wrote:
> This doesn't look like NFCI - as previously this would be triggered on hasFuseAES and hasFuseLiteral only, but now it will include Bcc and  cbz fusion as well.
Indeed, that should have been clearer from the description. I'll update the description. I think it makes sense to add the macro fusion mutation in case any kind of fusion is supported, because if the PostRA machinescheduler is run, there's always potential that instructions scheduled back to back are re-scheduled. 

Currently, this could potentially only change the code generated for thunderx2t99, which is the only subtarget that uses the PostRA machinescheduler AND has ArithmeticBccFusion (and not FuseAES or FuseLiterals).


https://reviews.llvm.org/D34958





More information about the llvm-commits mailing list