<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm5719-llvm/clang/test/Sema, branch meklort-10.0.1</title>
<subtitle>Project Ortega BCM5719 LLVM</subtitle>
<id>https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1</id>
<link rel='self' href='https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/'/>
<updated>2020-05-06T17:24:52+00:00</updated>
<entry>
<title>[Sema] Allow function attribute patchable_function_entry on aarch64_be</title>
<updated>2020-05-06T17:24:52+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2020-05-06T15:31:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=98f9f73f6d2367aa8001c4d16de9d3b347febb08'/>
<id>urn:sha1:98f9f73f6d2367aa8001c4d16de9d3b347febb08</id>
<content type='text'>
Reviewed By: nickdesaulniers

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

(cherry picked from commit 57a1c1be53aeea521747dd2f4b0097831341bea5)
</content>
</entry>
<entry>
<title>[Driver][CodeGen] Support -fpatchable-function-entry=N,M and __attribute__((patchable_function_entry(N,M))) where M&gt;0</title>
<updated>2020-01-24T18:38:40+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2020-01-20T22:30:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=5d1fe1a1a9f18c5009e9e282b755e52c5e7ce5a2'/>
<id>urn:sha1:5d1fe1a1a9f18c5009e9e282b755e52c5e7ce5a2</id>
<content type='text'>
Reviewed By: nickdesaulniers

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

(cherry picked from commit 69bf40c45fd7f6dfe11b47de42571d8bff5ef94f)
</content>
</entry>
<entry>
<title>Revert "PR17164: Change clang's default behavior from -flax-vector-conversions=all to -flax-vector-conversions=integer."</title>
<updated>2020-01-23T19:13:31+00:00</updated>
<author>
<name>Mitch Phillips</name>
<email>31459023+hctim@users.noreply.github.com</email>
</author>
<published>2020-01-21T00:34:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=b079266dcb6d1ee6446d074ebd1d212a13ce0665'/>
<id>urn:sha1:b079266dcb6d1ee6446d074ebd1d212a13ce0665</id>
<content type='text'>
This patch broke the Sanitizer buildbots. Please see the commit's
differential revision for more information
(https://reviews.llvm.org/D67678).

This reverts commit b72a8c65e4e34779b6bc9e466203f553f5294486.

(cherry picked from commit edd4398f4cd33a305afbca76ac4e6590e9337f4d)
</content>
</entry>
<entry>
<title>PR17164: Change clang's default behavior from -flax-vector-conversions=all to -flax-vector-conversions=integer.</title>
<updated>2020-01-17T08:45:41+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2019-05-09T06:30:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=7a8b8f09daa1d4f8b82275006678ce3b5daa03b2'/>
<id>urn:sha1:7a8b8f09daa1d4f8b82275006678ce3b5daa03b2</id>
<content type='text'>
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)
</content>
</entry>
<entry>
<title>Implement VectorType conditional operator GNU extension.</title>
<updated>2020-01-13T21:27:20+00:00</updated>
<author>
<name>Erich Keane</name>
<email>erich.keane@intel.com</email>
</author>
<published>2019-12-05T14:17:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=349636d2bfc39a5c81a835a95d203a42d9f9301a'/>
<id>urn:sha1:349636d2bfc39a5c81a835a95d203a42d9f9301a</id>
<content type='text'>
GCC supports the conditional operator on VectorTypes that acts as a
'select' in C++ mode. This patch implements the support. Types are
converted as closely to GCC's behavior as possible, though in a few
places consistency with our existing vector type support was preferred.

Note that this implementation is different from the OpenCL version in a
number of ways, so it unfortunately required a different implementation.

First, the SEMA rules and promotion rules are significantly different.

Secondly, GCC implements COND[i] != 0 ? LHS[i] : RHS[i] (where i is in
the range 0- VectorSize, for each element).  In OpenCL, the condition is
COND[i] &lt; 0 ? LHS[i]: RHS[i].

In the process of implementing this, it was also required to make the
expression COND ? LHS : RHS type dependent if COND is type dependent,
since the type is now dependent on the condition.  For example:

    T ? 1 : 2;

