OSDN Git Service

[AArch64][GlobalISel] Add a post-legalizer combiner with a very simple combine.
authorJessica Paquette <jpaquette@apple.com>
Fri, 22 May 2020 01:05:37 +0000 (18:05 -0700)
committerAmara Emerson <aemerson@apple.com>
Fri, 22 May 2020 01:47:32 +0000 (18:47 -0700)
commit49a4f3f7d88f61a81279de3d4e1c734ab0363228
tree44e02a96f47aed8f1fbae88c6deeb9f8587465fc
parent2a4c30985ded329d64357f5535d2ff2a3f955c81
[AArch64][GlobalISel] Add a post-legalizer combiner with a very simple combine.

(This patch is by Jessica, I'm just committing it on her behalf because I need
a post-legalizer combiner for something else).

This supersedes 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 using a
target-specific post-legalization combine too after thinking about it for a
while.)

Differential Revision: https://reviews.llvm.org/D78852
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 [new file with mode: 0644]
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 [new file with mode: 0644]