| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
feeding it to set1.
Previously we negated the whole vector after splatting infinity. But its better to negate the infinity before splatting. This generates IR with the negate already folded with the infinity constant.
llvm-svn: 333062
|
|
|
|
|
|
| |
CGBuiltin.cpp. Just wrap a select builtin around them in the header file instead.
llvm-svn: 333061
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dest buffer
Again, strlc* does not return a pointer so the zero size case doest not fit.
Reviewers: NoQ, george.karpenkov
Reviewed by: NoQ
Differential Revision: https://reviews.llvm.org/D47007
llvm-svn: 333060
|
|
|
|
|
|
|
|
| |
without crashing
rdar://40447209
llvm-svn: 333046
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
more reliably.
Clang has two different ways it emits array constants (from InitListExprs and
from APValues), and both had some ability to emit zeroinitializer, but neither
was able to catch all cases where we could use zeroinitializer reliably. In
particular, emitting from an APValue would fail to notice if all the explicit
array elements happened to be zero. In addition, for large arrays where only an
initial portion has an explicit initializer, we would emit the complete
initializer (which could be huge) rather than emitting only the non-zero
portion. With this change, when the element would have a suffix of more than 8
zero elements, we emit the array constant as a packed struct of its initial
portion followed by a zeroinitializer constant for the trailing zero portion.
In passing, I found a bug where SemaInit would sometimes walk the entire array
when checking an initializer that only covers the first few elements; that's
fixed here to unblock testing of the rest.
Differential Revision: https://reviews.llvm.org/D47166
llvm-svn: 333044
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The clang builtins have the same semantics as the stdlib functions.
The stdlib functions are defined in section 7.20.6.1 of the C standard with:
"If the result cannot be represented, the behavior is undefined."
That lets us mark the negation with 'nsw' because "sub i32 0, INT_MIN" would
be UB/poison.
Differential Revision: https://reviews.llvm.org/D47202
llvm-svn: 333038
|
|
|
|
|
|
|
|
|
|
| |
intrinsics into f16cintrin.h and remove __emmintrin_f16c.h
These were included in emmintrin.h to match Intel Intrinsics Guide documentation. But this is because icc is capable of emulating them on targets that don't support F16C using library calls. Clang/LLVM doesn't have this emulation support. So it makes more sense to include them in immintrin.h instead.
I've left a comment behind to hopefully deter someone from trying to move them again in the future.
llvm-svn: 333033
|
|
|
|
|
|
| |
CGBuiltin.cpp. Just wrap a select builtin around them in the header file instead.
llvm-svn: 333027
|
|
|
|
| |
llvm-svn: 333026
|
|
|
|
|
|
| |
in r333014.
llvm-svn: 333023
|
|
|
|
|
|
| |
I missed this in r333014
llvm-svn: 333020
|
|
|
|
|
|
|
|
|
|
|
|
| |
emmintrin.h. Move 256-bit f16c intrinsics back to f16cintrin.h
Intel documents the 128-bit versions as being in emmintrin.h and the 256-bit version as being in immintrin.h.
This patch makes a new __emmtrin_f16c.h to hold the 128-bit versions to be included from emmintrin.h. And makes the existing f16cintrin.h contain the 256-bit versions and include it from immintrin.h with an error if its included directly.
Differential Revision: https://reviews.llvm.org/D47174
llvm-svn: 333014
|
|
|
|
|
|
|
|
|
| |
clang."
As well as two follow-on commits r332906, r332911 with a fix for
test clang/test/CodeGen/split-debug-filename.c.
llvm-svn: 333013
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
multiline receiver"
Summary: Reverts D46879
Reviewers: benhamilton
Reviewed By: benhamilton
Subscribers: krasimir, klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D47205
llvm-svn: 332998
|
|
|
|
|
|
| |
Due to regression on arm.
llvm-svn: 332991
|
|
|
|
|
|
|
|
| |
We chose the 'slt' form as canonical in IR with:
rL332819
...so we should generate that form directly for efficiency.
llvm-svn: 332989
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduced CreateMemTempWithoutCast and CreateTemporaryAllocaWithoutCast to emit alloca
without casting to default addr space.
ActiveFlag is a temporary variable emitted for clean up. It is defined as AllocaInst* type and there is
a cast to AlllocaInst in SetActiveFlag. An alloca casted to generic pointer causes assertion in
SetActiveFlag.
Since there is only load/store of ActiveFlag, it is safe to use the original alloca, therefore use
CreateMemTempWithoutCast is called.
Differential Revision: https://reviews.llvm.org/D47099
llvm-svn: 332982
|
|
|
|
|
|
|
|
|
| |
This change will help Visual Studio resolve forward references to C++ lambda
routines used by captured variables.
Differential Revision: https://reviews.llvm.org/D45438
llvm-svn: 332975
|
|
|
|
|
|
| |
This reverts commit r332885 as it broke several greendragon buildbots.
llvm-svn: 332973
|
|
|
|
|
|
| |
This reverts commit r332906 as a dependency to revert r332885.
llvm-svn: 332972
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
`is` type annotations can occur at any nesting level. For example:
function x() {
return function y(): a is B { ... };
}
Breaking before the `is` above breaks TypeScript parsing the code. This
change prevents the wrap.
Reviewers: krasimir
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D47193
llvm-svn: 332968
|
|
|
|
|
|
| |
Suggested by Gabor Buella.
llvm-svn: 332966
|
|
|
|
|
|
|
|
| |
equivalent.
Patch by Hans Wennborg!
llvm-svn: 332964
|
|
|
|
| |
llvm-svn: 332963
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Found by oss-fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8212
Reviewers: bkramer
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D47191
llvm-svn: 332961
|
|
|
|
|
|
|
| |
Reverted due to buildbot failures.
Seems like isnumber() is some Apple addition to cctype.
llvm-svn: 332957
|
|
|
|
|
|
|
| |
This appears to leak in already on libc++ platforms, but is breaking on
some other targets.
llvm-svn: 332955
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This includes initial support for the (hopefully final) updated Objective-C ABI, developed here:
https://github.com/davidchisnall/clang-gnustep-abi-2
It also includes some cleanups and refactoring from older GNU ABIs.
The current version is ELF only, other formats to follow.
Reviewers: rjmccall, DHowett-MSFT
Reviewed By: rjmccall
Subscribers: smeenai, cfe-commits
Differential Revision: https://reviews.llvm.org/D46052
llvm-svn: 332950
|
|
|
|
|
|
| |
without including wmmintrin.h
llvm-svn: 332929
|
|
|
|
| |
llvm-svn: 332906
|
|
|
|
|
|
|
|
|
|
|
|
| |
instruction instead.
Because the intrinsics in the headers are implemented as macros, we can't just use a select builtin and pternlog builtin. This would require one of the macro arguments to be used twice. Depending on what was passed to the macro we could expand an expression twice leading to weird behavior. We could maybe declare our local variable in the macro, but that would need to worry about name collisions.
To avoid that just generate IR directly in CGBuiltin.cpp.
Differential Revision: https://reviews.llvm.org/D47125
llvm-svn: 332891
|
|
|
|
|
|
| |
initialization.
llvm-svn: 332886
|
|
|
|
|
|
|
|
| |
Fixes PR37466.
Differential Revision: https://reviews.llvm.org/D47093
llvm-svn: 332885
|
|
|
|
|
|
|
|
|
|
|
|
| |
packed float conversion intrinsics.
I believe this is safe assuming default default FP environment. The conversion might be inexact, but it can never overflow the FP type so this shouldn't be undefined behavior for the uitofp/sitofp instructions.
We already do something similar for scalar conversions.
Differential Revision: https://reviews.llvm.org/D46863
llvm-svn: 332882
|
|
|
|
|
|
|
|
|
|
| |
up to dwo output.
Part of PR37466.
Differential Revision: https://reviews.llvm.org/D47089
llvm-svn: 332881
|
|
|
|
| |
llvm-svn: 332879
|
|
|
|
|
|
|
|
| |
if `-fopenmp-simd` is specified alone, `_OPENMP` macro should not be
defined. If `-fopenmp-simd` is specified along with the `-fopenmp`,
`_OPENMP` macro should be defined with the value `201511`.
llvm-svn: 332852
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. added restrictions to memory scope, order and volatile parameters
2. added custom processing for these builtins - currently is not used code,
needed to switch off GCCBuiltin link to the builtins (ongoing change to llvm
tree)
3. builtins renamed as requested
Differential Revision: https://reviews.llvm.org/D43281
llvm-svn: 332848
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a variable has an initializer, codegen tries to build its value. If
the variable is large in size, building its value requires substantial
resources. It causes strange behavior from user viewpoint: compilation
of huge zero initialized arrays like:
char data_1[2147483648u] = { 0 };
consumes enormous amount of time and memory.
With this change codegen tries to determine if variable initializer is
equivalent to zero initializer. In this case variable value is not
constructed.
This change fixes PR18978.
Differential Revision: https://reviews.llvm.org/D46241
llvm-svn: 332847
|
|
|
|
|
|
|
|
|
|
| |
Handle attributes before checking the record layout (e.g. underalignment check
during `alignas` processing), as layout may be cached without taking into
account attributes that may affect it.
Differential Revision: https://reviews.llvm.org/D46439
llvm-svn: 332843
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first version of the patch (r332228) was flawed because it was
putting structors into C5/D5 comdats very eagerly. This is correct only
if we can ensure the comdat contains all required versions of the
structor (which wasn't the case). This version uses a more nuanced
approach:
- for local structor symbols we use an alias because we don't have to
worry about comdats or other compilation units.
- linkonce symbols are emitted separately, as we cannot guarantee we
will have all symbols we need to form a comdat (they are emitted
lazily, only when referenced).
- available_externally symbols are also emitted separately, as the code
seemed to be worried about emitting an alias in this case.
- other linkage types are not affected by the optimization level. They
either get put into a comdat (weak) or get aliased (external).
Reviewers: rjmccall, aprantl
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D46685
llvm-svn: 332839
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
These look to be a couple things that weren't removed when we switched to target attribute.
The popcnt makes including just smmintrin.h also include popcntintrin.h. The popcnt file itself already contains target attrributes.
The prefetch ones are just wrappers around __builtin_prefetch which we have graceful fallbacks for in the backend if the exact instruction isn't available. So there's no reason to hide them. And it makes them available in functions that have the write target attribute but not a -march command line flag.
Reviewers: echristo, RKSimon, spatel, DavidKreitzer
Reviewed By: echristo
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D47029
llvm-svn: 332830
|
|
|
|
|
|
| |
These were upgraded to native shufflevectors months ago.
llvm-svn: 332829
|
|
|
|
|
|
|
|
| |
in IR instead.
Someday maybe we'll use selects for all the builtins.
llvm-svn: 332825
|
|
|
|
| |
llvm-svn: 332822
|
|
|
|
|
|
|
|
|
| |
Ensure that the type being used has an associated interface when
declaring the parameter for `@catch`.
Resolves PR37384!
llvm-svn: 332821
|
|
|
|
|
|
|
|
|
| |
This is useful to understand and debug the lazy template specializations
used in the pch and modules.
Differential Revision: https://reviews.llvm.org/D41785
llvm-svn: 332817
|
|
|
|
|
|
|
|
|
|
| |
When a lambda capture captures a __block in the same statement, the compiler asserts out because isCapturedBy assumes that an Expr can only be a BlockExpr, StmtExpr, or if it's a Stmt then all the statement's children are expressions. That's wrong, we need to visit all sub-statements even if they're not expressions to see if they also capture.
Fix this issue by pulling out the isCapturedBy logic to use RecursiveASTVisitor.
<rdar://problem/39926584>
llvm-svn: 332801
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NFC for targets other than PS4.
This patch is a change in behavior for PS4, in that PS4 will no longer enable
RTTI when -fexceptions is specified (RTTI and Exceptions are disabled by default
on PS4). RTTI will remain disabled except for types being thrown or caught.
Also, '-fexceptions -fno-rtti' (previously prohibited on PS4) is now accepted,
as it is for other targets.
This patch removes some PS4 specific code, making the code cleaner.
Also, in the test file rtti-options.cpp, PS4 tests where the behavior is the
same as the generic x86_64-linux are removed, making the test cleaner.
Differential Revision: https://reviews.llvm.org/D46982
llvm-svn: 332784
|
|
|
|
|
|
|
|
|
|
|
|
| |
when the target is the PS4.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D47084
llvm-svn: 332773
|