| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a way for us to version any UBSan handler by itself.
The patch overrides D21289 for a better implementation (we're able to
rev up a single handler).
After this, then we can land a slight modification of D19667+D19668.
We probably don't want to keep all the versions in compiler-rt (maybe we
want to deprecate on one release and remove the old handler on the next
one?), but with this patch we will loudly fail to compile when mixing
incompatible handler calls, instead of silently compiling and then
providing bad error messages.
Reviewers: kcc, samsonov, rsmith, vsk
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D21695
llvm-svn: 289444
|
|
|
|
|
|
|
|
|
|
|
| |
have the same size.
This fixes an asset that is triggered when an address of a boolean
variable is passed to __builtin_arm_ldrex or __builtin_arm_strex.
rdar://problem/29269006
llvm-svn: 288404
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D27157
llvm-svn: 288083
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D26863
llvm-svn: 287390
|
|
|
|
| |
llvm-svn: 286994
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements all the overloads for vec_xl_be and vec_xst_be. On BE,
they behaves exactly the same with vec_xl and vec_xst, therefore they are
simply implemented by defining a matching macro. On LE, they are implemented
by defining new builtins and intrinsics. For int/float/long long/double, it
is just a load (lxvw4x/lxvd2x) or store(stxvw4x/stxvd2x). For char/char/short,
we also need some extra shuffling before or after call the builtins to get the
desired BE order. For int128, simply call vec_xl or vec_xst.
llvm-svn: 286971
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make handling integer parameters more flexible:
- For the number of events argument allow to pass larger
integers than 32 bits as soon as compiler can prove that
the range fits in 32 bits. If not, the diagnostic will be given.
- Change type of the arguments specifying the sizes of
the corresponding block arguments to be size_t.
Review: https://reviews.llvm.org/D26509
llvm-svn: 286849
|
|
|
|
|
|
|
|
|
| |
- Accept NULL pointer as a valid parameter value for clk_event.
- Generate clk_event_t arguments of internal
__enqueue_kernel_XXX function as pointers in generic address space.
Review: https://reviews.llvm.org/D26507
llvm-svn: 286836
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D26476
llvm-svn: 286741
|
|
|
|
| |
llvm-svn: 286595
|
|
|
|
|
|
|
|
| |
int2mask/mask2int intrinsics.
Differential Revision: https://reviews.llvm.org/D26021
llvm-svn: 286229
|
|
|
|
| |
llvm-svn: 285595
|
|
|
|
|
|
|
|
|
|
| |
__builtin_alloca always uses __BIGGEST_ALIGNMENT__ for the alignment of
the allocation. __builtin_alloca_with_align allows the programmer to
specify the alignment of the allocation.
This fixes PR30658.
llvm-svn: 285544
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC documents __builtin_alloca as aligning the storage to at least
__BIGGEST_ALIGNMENT__.
MSVC documents essentially the same for the x64 ABI:
https://msdn.microsoft.com/en-us/library/x9sx5da1.aspx
The 32-bit ABI follows the same rule: it emits a call to _alloca_probe_16
Differential Revision: https://reviews.llvm.org/D24378
llvm-svn: 285316
|
|
|
|
|
|
|
|
|
|
|
| |
abstract information about the callee. NFC.
The goal here is to make it easier to recognize indirect calls and
trigger additional logic in certain cases. That logic will come in
a later patch; in the meantime, I felt that this was a significant
improvement to the code.
llvm-svn: 285258
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit r285007 and reapply r284990, with a fix for the
opencl test that I broke. Original commit message follows:
These new builtins support a mechanism for logging OS events, using a
printf-like format string to specify the layout of data in a buffer.
The _buffer_size version of the builtin can be used to determine the size
of the buffer to allocate to hold the data, and then __builtin_os_log_format
can write data into that buffer. This implements format checking to report
mismatches between the format string and the data arguments. Most of this
code was written by Chris Willmore.
Differential Revision: https://reviews.llvm.org/D25888
llvm-svn: 285019
|
|
|
|
|
|
| |
This reverts commit r284990, two opencl test are broken
llvm-svn: 285007
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These new builtins support a mechanism for logging OS events, using a
printf-like format string to specify the layout of data in a buffer.
The _buffer_size version of the builtin can be used to determine the size
of the buffer to allocate to hold the data, and then __builtin_os_log_format
can write data into that buffer. This implements format checking to report
mismatches between the format string and the data arguments. Most of this
code was written by Chris Willmore.
Differential Revision: https://reviews.llvm.org/D25888
llvm-svn: 284990
|
|
|
|
|
|
| |
native IR like we do for 128/256-bit, but with the addition of masking.
llvm-svn: 284956
|
|
|
|
|
|
| |
select in the header file with the older unmasked versions instead.
llvm-svn: 284920
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: We need `__stosb` to be an intrinsic, because SecureZeroMemory function uses it without including intrin.h. Implementing it as a volatile memset is not consistent with MSDN specification, but it gives us target-independent IR while keeping the most important properties of `__stosb`.
Reviewers: rnk, hans, thakis, majnemer
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25334
llvm-svn: 284253
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Previously global 64-bit versions of _Interlocked functions broke buildbots on i386, so now I'm adding them as builtins for x86-64 and ARM only (should they be also on AArch64? I had problems with testing it for AArch64, so I left it)
Reviewers: hans, majnemer, mstorsjo, rnk
Subscribers: cfe-commits, aemerson
Differential Revision: https://reviews.llvm.org/D25576
llvm-svn: 284172
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: rnk, thakis, majnemer, hans
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25540
llvm-svn: 284131
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: _BitScan intrinsics (and some others, for example _Interlocked and _bittest) are supposed to work on both ARM and x86. This is an attempt to isolate them, avoiding repeating their code or writing separate function for each builtin.
Reviewers: hans, thakis, rnk, majnemer
Subscribers: RKSimon, cfe-commits, aemerson
Differential Revision: https://reviews.llvm.org/D25264
llvm-svn: 284060
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pointers (NFC)"
This reverts commit r283802. It introduces temporarily static
initializers, because StringRef ctor isn't (yet) constexpr for
string literals.
I plan to get there this week, but apparently GCC is so terrible
with these static initializer right now (10 min+ extra codegen
time was reported) that I'll hold on to this patch till the
constexpr one is ready, and land these at the same time.
llvm-svn: 283920
|
|
|
|
| |
llvm-svn: 283802
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: hans, rnk, majnemer
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25442
llvm-svn: 283793
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: rnk, thakis, majnemer, hans
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25353
llvm-svn: 283785
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: We need x86-64-specific builtins if we want to implement some of the MS intrinsics - winnt.h contains definitions of some functions for i386, but not for x86-64 (for example _InterlockedOr64), which means that we cannot treat them as builtins for both i386 and x86-64, because then we have definitions of builtin functions in winnt.h on i386.
Reviewers: thakis, majnemer, hans, rnk
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D24598
llvm-svn: 283264
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
With this commit simple coroutines can be created in plain C using coroutine builtins.
Reviewers: rnk, EricWF, rsmith
Subscribers: modocache, mgorny, mehdi_amini, beanz, cfe-commits
Differential Revision: https://reviews.llvm.org/D24373
llvm-svn: 283155
|
|
|
|
| |
llvm-svn: 282996
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are supposed to produce the same as normal volatile
pointer loads/stores. When -volatile:ms is specified,
normal volatile pointers are forced to have atomic semantics
(as is the default on x86 in MSVC mode). In that case,
these builtins should still produce non-atomic volatile
loads/stores without acquire/release semantics, which
the new test verifies.
These are only available on ARM (and on AArch64,
although clang doesn't support AArch64/Windows yet).
This implements what is missing for PR30394, making it possible
to compile C++ for ARM in MSVC mode with MSVC headers.
Differential Revision: https://reviews.llvm.org/D24986
llvm-svn: 282900
|
|
|
|
|
|
|
|
| |
These builtins are available on sm_60+ GPU only.
Differential Revision: https://reviews.llvm.org/D24944
llvm-svn: 282609
|
|
|
|
|
|
|
|
|
|
| |
This patch corresponds to review:
https://reviews.llvm.org/D24397
It adds the __POWER9_VECTOR__ macro and the -mpower9-vector option along with
a number of altivec.h functions (refer to the code review for a list).
llvm-svn: 282481
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: Anastasia, vpykhtin
Subscribers: dmitry, cfe-commits
Differential Revision: https://reviews.llvm.org/D23992
llvm-svn: 282252
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: thakis, compnerd, majnemer, rsmith, rnk
Subscribers: alexshap, cfe-commits
Differential Revision: https://reviews.llvm.org/D24330
llvm-svn: 281540
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This patch converts finite/__finite to builtin functions so that it will be inlined by compiler.
Reviewers: hfinkel, davidxl, efriedma
Subscribers: efriedma, llvm-commits
Differential Revision: https://reviews.llvm.org/D24483
llvm-svn: 281509
|
|
|
|
| |
llvm-svn: 281401
|
|
|
|
| |
llvm-svn: 281399
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: compnerd, thakis, Prazek, majnemer, rnk
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D24153
llvm-svn: 281378
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: thakis, compnerd, majnemer, rsmith, rnk
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D24330
llvm-svn: 281375
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: thakis, Prazek, compnerd, rnk
Subscribers: majnemer, cfe-commits
Differential Revision: https://reviews.llvm.org/D24311
llvm-svn: 280997
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
int __builtin_amdgcn_ds_swizzle (int a, int imm);
while imm is a constant.
Differential Revision:
http://reviews.llvm.org/D23682
llvm-svn: 279165
|
|
|
|
|
|
|
|
| |
platforms"
This reverts commit r278783. It breaks usage of _xgetbv on Windows.
llvm-svn: 278814
|
|
|
|
|
|
|
|
| |
commit on behalf of guyblank
Differential Revision: https://reviews.llvm.org/D21959
llvm-svn: 278783
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
constraints were added to _mm256_broadcast_{pd,ps} intel intrinsics.
The spec for these intrinics is ... pretty much silent on alignment.
This is especially frustrating considering the amount of discussion of
alignment in the load and store instrinsics. So I was forced to rely on
the specification for the VBROADCASTF128 instruction.
That instruction's spec is *also* completely silent on alignment.
Fortunately, when it comes to the instruction's spec, silence is enough.
There is no #GP fault option for an underaligned address so this
instruction, and by inference the intrinsic, can read any alignment.
As it happens, the old code worked exactly this way and in fact we have
plenty of code that hands pointers with less than 16-byte alignment to
these intrinsics. This code broke pretty spectacularly with this commit.
Fortunately, the fix is super simple! Change a 16 to a 1, and ta da!
Anyways, a lot of debugging for a really boring fix. =]
llvm-svn: 278202
|
|
|
|
|
|
|
|
| |
wavefront result.
Differential Revision: http://reviews.llvm.org/D22934
llvm-svn: 277824
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In order to re-define OpenCL built-in functions
'to_{private,local,global}' in OpenCL run-time library LLVM names must
be different from the clang built-in function names.
Reviewers: yaxunl, Anastasia
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D23120
llvm-svn: 277743
|
|
|
|
|
|
|
|
|
|
| |
generic IR
As discussed on D22460, I've updated the vbroadcastf128 pd256/ps256 builtins to map directly to generic IR - load+splat a 128-bit vector to both lanes of a 256-bit vector.
Fix for PR28657.
llvm-svn: 276417
|
|
|
|
| |
llvm-svn: 275623
|