]> granicus.if.org Git - llvm/commit
[GISel]: Add GISelKnownBits analysis
authorAditya Nandakumar <aditya_nandakumar@apple.com>
Tue, 6 Aug 2019 17:18:29 +0000 (17:18 +0000)
committerAditya Nandakumar <aditya_nandakumar@apple.com>
Tue, 6 Aug 2019 17:18:29 +0000 (17:18 +0000)
commit215335e0266f64da0059736b6c9a647ab44af95c
tree9a2a38b3b2f9d2de9273b94872b25546e4b2279b
parentfa1587397e6e9c2dfda3bb8165f61a779afb21c8
[GISel]: Add GISelKnownBits analysis

https://reviews.llvm.org/D65698

This adds a KnownBits analysis pass for GISel. This was done as a
pass (compared to static functions) so that we can add other features
such as caching queries(within a pass and across passes) in the future.
This patch only adds the basic pass boiler plate, and implements a lazy
non caching knownbits implementation (ported from SelectionDAG). I've
also hooked up the AArch64PreLegalizerCombiner pass to use this - there
should be no compile time regression as the analysis is lazy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368065 91177308-0d34-0410-b5e6-96231b3b80d8
16 files changed:
include/llvm/CodeGen/GlobalISel/CombinerHelper.h
include/llvm/CodeGen/GlobalISel/GISelKnownBits.h [new file with mode: 0644]
include/llvm/CodeGen/TargetLowering.h
include/llvm/InitializePasses.h
lib/CodeGen/GlobalISel/CMakeLists.txt
lib/CodeGen/GlobalISel/CombinerHelper.cpp
lib/CodeGen/GlobalISel/GISelKnownBits.cpp [new file with mode: 0644]
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp
test/CodeGen/AArch64/GlobalISel/gisel-commandline-option.ll
unittests/CodeGen/GlobalISel/CMakeLists.txt
unittests/CodeGen/GlobalISel/CSETest.cpp
unittests/CodeGen/GlobalISel/GISelMITest.h
unittests/CodeGen/GlobalISel/KnownBitsTest.cpp [new file with mode: 0644]
unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
unittests/CodeGen/GlobalISel/MachineIRBuilderTest.cpp