llvm-project/llvm
Jessica Paquette 56503865ed [GlobalISel][AArch64] Improve register bank mappings for G_SELECT
The fcsel and csel instructions differ in only the register banks they work on.

So, they're entirely interchangeable otherwise.

With this in mind, this does two things:

- Teach AArch64RegisterBankInfo to consider the inputs to G_SELECT as well as
  the outputs.
- Teach it to choose the best register bank mapping based off the constraints
  of the inputs and outputs.

The "best" in this case means the one that requires the smallest number of
copies to properly emit a fcsel/csel.

For example, if the inputs are all already going to be on FPRs, we should
emit a fcsel, even if the output is a GPR. This costs one copy to produce the
result, but saves us from copying the inputs into GPRs.

Also update the regbank-select.mir to check that we end up with the right
select instruction.

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

llvm-svn: 361665
2019-05-24 19:35:25 +00:00
..
benchmarks
bindings
cmake Fix BUILD_SHARED_LIBS builds after r361567 2019-05-24 02:15:27 +00:00
docs Clarify how musttail can be used to create forwarding thunks 2019-05-24 01:45:47 +00:00
examples Add a HowToUseLLJIT example project. 2019-05-22 21:38:41 +00:00
include [AMDGPU] Divergence driven ISel. Assign register class for cross block values according to the divergence. 2019-05-24 15:32:18 +00:00
lib [GlobalISel][AArch64] Improve register bank mappings for G_SELECT 2019-05-24 19:35:25 +00:00
projects
resources
runtimes [CMake] Fix issues building runtimes 2019-05-24 16:21:38 +00:00
test [GlobalISel][AArch64] Improve register bank mappings for G_SELECT 2019-05-24 19:35:25 +00:00
tools [llvm-objcopy] - Strip undefined symbols if they are no longer referenced following --only-section 2019-05-24 15:04:50 +00:00
unittests Revert [LOOPINFO] Extend Loop object to add utilities to get the loop bounds, step, induction variable, and guard branch. 2019-05-23 20:53:05 +00:00
utils gn build: Merge r361607 2019-05-24 14:24:25 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt build: enable CMake policy 0077 2019-05-21 20:28:32 +00:00
CODE_OWNERS.TXT
CREDITS.TXT add Qiu Chaofan (qiucf@cn.ibm.com) to the CREDITS.txt 2019-04-23 02:37:48 +00:00
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.