llvm-project/llvm/lib/CodeGen/GlobalISel
Amara Emerson fe4625fb24 [GlobalISel][IRTranslator] Change switch table translation to generate jump tables and range checks.
This change makes use of the newly refactored SwitchLoweringUtils code from
SelectionDAG to in order to generate jump tables and range checks where appropriate.

Much of this code is ported from SDAG with some modifications. We generate
G_JUMP_TABLE and G_BRJT instructions when JT opportunities are found. This means
that targets which previously relied on the naive one MBB per case stmt
translation will now start falling back until they add support for the new opcodes.

For range checks, we don't generate any previously unused operations. This
just recognizes contiguous ranges of case values and generates a single block per
range. Single case value blocks are just a special case of ranges so we get that
support almost for free.

There are still some optimizations missing that I haven't ported over, and
bit-tests are also unimplemented. This patch series is already complex enough.

Actual arm64 support for selection of jump tables is coming in a later patch.

Differential Revision: https://reviews.llvm.org/D63169

llvm-svn: 364085
2019-06-21 18:10:38 +00:00
..
CMakeLists.txt [GISel]: Add support for CSEing continuously during GISel passes. 2019-01-16 00:40:37 +00:00
CSEInfo.cpp [GlobalISel] Enable CSE in the IRTranslator & legalizer for -O0 with constants only. 2019-04-15 05:04:20 +00:00
CSEMIRBuilder.cpp Re-apply r353553 "[GISel][NFC]: Add missing call to record CSE hits in the CSEMIRBuilder" 2019-02-08 23:34:11 +00:00
CallLowering.cpp Reapply: IR: add optional type to 'byval' function parameters 2019-05-30 18:48:23 +00:00
Combiner.cpp [GISel][NFC]: Add methods to speed up insertion into GISelWorklist 2019-02-15 01:37:54 +00:00
CombinerHelper.cpp [globalisel] Fix iterator invalidation in the extload combines 2019-06-17 20:56:31 +00:00
GISelChangeObserver.cpp [AArch64][GlobalISel] Enable copy elision in the pre-legalizer combine and fix a crash. 2019-04-13 00:33:25 +00:00
GlobalISel.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IRTranslator.cpp [GlobalISel][IRTranslator] Change switch table translation to generate jump tables and range checks. 2019-06-21 18:10:38 +00:00
InstructionSelect.cpp GlobalISel: Remove redundant pass initialization 2019-06-18 02:05:06 +00:00
InstructionSelector.cpp Allow target to handle STRICT floating-point nodes 2019-06-05 22:33:10 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LegalityPredicates.cpp GlobalISel: Add alignment to LegalityQuery MMOs 2019-02-14 22:41:09 +00:00
LegalizeMutations.cpp GlobalISel: Try to make legalize rules more useful for vectors 2019-02-07 17:25:51 +00:00
Legalizer.cpp GlobalISel: Remove redundant pass initialization 2019-06-18 02:05:06 +00:00
LegalizerHelper.cpp [MIPS GlobalISel] Select integer to floating point conversions 2019-06-20 09:05:02 +00:00
LegalizerInfo.cpp [globalisel] Improve Legalizer debug output 2019-04-29 18:45:59 +00:00
Localizer.cpp [GlobalISel][Localizer] Allow localization of G_INTTOPTR and chains of instructions. 2019-06-21 00:36:19 +00:00
MachineIRBuilder.cpp [GlobalISel] Add a G_BRJT opcode. 2019-06-14 17:55:48 +00:00
RegBankSelect.cpp GlobalISel: Remove redundant pass initialization 2019-06-18 02:05:06 +00:00
RegisterBank.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
RegisterBankInfo.cpp Reapply "GlobalISel: Avoid producing Illegal copies in RegBankSelect" 2019-06-15 00:33:26 +00:00
Utils.cpp [GlobalISel] Fix inserting copies in the right position for reg definitions 2019-04-26 07:21:56 +00:00