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

Evandro Menezes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 10 15:44:59 PDT 2017


evandro added inline comments.


================
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
----------------
fhahn wrote:
> 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).
I agree.  It's probably just luck that instructions fused with the `ExitSU`, when the latter depends tightly on the former, have little chance of moving post the RA.


https://reviews.llvm.org/D34958





More information about the llvm-commits mailing list