Is not typically type dependent, since the result can be deduced from
the operands.  HOWEVER, if T is a VectorType now, it could change this
to a 'select' (basically a swizzle with a non-constant mask) with the 1
and 2 being promoted to vectors themselves.

While this is a change, it is NOT a standards incompatible change. Based
on my (and D. Gregor's, at the time of writing the code) reading of the
standard, the expression is supposed to be type dependent if ANY
sub-expression is type dependent.

Differential Revision: https://reviews.llvm.org/D71463
</content>
</entry>
<entry>
<title>Support function attribute patchable_function_entry</title>
<updated>2020-01-10T17:57:34+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2020-01-04T23:39:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=a44c434b68e515ce9f2627367c83ff6b22328261'/>
<id>urn:sha1:a44c434b68e515ce9f2627367c83ff6b22328261</id>
<content type='text'>
This feature is generic. Make it applicable for AArch64 and X86 because
the backend has only implemented NOP insertion for AArch64 and X86.

Reviewed By: nickdesaulniers, aaron.ballman

Differential Revision: https://reviews.llvm.org/D72221
</content>
</entry>
<entry>
<title>Add support for __declspec(guard(nocf))</title>
<updated>2020-01-10T16:04:12+00:00</updated>
<author>
<name>Andrew Paverd</name>
<email>andrew.paverd@microsoft.com</email>
</author>
<published>2020-01-10T11:08:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=bdd88b7ed3956534a0a71b1ea2bc88c69d48f9b7'/>
<id>urn:sha1:bdd88b7ed3956534a0a71b1ea2bc88c69d48f9b7</id>
<content type='text'>
Summary:
Avoid using the `nocf_check` attribute with Control Flow Guard. Instead, use a
new `"guard_nocf"` function attribute to indicate that checks should not be
added on indirect calls within that function. Add support for
`__declspec(guard(nocf))` following the same syntax as MSVC.

Reviewers: rnk, dmajor, pcc, hans, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: aaron.ballman, tomrittervg, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D72167
</content>
</entry>
<entry>
<title>Add builtins for aligning and checking alignment of pointers and integers</title>
<updated>2020-01-09T21:48:29+00:00</updated>
<author>
<name>Alex Richardson</name>
<email>Alexander.Richardson@cl.cam.ac.uk</email>
</author>
<published>2020-01-09T20:48:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=8c387cbea76b169f1f8ecc7693797e96567ed896'/>
<id>urn:sha1:8c387cbea76b169f1f8ecc7693797e96567ed896</id>
<content type='text'>
This change introduces three new builtins (which work on both pointers
and integers) that can be used instead of common bitwise arithmetic:
__builtin_align_up(x, alignment), __builtin_align_down(x, alignment) and
__builtin_is_aligned(x, alignment).

I originally added these builtins to the CHERI fork of LLVM a few years ago
to handle the slightly different C semantics that we use for CHERI [1].
Until recently these builtins (or sequences of other builtins) were
required to generate correct code. I have since made changes to the default
C semantics so that they are no longer strictly necessary (but using them
does generate slightly more efficient code). However, based on our experience
using them in various projects over the past few years, I believe that adding
these builtins to clang would be useful.

These builtins have the following benefit over bit-manipulation and casts
via uintptr_t:

- The named builtins clearly convey the semantics of the operation. While
  checking alignment using __builtin_is_aligned(x, 16) versus
  ((x &amp; 15) == 0) is probably not a huge win in readably, I personally find
  __builtin_align_up(x, N) a lot easier to read than (x+(N-1))&amp;~(N-1).
- They preserve the type of the argument (including const qualifiers). When
  using casts via uintptr_t, it is easy to cast to the wrong type or strip
  qualifiers such as const.
- If the alignment argument is a constant value, clang can check that it is
  a power-of-two and within the range of the type. Since the semantics of
  these builtins is well defined compared to arbitrary bit-manipulation,
  it is possible to add a UBSAN checker that the run-time value is a valid
  power-of-two. I intend to add this as a follow-up to this change.
- The builtins avoids int-to-pointer casts both in C and LLVM IR.
  In the future (i.e. once most optimizations handle it), we could use the new
  llvm.ptrmask intrinsic to avoid the ptrtoint instruction that would normally
  be generated.
- They can be used to round up/down to the next aligned value for both
  integers and pointers without requiring two separate macros.
- In many projects the alignment operations are already wrapped in macros (e.g.
  roundup2 and rounddown2 in FreeBSD), so by replacing the macro implementation
  with a builtin call, we get improved diagnostics for many call-sites while
  only having to change a few lines.
- Finally, the builtins also emit assume_aligned metadata when used on pointers.
  This can improve code generation compared to the uintptr_t casts.

[1] In our CHERI compiler we have compilation mode where all pointers are
implemented as capabilities (essentially unforgeable 128-bit fat pointers).
In our original model, casts from uintptr_t (which is a 128-bit capability)
to an integer value returned the "offset" of the capability (i.e. the
difference between the virtual address and the base of the allocation).
This causes problems for cases such as checking the alignment: for example, the
expression `if ((uintptr_t)ptr &amp; 63) == 0` is generally used to check if the
pointer is aligned to a multiple of 64 bytes. The problem with offsets is that
any pointer to the beginning of an allocation will have an offset of zero, so
this check always succeeds in that case (even if the address is not correctly
aligned). The same issues also exist when aligning up or down. Using the
alignment builtins ensures that the address is used instead of the offset. While
I have since changed the default C semantics to return the address instead of
the offset when casting, this offset compilation mode can still be used by
passing a command-line flag.

Reviewers: rsmith, aaron.ballman, theraven, fhahn, lebedev.ri, nlopes, aqjune
Reviewed By: aaron.ballman, lebedev.ri
Differential Revision: https://reviews.llvm.org/D71499
</content>
</entry>
<entry>
<title>[ARM,MVE] Fix valid immediate range for vsliq_n.</title>
<updated>2020-01-09T15:04:47+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>simon.tatham@arm.com</email>
</author>
<published>2020-01-09T10:49:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=d857e114b5e04f5143485a5aea7ad9b283768692'/>
<id>urn:sha1:d857e114b5e04f5143485a5aea7ad9b283768692</id>
<content type='text'>
In common with most MVE immediate shift instructions, the left shift
takes an immediate in the range [0,n-1], while the right shift takes
one in the range [1,n]. I had absent-mindedly made them both the
latter.

While I'm here, I've added a set of regression tests checking both
ends of the immediate range for a representative sample of the
immediate shifts.
</content>
</entry>
<entry>
<title>[ARM,MVE] Support -ve offsets in gather-load intrinsics.</title>
<updated>2020-01-06T16:33:07+00:00</updated>
<author>
<name>Simon Tatham</name>
<email>simon.tatham@arm.com</email>
</author>
<published>2020-01-06T16:33:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=4978296cd8e4d10724cfa41f0308d256c0fd490c'/>
<id>urn:sha1:4978296cd8e4d10724cfa41f0308d256c0fd490c</id>
<content type='text'>
Summary:
The ACLE intrinsics with `gather_base` or `scatter_base` in the name
are wrappers on the MVE load/store instructions that take a vector of
base addresses and an immediate offset. The immediate offset can be up
to 127 times the alignment unit, and it can be positive or negative.

At the MC layer, we got that right. But in the Sema error checking for
the wrapping intrinsics, the offset was erroneously constrained to be
positive.

To fix this I've adjusted the `imm_mem7bit` class in the Tablegen that
defines the intrinsics. But that causes integer literals like
`0xfffffffffffffe04` to appear in the autogenerated calls to
`SemaBuiltinConstantArgRange`, which provokes a compiler warning
because that's out of the non-overflowing range of an `int64_t`. So
I've also tweaked `MveEmitter` to emit that as `-0x1fc` instead.

Updated the tests of the Sema checks themselves, and also adjusted a
random sample of the CodeGen tests to actually use negative offsets
and prove they get all the way through code generation without causing
a crash.

Reviewers: dmgreen, miyuki, MarkMurrayARM

Reviewed By: dmgreen

Subscribers: kristof.beyls, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D72268
</content>
</entry>
</feed>
