llvm-project/clang
Thomas Lively 8e3e56f2a3 [WebAssembly] Add wasm-specific vector shuffle builtin and intrinsic
Summary:

Although using `__builtin_shufflevector` and the `shufflevector`
instruction works fine, they are not opaque to the optimizer. As a
result, DAGCombine can potentially reduce the number of shuffles and
change the shuffle masks. This is unexpected behavior for users of the
WebAssembly SIMD intrinsics who have crafted their shuffles to
optimize the code generated by engines. This patch solves the problem
by adding a new shuffle intrinsic that is opaque to the optimizers in
line with the decision of the WebAssembly SIMD contributors at
https://github.com/WebAssembly/simd/issues/196#issuecomment-622494748. In
the future we may implement custom DAG combines to properly optimize
shuffles and replace this solution.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D66983
2020-05-11 10:01:55 -07:00
..
INPUTS
bindings Revert "Temporarily revert "build: use `find_package(Python3)` if available"" 2020-04-29 01:38:08 +00:00
cmake Revert "[cmake] Allow std::filesystem tests in CrossWinToARMLinux.cmake" 2020-05-07 15:01:39 +03:00
docs Add a flag that controls if clang-tidy and clang-include-fixer are built into libclang. 2020-05-08 11:41:45 -04:00
examples Const-initialize ParsedAttrInfos 2020-03-28 19:04:53 +01:00
include [WebAssembly] Add wasm-specific vector shuffle builtin and intrinsic 2020-05-11 10:01:55 -07:00
lib [WebAssembly] Add wasm-specific vector shuffle builtin and intrinsic 2020-05-11 10:01:55 -07:00
runtime
test [WebAssembly] Add wasm-specific vector shuffle builtin and intrinsic 2020-05-11 10:01:55 -07:00
tools Add a flag that controls if clang-tidy and clang-include-fixer are built into libclang. 2020-05-08 11:41:45 -04:00
unittests [clang-format] [PR34574] Handle [[nodiscard]] attribute in class declaration 2020-05-09 11:27:23 +01:00
utils [analyzer] SATestBuild.py: Allow comments in run_static_analyzer.cmd. 2020-05-11 17:26:37 +03:00
www Fix parsing of enum-base to follow C++11 rules. 2020-05-08 19:32:00 -07:00
.clang-format
.clang-tidy - Update .clang-tidy to ignore parameters of main like functions for naming violations in clang and llvm directory 2020-01-31 16:49:45 +00:00
.gitignore
CMakeLists.txt Revert "Temporarily revert "build: use `find_package(Python3)` if available"" 2020-04-29 01:38:08 +00:00
CODE_OWNERS.TXT
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt [NFC] test commit reverted 2019-12-21 22:12:07 +04:00

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/