summaryrefslogtreecommitdiffstats
path: root/clang/docs
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2019-05-08 23:30:37 -0700
committerHans Wennborg <hans@chromium.org>2020-01-17 09:45:41 +0100
commit7a8b8f09daa1d4f8b82275006678ce3b5daa03b2 (patch)
tree245e450ddd556ecf2a091d734342ce5663036117 /clang/docs
parentfdb501e59f25e59b9dff7d51db468d590909cfef (diff)
downloadbcm5719-llvm-7a8b8f09daa1d4f8b82275006678ce3b5daa03b2.tar.gz
bcm5719-llvm-7a8b8f09daa1d4f8b82275006678ce3b5daa03b2.zip
PR17164: Change clang's default behavior from -flax-vector-conversions=all to -flax-vector-conversions=integer.
Summary: See proposal on cfe-dev: http://lists.llvm.org/pipermail/cfe-dev/2019-April/062030.html Reviewers: SjoerdMeijer, eli.friedman Subscribers: kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67678 (cherry picked from commit b72a8c65e4e34779b6bc9e466203f553f5294486)
Diffstat (limited to 'clang/docs')
-rw-r--r--clang/docs/CommandGuide/clang.rst11
-rw-r--r--clang/docs/ReleaseNotes.rst24
2 files changed, 34 insertions, 1 deletions
diff --git a/clang/docs/CommandGuide/clang.rst b/clang/docs/CommandGuide/clang.rst
index 7b0873600fc..6947450beb4 100644
--- a/clang/docs/CommandGuide/clang.rst
+++ b/clang/docs/CommandGuide/clang.rst
@@ -278,9 +278,18 @@ Language Selection and Mode Options
Make all string literals default to writable. This disables uniquing of
strings and other optimizations.
-.. option:: -flax-vector-conversions
+.. option:: -flax-vector-conversions, -flax-vector-conversions=<kind>, -fno-lax-vector-conversions
Allow loose type checking rules for implicit vector conversions.
+ Possible values of <kind>:
+
+ - ``none``: allow no implicit conversions between vectors
+ - ``integer``: allow implicit bitcasts between integer vectors of the same
+ overall bit-width
+ - ``all``: allow implicit bitcasts between any vectors of the same
+ overall bit-width
+
+ <kind> defaults to ``integer`` if unspecified.
.. option:: -fblocks
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 881dcb78b66..8c48724e7c6 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -102,6 +102,15 @@ Non-comprehensive list of changes in this release
the found gcc installation is older than 4.7.0. Add ``-fno-use-init-array`` to
get the old behavior (``.ctors``).
+* Lax vector conversions involving floating-point vectors have been disabled
+ by default, and can no longer be enabled with ``-flax-vector-conversions``.
+ This matches the behavior of these flags in GCC, but code relying on implicit
+ vector bitcasts between integer and floating-point types that used to compile
+ with older versions of Clang is no longer accepted by default in Clang 10.
+ The old behavior can be restored with ``-flax-vector-conversions=all``.
+ In a future release of Clang, we intend to change the default to
+ ``-fno-lax-vector-conversions``.
+
New Compiler Flags
------------------
@@ -132,6 +141,21 @@ Modified Compiler Flags
- RISC-V now sets the architecture (riscv32/riscv64) based on the value provided
to the ``-march`` flag, overriding the target provided by ``-triple``.
+- ``-flax-vector-conversions`` has been split into three different levels of
+ laxness:
+
+ - ``-flax-vector-conversions=all``: This is Clang's historical default, and
+ permits implicit vector conversions (performed as bitcasts) between any
+ two vector types of the same overall bit-width.
+
+ - ``-flax-vector-conversions=integer``: This is Clang's current default,
+ and permits implicit vector conversions (performed as bitcasts) between
+ any two integer vector types of the same overall bit-width.
+ Synonym: ``-flax-vector-conversions``.
+
+ - ``-flax-vector-conversions=none``: Do not perform any implicit bitcasts
+ between vector types. Synonym: ``-fno-lax-vector-conversions``.
+
New Pragmas in Clang
--------------------
OpenPOWER on IntegriCloud