[PATCH] D65698: [GISel]: Add GISelKnownBits analysis

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 3 09:28:05 PDT 2019


aditya_nandakumar created this revision.
aditya_nandakumar added reviewers: arsenm, dsanders, qcolombet, aemerson, bogner, volkan, paquette.
Herald added subscribers: Petar.Avramovic, hiraditya, kristof.beyls, javed.absar, mgorny, wdng.
Herald added a project: LLVM.

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.
I've only the chance to add a couple of tests for now (which check a variety of opcodes), but in the future this should be improved.


Repository:
  rL LLVM

https://reviews.llvm.org/D65698

Files:
  llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
  llvm/include/llvm/CodeGen/GlobalISel/GISelKnownBits.h
  llvm/include/llvm/CodeGen/TargetLowering.h
  llvm/include/llvm/InitializePasses.h
  llvm/lib/CodeGen/GlobalISel/CMakeLists.txt
  llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
  llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/lib/Target/AArch64/AArch64PreLegalizerCombiner.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/gisel-commandline-option.ll
  llvm/unittests/CodeGen/GlobalISel/CMakeLists.txt
  llvm/unittests/CodeGen/GlobalISel/CSETest.cpp
  llvm/unittests/CodeGen/GlobalISel/GISelMITest.h
  llvm/unittests/CodeGen/GlobalISel/KnownBitsTest.cpp
  llvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
  llvm/unittests/CodeGen/GlobalISel/MachineIRBuilderTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65698.213191.patch
Type: text/x-patch
Size: 32643 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190803/53f460b9/attachment.bin>


More information about the llvm-commits mailing list