| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix places where the return type of a FunctionDecl was being used in
place of the function type
FunctionDecl::Create() takes as its T parameter the type of function
that should be created, not the return type. Passing in the return type
looks to have been copypasta'd around a bit, but the number of correct
usages outweighs the incorrect ones so I've opted for keeping what T is
the same and fixing up the call sites instead.
This fixes a crash in Clang when attempting to compile the following
snippet of code with -fblocks -fsanitize=function -x objective-c++ (my
original repro case):
void g(void(^)());
void f()
{
__block int a = 0;
g(^(){ a++; });
}
as well as the following which only requires -fsanitize=function -x c++:
void f(char * buf)
{
__builtin_os_log_format(buf, "");
}
Patch by: Ben (bobsayshilol)
Differential revision: https://reviews.llvm.org/D53263
llvm-svn: 346601
|
|
|
|
| |
llvm-svn: 346216
|
|
|
|
|
|
| |
This is a follow-up to r346211.
llvm-svn: 346212
|
|
|
|
|
|
|
|
|
|
| |
A mask type is a 1 to 8-byte string that follows the "mask." annotation
in the format string. This enables obfuscating data in the event the
provided privacy level isn't enabled.
rdar://problem/36756282
llvm-svn: 346211
|
|
|
|
|
|
|
| |
This is eight in a series of patches to move intrinsic definitions out of intrin.h.
Differential: https://reviews.llvm.org/D54068
llvm-svn: 346208
|
|
|
|
|
|
|
| |
This is seventh in a series of patches to move intrinsic definitions out of intrin.h.
Differential: https://reviews.llvm.org/D54067
llvm-svn: 346207
|
|
|
|
|
|
|
| |
This is sixth in a series of patches to move intrinsic definitions out of intrin.h.
Differential: https://reviews.llvm.org/D54066
llvm-svn: 346206
|
|
|
|
|
|
|
|
|
| |
This is fifth in a series of patches to move intrinsic definitions out of intrin.h.
Note: This was reviewed and approved in D54065 but somehow that diff was messed
up. Committing this again with the proper diff.
llvm-svn: 346205
|
|
|
|
|
|
| |
This reverts commit cc3d3cd0fbeb88412d332354c261ff139c4ede6b.
llvm-svn: 346192
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This is fifth in a series of patches to move intrinsic definitions out of intrin.h.
Reviewers: rnk, efriedma, mstorsjo, TomTan
Reviewed By: efriedma
Subscribers: javed.absar, kristof.beyls, chrib, jfb, kristina, cfe-commits
Differential Revision: https://reviews.llvm.org/D54065
llvm-svn: 346191
|
|
|
|
|
|
| |
This is fourth in a series of patches to move intrinsic definitions out of intrin.h.
llvm-svn: 346190
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This is third in a series of patches to move intrinsic definitions out of intrin.h.
Reviewers: rnk, efriedma, mstorsjo, TomTan
Reviewed By: efriedma
Subscribers: javed.absar, kristof.beyls, chrib, jfb, kristina, cfe-commits
Differential Revision: https://reviews.llvm.org/D54062
llvm-svn: 346189
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Windows SDK needs these intrinsics to be proper builtins. This is second in a series of patches to move intrinsic defintions out of intrin.h.
Reviewers: rnk, mstorsjo, efriedma, TomTan
Reviewed By: rnk, efriedma
Subscribers: javed.absar, kristof.beyls, chrib, jfb, kristina, cfe-commits
Differential Revision: https://reviews.llvm.org/D54046
llvm-svn: 346044
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: ARM64 setjmp expects sp on entry instead of framepointer.
Patch by: Yin Ma (yinma@codeaurora.org)
Reviewers: mgrang, eli.friedman, ssijaric, mstorsjo, rnk, compnerd
Reviewed By: mgrang
Subscribers: efriedma, javed.absar, kristof.beyls, chrib, cfe-commits
Differential Revision: https://reviews.llvm.org/D53998
llvm-svn: 346024
|
|
|
|
|
|
|
|
|
|
|
|
| |
The size of an os_log buffer is known at any stage of compilation, so making it
a constant expression means that the common idiom of declaring a buffer for it
won't result in a VLA. That allows the compiler to skip saving and restoring
the stack pointer around such buffers.
This also moves the OSLog and other FormatString helpers from
libclangAnalysis to libclangAST to avoid a circular dependency.
llvm-svn: 345971
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch should not introduce any behavior changes. It consists of
mostly one of two changes:
1. Replacing fall through comments with the LLVM_FALLTHROUGH macro
2. Inserting 'break' before falling through into a case block consisting
of only 'break'.
We were already using this warning with GCC, but its warning behaves
slightly differently. In this patch, the following differences are
relevant:
1. GCC recognizes comments that say "fall through" as annotations, clang
doesn't
2. GCC doesn't warn on "case N: foo(); default: break;", clang does
3. GCC doesn't warn when the case contains a switch, but falls through
the outer case.
I will enable the warning separately in a follow-up patch so that it can
be cleanly reverted if necessary.
Reviewers: alexfh, rsmith, lattner, rtrieu, EricWF, bollu
Differential Revision: https://reviews.llvm.org/D53950
llvm-svn: 345882
|
|
|
|
|
|
|
|
| |
Intrinsic.sponentry"
This reverts commit 619111f5ccf349b635e4987ec02d15777c571495.
llvm-svn: 345872
|
|
|
|
|
|
|
|
| |
expression."
Still more dependency hell.
llvm-svn: 345871
|
|
|
|
|
|
|
|
|
|
|
|
| |
The size of an os_log buffer is known at any stage of compilation, so making it
a constant expression means that the common idiom of declaring a buffer for it
won't result in a VLA. That allows the compiler to skip saving and restoring
the stack pointer around such buffers.
This also moves the OSLog helpers from libclangAnalysis to libclangAST
to avoid a circular dependency.
llvm-svn: 345866
|
|
|
|
|
|
|
|
| |
This also reverts a couple of follow-up commits trying to fix the
dependency issues. Latest revision added a cyclic dependency that can't
just be patched up in 5 minutes.
llvm-svn: 345846
|
|
|
|
|
|
|
|
|
| |
The size of an os_log buffer is known at any stage of compilation, so making it
a constant expression means that the common idiom of declaring a buffer for it
won't result in a VLA. That allows the compiler to skip saving and restoring
the stack pointer around such buffers.
llvm-svn: 345828
|
|
|
|
| |
llvm-svn: 345808
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Use the same convention as all the other WebAssembly builtin names.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, kristina, cfe-commits
Differential Revision: https://reviews.llvm.org/D53724
llvm-svn: 345804
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: ARM64 setjmp expects sp on entry instead of framepointer.
Reviewers: mgrang, rnk, TomTan, compnerd, mstorsjo, efriedma
Reviewed By: mstorsjo
Subscribers: javed.absar, kristof.beyls, chrib, cfe-commits
Differential Revision: https://reviews.llvm.org/D53684
llvm-svn: 345792
|
|
|
|
|
|
|
|
|
| |
These apparently need to be proper builtins to handle the Windows
SDK.
Differential Revision: https://reviews.llvm.org/D53916
llvm-svn: 345779
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Generate the FP16FML intrinsics into arm_neon.h (AArch64 only for now).
Add two new type modifiers to NeonEmitter to handle the new prototypes.
Define __ARM_FEATURE_FP16FML when +fp16fml is enabled and guard the
intrinsics with the macro in arm_neon.h.
Based on a patch by Gao Yiling.
Differential Revision: https://reviews.llvm.org/D53633
llvm-svn: 345344
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, cfe-commits
Differential Revision: https://reviews.llvm.org/D53685
llvm-svn: 345301
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Goes along with D53721.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, cfe-commits
Differential Revision: https://reviews.llvm.org/D53722
llvm-svn: 345300
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
libgcc supports more than 32 features by adding a new 32-bit variable __cpu_features2.
This adds the clang support for checking these feature bits.
Patches for compiler-rt and llvm to support this are coming as well.
Probably still need an additional patch for target multiversioning in clang.
Differential Revision: https://reviews.llvm.org/D53458
llvm-svn: 344832
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dispatcher in the resolver, make sure all the required bits are set. Not just one of them
Summary:
The multiversioning code repurposed the code from __builtin_cpu_supports for checking if a single feature is enabled. That code essentially performed (_cpu_features & (1 << C)) != 0. But with the multiversioning path, the mask is no longer guaranteed to be a power of 2. So we return true anytime any one of the bits in the mask is set not just all of the bits.
The correct check is (_cpu_features & mask) == mask
Reviewers: erichkeane, echristo
Reviewed By: echristo
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D53460
llvm-svn: 344824
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: rnk, compnerd, mstorsjo, efriedma, TomTan, haripul, javed.absar
Reviewed By: efriedma
Subscribers: dmajor, kristof.beyls, chrib, cfe-commits
Differential Revision: https://reviews.llvm.org/D53115
llvm-svn: 344765
|
|
|
|
|
|
|
|
|
|
| |
Emit llvm.amdgcn.update.dpp for both __builtin_amdgcn_mov_dpp and
__builtin_amdgcn_update_dpp. The first argument to
llvm.amdgcn.update.dpp will be undef for __builtin_amdgcn_mov_dpp.
Differential Revision: https://reviews.llvm.org/D52320
llvm-svn: 344665
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Depends on D53007 and D53004.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, kristina, cfe-commits
Differential Revision: https://reviews.llvm.org/D53009
llvm-svn: 344205
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: rnk, mstorsjo, compnerd, TomTan, haripul, javed.absar, efriedma
Reviewed By: efriedma
Subscribers: efriedma, kristof.beyls, chrib, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D52811
llvm-svn: 343894
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: rnk, mstorsjo, compnerd, TomTan, haripul, efriedma
Reviewed By: efriedma
Subscribers: efriedma, kristof.beyls, chrib, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D52807
llvm-svn: 343881
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Depends on D52910.
Reviewers: aheejin, dschuff, craig.topper
Subscribers: sbc100, jgravelle-google, sunfish, kristina, cfe-commits
Differential Revision: https://reviews.llvm.org/D52913
llvm-svn: 343838
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Depends on D52858.
Reviewers: aheejin, dschuff, craig.topper
Subscribers: sbc100, jgravelle-google, sunfish, kristina, cfe-commits
Differential Revision: https://reviews.llvm.org/D52910
llvm-svn: 343837
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Depends on D52856.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, kristina, cfe-commits
Differential Revision: https://reviews.llvm.org/D52858
llvm-svn: 343836
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Depends on D52852.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, kristina, cfe-commits
Differential Revision: https://reviews.llvm.org/D52856
llvm-svn: 343835
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, sunfish, kristina, cfe-commits
Differential Revision: https://reviews.llvm.org/D52852
llvm-svn: 343834
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: rnk, mstorsjo, compnerd, TomTan, haripul, javed.absar, efriedma
Reviewed By: efriedma
Subscribers: peter.smith, efriedma, kristof.beyls, chrib, cfe-commits
Differential Revision: https://reviews.llvm.org/D52838
llvm-svn: 343824
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: rnk, mstorsjo, compnerd, TomTan, haripul, javed.absar
Reviewed By: rnk
Subscribers: kristof.beyls, chrib, jfb, cfe-commits
Differential Revision: https://reviews.llvm.org/D52809
llvm-svn: 343699
|
|
|
|
|
|
|
|
|
|
|
|
| |
flag set to false.
Previously we used a select and the zero_undef=true intrinsic. In -O2 this pattern will get optimized to zero_undef=false. But in -O0 this optimization won't happen. This results in a compare and cmov being wrapped around a tzcnt/lzcnt instruction.
By using the zero_undef=false intrinsic directly without the select, we can improve the -O0 codegen to just an lzcnt/tzcnt instruction.
Differential Revision: https://reviews.llvm.org/D52392
llvm-svn: 343126
|
|
|
|
|
|
|
|
|
|
|
|
| |
unsigned long long builtin_unpack_vector_int128 (vector int128_t, int);
vector int128_t builtin_pack_vector_int128 (unsigned long long, unsigned long long);
Builtins should behave the same way as in GCC.
Patch By: wuzish (Zixuan Wu)
Differential Revision: https://reviews.llvm.org/D52074
llvm-svn: 342614
|
|
|
|
|
|
|
|
|
|
| |
out parameter
This is the clang side of D51803. The llvm intrinsic now returns two results. So we need to emit an explicit store in IR for the out parameter. This is similar to addcarry/subborrow/rdrand/rdseed.
Differential Revision: https://reviews.llvm.org/D51805
llvm-svn: 341699
|
|
|
|
|
|
|
|
|
|
| |
and an store instruction.
This is the clang side of D51769. The llvm intrinsics now return two results instead of using an out parameter.
Differential Revision: https://reviews.llvm.org/D51771
llvm-svn: 341678
|
|
|
|
|
|
|
|
|
|
|
|
| |
These aren't documented in the Intel Intrinsics Guide, but are supported by gcc and icc.
Includes these intrinsics:
_ktestc_mask8_u8, _ktestz_mask8_u8, _ktest_mask8_u8
_ktestc_mask16_u8, _ktestz_mask16_u8, _ktest_mask16_u8
_ktestc_mask32_u8, _ktestz_mask32_u8, _ktest_mask32_u8
_ktestc_mask64_u8, _ktestz_mask64_u8, _ktest_mask64_u8
llvm-svn: 341265
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds:
_cvtmask8_u32, _cvtmask16_u32, _cvtmask32_u32, _cvtmask64_u64
_cvtu32_mask8, _cvtu32_mask16, _cvtu32_mask32, _cvtu64_mask64
_load_mask8, _load_mask16, _load_mask32, _load_mask64
_store_mask8, _store_mask16, _store_mask32, _store_mask64
These are currently missing from the Intel Intrinsics Guide webpage.
llvm-svn: 341251
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the following intrinsics:
_kshiftli_mask8
_kshiftli_mask16
_kshiftli_mask32
_kshiftli_mask64
_kshiftri_mask8
_kshiftri_mask16
_kshiftri_mask32
_kshiftri_mask64
llvm-svn: 341234
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the following intrinsics:
_kadd_mask64
_kadd_mask32
_kadd_mask16
_kadd_mask8
These are missing from the Intel Intrinsics Guide, but are implemented by both gcc and icc.
llvm-svn: 340879
|