llvm-capstone/llvm
Craig Topper e2b7aabb57 [RISCV] Reduce the number of RISCV vector builtins by an order of magnitude.
All but 2 of the vector builtins are only used by clang_builtin_alias.
When using clang_builtin_alias, the type string of the builtin is never
checked. Only the types in the function definition used for the alias
are checked.

This patch takes advantage of this to share a single builtin for
many different types. We already used type overloads on the IR intrinsic
so the codegen for the builtins that are being merge were already
the same. This extends the type overloading to the builtins.

I had to make a few tweaks to make this work.
-Floating point vector-vector vmerge now uses the vmerge intrinsic
 instead of the vfmerge intrinsic. New isel patterns and tests are
 added to support this.
-The SemaChecking for the immediate of vset_v/vget_v has been removed.
 Determining the valid range is harder now. I've added masking to
 ManualCodegen to ensure valid IR for invalid input.

This reduces the number of builtins from ~25000 to ~1100.

Reviewed By: HsiangKai

Differential Revision: https://reviews.llvm.org/D112102
2021-10-25 09:03:59 -07:00
..
benchmarks
bindings
cmake [AIX][cmake] Set atomics related macros when build with xlclang 2021-10-18 09:18:05 +00:00
docs Document LLVM_USE_SPLIT_DWARF option 2021-10-25 18:50:55 +05:30
examples Suppress some bitwise-or-of-bool warnings with explicit int cast 2021-10-18 14:10:30 -07:00
include [DebugInfo][InstrRef] Track values fused into stack spills 2021-10-25 15:14:53 +01:00
lib [RISCV] Reduce the number of RISCV vector builtins by an order of magnitude. 2021-10-25 09:03:59 -07:00
projects Remove unused parallel-libs project 2021-10-21 14:34:39 -07:00
resources
runtimes
test [RISCV] Reduce the number of RISCV vector builtins by an order of magnitude. 2021-10-25 09:03:59 -07:00
tools Ensure newlines at the end of files (NFC) 2021-10-23 08:45:29 -07:00
unittests Support: Skip buffering buffer_unique_ostream's owned stream 2021-10-22 16:25:31 -07:00
utils [gn build] Port e1fdec875f 2021-10-25 09:16:00 +00:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Remove unused parallel-libs project 2021-10-21 14:34:39 -07:00
CODE_OWNERS.TXT
configure
CREDITS.TXT
LICENSE.TXT
llvm.spec.in
README.txt
RELEASE_TESTERS.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.