[PATCH] D89820: [AArch64][GlobalISel] Split post-legalizer combiner to allow for lowering at -O0

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 20 13:30:19 PDT 2020


paquette created this revision.
paquette added a reviewer: aemerson.
Herald added subscribers: nikic, danielkiss, hiraditya, kristof.beyls, rovka, mgorny.
Herald added a project: LLVM.
paquette requested review of this revision.

There are a lot of combines in AArch64PostLegalizerCombiner which exist to facilitate instruction matching in the selector. (E.g. matching for G_ZIP and other shuffle vector pseudos)

It still makes sense to select these instructions at -O0.

Matching earlier in a combiner can reduce complexity in the selector significantly. For example, a good portion of our selection code for compares would be a lot easier to represent in a combine.

This patch moves matching combines into a "AArch64PostLegalizerLowering" combiner which runs at all optimization levels.


https://reviews.llvm.org/D89820

Files:
  llvm/lib/Target/AArch64/AArch64.h
  llvm/lib/Target/AArch64/AArch64Combine.td
  llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
  llvm/lib/Target/AArch64/CMakeLists.txt
  llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp
  llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-ext.mir
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-rev.mir
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-shuffle-splat.mir
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-trn.mir
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-uzp.mir
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-vashr-vlshr.mir
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-zip.mir
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-ext.mir
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-rev.mir
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-shuffle-splat.mir
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-trn.mir
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-uzp.mir
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-vashr-vlshr.mir
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-zip.mir
  llvm/test/CodeGen/AArch64/O0-pipeline.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89820.299455.patch
Type: text/x-patch
Size: 46094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201020/00272294/attachment.bin>


More information about the llvm-commits mailing list