OSDN Git Service

[AArch64][GlobalISel] Split post-legalizer combiner to allow for lowering at -O0
authorJessica Paquette <jpaquette@apple.com>
Mon, 19 Oct 2020 17:17:15 +0000 (10:17 -0700)
committerJessica Paquette <jpaquette@apple.com>
Thu, 22 Oct 2020 21:43:25 +0000 (14:43 -0700)
commit147b9497e79a98a8614b2b5eb4ba653b44f6b6f0
treef995a0e591c9195ce7ab850666ef93399fbe532a
parent6f8f5cb77efd100e5d4916db871b18c88cf49ed0
[AArch64][GlobalISel] Split post-legalizer combiner to allow for lowering at -O0

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.

Also, while we're here, improve the documentation for the
AArch64PostLegalizerCombiner, and fix up the filepath in its file comment.

And also add a 'r' which somehow got dropped from a bunch of function names.

https://reviews.llvm.org/D89820
15 files changed:
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 [new file with mode: 0644]
llvm/lib/Target/AArch64/GISel/AArch64PreLegalizerCombiner.cpp
llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-ext.mir [moved from llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-ext.mir with 98% similarity]
llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-rev.mir [moved from llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-rev.mir with 95% similarity]
llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-shuffle-splat.mir [moved from llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-shuffle-splat.mir with 99% similarity]
llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-trn.mir [moved from llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-trn.mir with 98% similarity]
llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-uzp.mir [moved from llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-uzp.mir with 97% similarity]
llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-vashr-vlshr.mir [moved from llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-vashr-vlshr.mir with 97% similarity]
llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-zip.mir [moved from llvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-zip.mir with 98% similarity]
llvm/test/CodeGen/AArch64/O0-pipeline.ll