hanchenye-llvm-project/clang
Craig Topper 2a87314e75 [InlineAsm] Update the min-legal-vector-width function attribute based on inputs and outputs to inline assembly
Summary:
Another piece of my ongoing to work for prefer-vector-width.

min-legal-vector-width will eventually be used by the X86 backend to know whether it needs to make 512 bits type legal when prefer-vector-width=256. If the user used inline assembly that passed in/out a 512-bit register, we need to make sure 512 bits are considered legal. Otherwise we'll get an assert failure when we try to wire up the inline assembly to the rest of the code.

This patch just checks the LLVM IR types to see if they are vectors and then updates the attribute based on their total width. I'm not sure if this is the best way to do this or if there's any subtlety I might have missed. So if anyone has other opinions on how to do this I'm open to suggestions.

Reviewers: chandlerc, rsmith, rnk

Reviewed By: rnk

Subscribers: eraman, cfe-commits

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

llvm-svn: 339721
2018-08-14 20:21:05 +00:00
..
INPUTS
bindings
cmake [CMake] Link static libunwind and libc++abi into libc++ in Fuchsia toolchain 2018-07-25 01:44:22 +00:00
docs [ASTMatchers] Let hasAnyArgument also support CXXUnresolvedConstructExpr 2018-08-12 23:30:05 +00:00
examples
include [OPENMP] Fix processing of declare target construct. 2018-08-14 18:31:20 +00:00
lib [InlineAsm] Update the min-legal-vector-width function attribute based on inputs and outputs to inline assembly 2018-08-14 20:21:05 +00:00
runtime [CMake] Make bootstrap and compiler-rt depend on cxx-headers. 2018-06-28 18:35:25 +00:00
test [InlineAsm] Update the min-legal-vector-width function attribute based on inputs and outputs to inline assembly 2018-08-14 20:21:05 +00:00
tools Added LLVM metadata to generated IR to increase vectorization width 2018-08-09 21:59:01 +00:00
unittests [clang-format] Fix comment, NFC 2018-08-13 14:32:29 +00:00
utils Revert r339623 "Model type attributes as regular Attrs." 2018-08-14 01:55:37 +00:00
www [Sema] P0961R1: Relaxing the structured bindings customization point finding rules 2018-08-09 20:11:13 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt [CMake] Make bootstrap and compiler-rt depend on cxx-headers. 2018-06-28 18:35:25 +00:00
CODE_OWNERS.TXT
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt

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/