[PATCH] D78852: [AArch64][GlobalISel] Add a post-legalizer combiner + remove undef stores

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 24 21:05:51 PDT 2020


paquette created this revision.
paquette added a reviewer: aemerson.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls, rovka, mgorny.

Add a post-legalizer combiner with a very simple combine. This supersedes D77250 <https://reviews.llvm.org/D77250>, which did equivalent work in the selector.

      

This can be done pre-legalization or post-legalization. Post-legalization is more likely to hit, since G_IMPLICIT_DEFs tend to appear during legalization. There's no reason to not do it pre-legalization though-- if it can be caught earlier, great.

(I also think that it might be worth reimplementing D78769 <https://reviews.llvm.org/D78769> using a target-specific post-legalization combine too after thinking about it for a while.)


https://reviews.llvm.org/D78852

Files:
  llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
  llvm/include/llvm/Target/GlobalISel/Combine.td
  llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
  llvm/lib/Target/AArch64/AArch64.h
  llvm/lib/Target/AArch64/AArch64Combine.td
  llvm/lib/Target/AArch64/AArch64PostLegalizerCombiner.cpp
  llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp
  llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
  llvm/lib/Target/AArch64/CMakeLists.txt
  llvm/test/CodeGen/AArch64/GlobalISel/gisel-commandline-option.ll
  llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-store-undef.mir
  llvm/test/CodeGen/AArch64/O0-pipeline.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78852.260060.patch
Type: text/x-patch
Size: 16131 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200425/5862baea/attachment-0001.bin>


More information about the llvm-commits mailing list