[PATCH] D154722: [AArch64] Refactor AArch64InstrInfo::isAsCheapAsAMove (NFC)

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 7 08:15:24 PDT 2023


chill created this revision.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
chill requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

- remove `FeatureCustomCheapAsMoveHandling`: when you have target features affecting `isAsCheapAsAMove` that can be given on command line or passed via attributes, then every sub-target effectively has custom handling

- remove special handling of `FMOVD0`/etc: `FVMOV` with an immediate zero operand is never[1] more expensive tha an `FMOV` with a register operand.

- remove special handling of `COPY` - copy is trivially as cheap as itself

- make the function default to the `MachineInstr` attribute `isAsCheapAsAMove`

- remove special handling of `ANDWrr`/etc and of `ANDWri`/etc: the fallback `MachineInstr` attribute is already non-zero.

- remove special handling of `ADDWri`/`SUBWri`/`ADDXri`/`SUBXri` - there are always[1] one cycle latency with maximum (for the micro-architecture) throughput

- check if `MOVi32Imm`/`MOVi64Imm` can be expanded into `MOVZ`/`MOVN`

[1] according to 19 software optimisation manuals


https://reviews.llvm.org/D154722

Files:
  llvm/lib/Target/AArch64/AArch64.td
  llvm/lib/Target/AArch64/AArch64InstrInfo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154722.538150.patch
Type: text/x-patch
Size: 7526 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230707/9f2e851f/attachment.bin>


More information about the llvm-commits mailing list