llvm-project/llvm
Philip Reames 042a7a5f0d [riscv] Use X0 for destination of VSETVLI instruction if result unused
If the GPR destination register of a VSETVLI instruction is unused, we can replace it with X0. This discards the result, and thus reduces register pressure.

Since after the core insertion/lowering algorithm has run, many user written VSETVLIs will have their GPR result unused (as VTYPE/VLEN is now explicitly read instead), this kicks in for most tests which involve a vsetvli intrinsic for fixed length vectorization. (vscale vectorization generally uses the GPR result to know how far to e.g. advance pointers in a loop and these uses are not removed.)  When inserting VSETVLIs to lower psuedos, we prefer the X0 form anyways.

Differential Revision: https://reviews.llvm.org/D124961
2022-05-05 07:39:45 -07:00
..
benchmarks
bindings Remove loop-unswitch from various bindings. 2022-04-29 10:53:17 +01:00
cmake [CMake] Ensure correct extension for llvm-lit is used on Windows when LLVM_INSTALL_UTILS is enabled. 2022-04-28 20:41:47 -07:00
docs [CMake] Make omitting CMAKE_BUILD_TYPE an error 2022-05-04 14:01:33 +02:00
examples [examples][ORC] Add a new example showing the ORCv2 removable code APIs. 2022-04-12 15:05:07 -07:00
include [XCOFF][AIX] Use unique section names for LSDA and EH info sections with -ffunction-sections 2022-05-05 09:01:36 -04:00
lib [riscv] Use X0 for destination of VSETVLI instruction if result unused 2022-05-05 07:39:45 -07:00
projects
resources
runtimes
test [riscv] Use X0 for destination of VSETVLI instruction if result unused 2022-05-05 07:39:45 -07:00
tools [llvm-otool] Make `llvm-otool -l` output compatible with otool for LC_BUILD_VERSION 2022-05-04 19:19:09 -04:00
unittests [memprof] Use unknown_function error type for missing functions 2022-05-04 13:02:30 -07:00
utils [gn build] Port 80045e9afa 2022-05-04 18:28:43 +00:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [CMake] Make omitting CMAKE_BUILD_TYPE an error 2022-05-04 14:01:33 +02:00
CODE_OWNERS.TXT [SPIR-V](1/6) Add stub for SPIRV backend 2022-04-20 01:10:25 +02:00
CREDITS.TXT
LICENSE.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.