[PATCH] D28489: [CodeGen] Generalize MacroFusion for any instructions pair

Andrew Trick via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 11:20:17 PST 2017


atrick added a comment.

Note that adjustSchedDependency is defined as updating the latency. It's very important for target hooks not to mutate data structures people's backs.

I think I see @MatzeB's point. Just remove MacroFusion from the target independent MachineScheduler. Code reuse is not really helpful here. X86 should just have it's own MacroFusion, as with AArch64. The still register the SchedDAGMutation the same way.

- Remove shouldScheduleAdjacent from TargetInstrInfo. Targets can define that helper locally.

- X86 MacroFusion doesn't change at all. The code just moves.

- In AArch64 MacroFusion, *before* checking the edge, determine if if this opcode wants to be fused (e.g. isi it MOVK). Only the edges leading to fusable intrustrions are checked. No need to go through a TargetInstrInfo virtual call.


Repository:
  rL LLVM

https://reviews.llvm.org/D28489





More information about the llvm-commits mailing list