| #
44fad947 |
| 26-Feb-2019 |
Pierre Gousseau <[email protected]> |
[Driver] Allow enum SanitizerOrdinal to represent more than 64 different sanitizer checks, NFC.
enum SanitizerOrdinal has reached maximum capacity, this change extends the capacity to 128 sanitizer
[Driver] Allow enum SanitizerOrdinal to represent more than 64 different sanitizer checks, NFC.
enum SanitizerOrdinal has reached maximum capacity, this change extends the capacity to 128 sanitizer checks. This can eventually allow us to add gcc 8's options "-fsanitize=pointer-substract" and "-fsanitize=pointer-compare".
Fixes: https://llvm.org/PR39425
Differential Revision: https://reviews.llvm.org/D57914
llvm-svn: 354873
show more ...
|
| #
751fe286 |
| 09-Feb-2019 |
James Y Knight <[email protected]> |
[opaque pointer types] Cleanup CGBuilder's Create*GEP.
The various EltSize, Offset, DataLayout, and StructLayout arguments are all computable from the Address's element type and the DataLayout which
[opaque pointer types] Cleanup CGBuilder's Create*GEP.
The various EltSize, Offset, DataLayout, and StructLayout arguments are all computable from the Address's element type and the DataLayout which the CGBuilder already has access to.
After having previously asserted that the computed values are the same as those passed in, now remove the redundant arguments from CGBuilder's Create*GEP functions.
Differential Revision: https://reviews.llvm.org/D57767
llvm-svn: 353629
show more ...
|
|
Revision tags: llvmorg-7.1.0, llvmorg-7.1.0-rc1 |
|
| #
f5f1b0e5 |
| 08-Feb-2019 |
James Y Knight <[email protected]> |
[opaque pointer types] Cleanup CGBuilder's Create*GEP.
Some of these functions take some extraneous arguments, e.g. EltSize, Offset, which are computable from the Type and DataLayout.
Add some asse
[opaque pointer types] Cleanup CGBuilder's Create*GEP.
Some of these functions take some extraneous arguments, e.g. EltSize, Offset, which are computable from the Type and DataLayout.
Add some asserts to ensure that the computed values are consistent with the passed-in values, in preparation for eliminating the extraneous arguments. This also asserts that the Type is an Array for the calls named "Array" and a Struct for the calls named "Struct".
Then, correct a couple of errors:
1. Using CreateStructGEP on an array type. (this causes the majority of the test differences, as struct GEPs are created with i32 indices, while array GEPs are created with i64 indices)
2. Passing the wrong Offset to CreateStructGEP in TargetInfo.cpp on x86-64 NACL (which uses 32-bit pointers).
Differential Revision: https://reviews.llvm.org/D57766
llvm-svn: 353529
show more ...
|
|
Revision tags: llvmorg-8.0.0-rc2 |
|
| #
f7321540 |
| 07-Feb-2019 |
James Y Knight <[email protected]> |
[opaque pointer types] Pass through function types for TLS initialization and global destructor calls.
Differential Revision: https://reviews.llvm.org/D57801
llvm-svn: 353355
|
| #
9871db06 |
| 05-Feb-2019 |
James Y Knight <[email protected]> |
[opaque pointer types] Pass function types for runtime function calls.
Emit{Nounwind,}RuntimeCall{,OrInvoke} have been modified to take a FunctionCallee as an argument, and CreateRuntimeFunction has
[opaque pointer types] Pass function types for runtime function calls.
Emit{Nounwind,}RuntimeCall{,OrInvoke} have been modified to take a FunctionCallee as an argument, and CreateRuntimeFunction has been modified to return a FunctionCallee. All callers have been updated.
Additionally, CreateBuiltinFunction is removed, as it was redundant with CreateRuntimeFunction after some previous changes.
Differential Revision: https://reviews.llvm.org/D57668
llvm-svn: 353184
show more ...
|
| #
8799caee |
| 03-Feb-2019 |
James Y Knight <[email protected]> |
[opaque pointer types] Trivial changes towards CallInst requiring explicit function types.
llvm-svn: 353009
|
| #
13680223 |
| 01-Feb-2019 |
James Y Knight <[email protected]> |
[opaque pointer types] Add a FunctionCallee wrapper type, and use it.
Recommit r352791 after tweaking DerivedTypes.h slightly, so that gcc doesn't choke on it, hopefully.
Original Message: The Func
[opaque pointer types] Add a FunctionCallee wrapper type, and use it.
Recommit r352791 after tweaking DerivedTypes.h slightly, so that gcc doesn't choke on it, hopefully.
Original Message: The FunctionCallee type is effectively a {FunctionType*,Value*} pair, and is a useful convenience to enable code to continue passing the result of getOrInsertFunction() through to EmitCall, even once pointer types lose their pointee-type.
Then: - update the CallInst/InvokeInst instruction creation functions to take a Callee, - modify getOrInsertFunction to return FunctionCallee, and - update all callers appropriately.
One area of particular note is the change to the sanitizer code. Previously, they had been casting the result of `getOrInsertFunction` to a `Function*` via `checkSanitizerInterfaceFunction`, and storing that. That would report an error if someone had already inserted a function declaraction with a mismatching signature.
However, in general, LLVM allows for such mismatches, as `getOrInsertFunction` will automatically insert a bitcast if needed. As part of this cleanup, cause the sanitizer code to do the same. (It will call its functions using the expected signature, however they may have been declared.)
Finally, in a small number of locations, callers of `getOrInsertFunction` actually were expecting/requiring that a brand new function was being created. In such cases, I've switched them to Function::Create instead.
Differential Revision: https://reviews.llvm.org/D57315
llvm-svn: 352827
show more ...
|
| #
fadf2506 |
| 31-Jan-2019 |
James Y Knight <[email protected]> |
Revert "[opaque pointer types] Add a FunctionCallee wrapper type, and use it."
This reverts commit f47d6b38c7a61d50db4566b02719de05492dcef1 (r352791).
Seems to run into compilation failures with GC
Revert "[opaque pointer types] Add a FunctionCallee wrapper type, and use it."
This reverts commit f47d6b38c7a61d50db4566b02719de05492dcef1 (r352791).
Seems to run into compilation failures with GCC (but not clang, where I tested it). Reverting while I investigate.
llvm-svn: 352800
show more ...
|
| #
f47d6b38 |
| 31-Jan-2019 |
James Y Knight <[email protected]> |
[opaque pointer types] Add a FunctionCallee wrapper type, and use it.
The FunctionCallee type is effectively a {FunctionType*,Value*} pair, and is a useful convenience to enable code to continue pas
[opaque pointer types] Add a FunctionCallee wrapper type, and use it.
The FunctionCallee type is effectively a {FunctionType*,Value*} pair, and is a useful convenience to enable code to continue passing the result of getOrInsertFunction() through to EmitCall, even once pointer types lose their pointee-type.
Then: - update the CallInst/InvokeInst instruction creation functions to take a Callee, - modify getOrInsertFunction to return FunctionCallee, and - update all callers appropriately.
One area of particular note is the change to the sanitizer code. Previously, they had been casting the result of `getOrInsertFunction` to a `Function*` via `checkSanitizerInterfaceFunction`, and storing that. That would report an error if someone had already inserted a function declaraction with a mismatching signature.
However, in general, LLVM allows for such mismatches, as `getOrInsertFunction` will automatically insert a bitcast if needed. As part of this cleanup, cause the sanitizer code to do the same. (It will call its functions using the expected signature, however they may have been declared.)
Finally, in a small number of locations, callers of `getOrInsertFunction` actually were expecting/requiring that a brand new function was being created. In such cases, I've switched them to Function::Create instead.
Differential Revision: https://reviews.llvm.org/D57315
llvm-svn: 352791
show more ...
|
| #
600e9dea |
| 30-Jan-2019 |
Erik Pilkington <[email protected]> |
Add a 'dynamic' parameter to the objectsize intrinsic
This is meant to be used with clang's __builtin_dynamic_object_size. When 'true' is passed to this parameter, the intrinsic has the potential to
Add a 'dynamic' parameter to the objectsize intrinsic
This is meant to be used with clang's __builtin_dynamic_object_size. When 'true' is passed to this parameter, the intrinsic has the potential to be folded into instructions that will be evaluated at run time. When 'false', the objectsize intrinsic behaviour is unchanged.
rdar://32212419
Differential revision: https://reviews.llvm.org/D56761
llvm-svn: 352664
show more ...
|
|
Revision tags: llvmorg-8.0.0-rc1 |
|
| #
cfa79b27 |
| 23-Jan-2019 |
Richard Smith <[email protected]> |
[ubsan] Check the correct size when sanitizing array new.
We previously forgot to multiply the element size by the array bound.
llvm-svn: 351924
|
| #
2946cd70 |
| 19-Jan-2019 |
Chandler Carruth <[email protected]> |
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the ne
Update the file headers across all of the LLVM projects in the monorepo to reflect the new license.
We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach.
Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository.
llvm-svn: 351636
show more ...
|
| #
0444006f |
| 17-Jan-2019 |
Richard Smith <[email protected]> |
Fix cleanup registration for lambda captures.
Lambda captures should be destroyed if an exception is thrown only if the construction of the complete lambda-expression has not completed. (If the lamb
Fix cleanup registration for lambda captures.
Lambda captures should be destroyed if an exception is thrown only if the construction of the complete lambda-expression has not completed. (If the lambda-expression has been fully constructed, any exception will invoke its destructor, which will destroy the captures.)
This is directly modeled after how we handle the equivalent situation in InitListExprs.
Note that EmitLambdaLValue was unreachable because in C++11 onwards the frontend never creates the awkward situation where a prvalue expression (such as a lambda) is used in an lvalue context (such as the left-hand side of a class member access).
llvm-svn: 351487
show more ...
|
| #
1e36882b |
| 04-Jan-2019 |
Erik Pilkington <[email protected]> |
[ObjCARC] Add an new attribute, objc_externally_retained
This attribute, called "objc_externally_retained", exposes clang's notion of pseudo-__strong variables in ARC. Pseudo-strong variables "borro
[ObjCARC] Add an new attribute, objc_externally_retained
This attribute, called "objc_externally_retained", exposes clang's notion of pseudo-__strong variables in ARC. Pseudo-strong variables "borrow" their initializer, meaning that they don't retain/release it, instead assuming that someone else is keeping their value alive.
If a function is annotated with this attribute, implicitly strong parameters of that function aren't implicitly retained/released in the function body, and are implicitly const. This is useful to expose for performance reasons, most functions don't need the extra safety of the retain/release, so programmers can opt out as needed.
This attribute can also apply to declarations of local variables, with similar effect.
Differential revision: https://reviews.llvm.org/D55865
llvm-svn: 350422
show more ...
|
| #
9d2872db |
| 13-Dec-2018 |
Mikael Nilsson <[email protected]> |
[OpenCL] Add generic AS to 'this' pointer
Address spaces are cast into generic before invoking the constructor.
Added support for a trailing Qualifiers object in FunctionProtoType.
Note: This reco
[OpenCL] Add generic AS to 'this' pointer
Address spaces are cast into generic before invoking the constructor.
Added support for a trailing Qualifiers object in FunctionProtoType.
Note: This recommits the previously reverted patch, but now it is commited together with a fix for lldb.
Differential Revision: https://reviews.llvm.org/D54862
llvm-svn: 349019
show more ...
|
| #
90646732 |
| 12-Dec-2018 |
Mikael Nilsson <[email protected]> |
Revert "[OpenCL] Add generic AS to 'this' pointer"
Reverting because the patch broke lldb.
llvm-svn: 348931
|
| #
78de8471 |
| 12-Dec-2018 |
Mikael Nilsson <[email protected]> |
[OpenCL] Add generic AS to 'this' pointer
Address spaces are cast into generic before invoking the constructor.
Added support for a trailing Qualifiers object in FunctionProtoType.
Differential Re
[OpenCL] Add generic AS to 'this' pointer
Address spaces are cast into generic before invoking the constructor.
Added support for a trailing Qualifiers object in FunctionProtoType.
Differential Revision: https://reviews.llvm.org/D54862
llvm-svn: 348927
show more ...
|
| #
87a7e436 |
| 12-Dec-2018 |
Andrew Savonichev <[email protected]> |
[OpenCL] Fix for TBAA information of pointer after addresspacecast
Summary: When addresspacecast is generated resulting pointer should preserve TBAA information from original value.
Reviewers: rjmc
[OpenCL] Fix for TBAA information of pointer after addresspacecast
Summary: When addresspacecast is generated resulting pointer should preserve TBAA information from original value.
Reviewers: rjmccall, yaxunl, Anastasia
Reviewed By: rjmccall
Subscribers: asavonic, kosarev, cfe-commits, llvm-commits
Differential Revision: https://reviews.llvm.org/D55262
llvm-svn: 348919
show more ...
|
| #
6368818f |
| 11-Dec-2018 |
Richard Trieu <[email protected]> |
Move CodeGenOptions from Frontend to Basic
Basic uses CodeGenOptions and should not depend on Frontend.
llvm-svn: 348827
|
|
Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3 |
|
| #
c9f2473b |
| 28-Nov-2018 |
Adrian Prantl <[email protected]> |
Ensure sanitizer check function calls have a !dbg location
Function calls without a !dbg location inside a function that has a DISubprogram make it impossible to construct inline information and are
Ensure sanitizer check function calls have a !dbg location
Function calls without a !dbg location inside a function that has a DISubprogram make it impossible to construct inline information and are rejected by the verifier. This patch ensures that sanitizer check function calls have a !dbg location, by carrying forward the location of the preceding instruction or by inserting an artificial location if necessary.
This fixes a crash when compiling the attached testcase with -Os.
rdar://problem/45311226
Differential Revision: https://reviews.llvm.org/D53459
Note: This reapllies r344915, modified to reuse the IRBuilder's DebugLoc if one exists instead of picking the one from CGDebugInfo since the latter may get reset when emitting thunks such as block helpers in the middle of emitting another function.
llvm-svn: 347810
show more ...
|
| #
04307941 |
| 16-Nov-2018 |
Anastasia Stulova <[email protected]> |
[OpenCL] Enable address spaces for references in C++
Added references to the addr spaces deduction and enabled CL2.0 features (program scope variables and storage class qualifiers) to work in C++ mo
[OpenCL] Enable address spaces for references in C++
Added references to the addr spaces deduction and enabled CL2.0 features (program scope variables and storage class qualifiers) to work in C++ mode too.
Fixed several address space conversion issues in CodeGen for references.
Differential Revision: https://reviews.llvm.org/D53764
llvm-svn: 347059
show more ...
|
| #
de6480a3 |
| 13-Nov-2018 |
Erich Keane <[email protected]> |
[NFC] Move storage of dispatch-version to GlobalDecl
As suggested by Richard Smith, and initially put up for review here: https://reviews.llvm.org/D53341, this patch removes a hack that was used to
[NFC] Move storage of dispatch-version to GlobalDecl
As suggested by Richard Smith, and initially put up for review here: https://reviews.llvm.org/D53341, this patch removes a hack that was used to ensure that proper target-feature lists were used when emitting cpu-dispatch (and eventually, target-clones) implementations. As a part of this, the GlobalDecl object is proliferated to a bunch more locations.
Originally, this was put up for review (see above) to get acceptance on the approach, though discussion with Richard in San Diego showed he approved of the approach taken here. Thus, I believe this is acceptable for Review-After-commit
Differential Revision: https://reviews.llvm.org/D53341
Change-Id: I0a0bd673340d334d93feac789d653e03d9f6b1d5 llvm-svn: 346757
show more ...
|
| #
8003edc9 |
| 09-Nov-2018 |
Bill Wendling <[email protected]> |
Compound literals, enums, et al require const expr
Summary: Compound literals, enums, file-scoped arrays, etc. require their initializers and size specifiers to be constant. Wrap the initializer ex
Compound literals, enums, et al require const expr
Summary: Compound literals, enums, file-scoped arrays, etc. require their initializers and size specifiers to be constant. Wrap the initializer expressions in a ConstantExpr so that we can easily check for this later on.
Reviewers: rsmith, shafik
Reviewed By: rsmith
Subscribers: cfe-commits, jyknight, nickdesaulniers
Differential Revision: https://reviews.llvm.org/D53921
llvm-svn: 346455
show more ...
|
|
Revision tags: llvmorg-7.0.1-rc2, llvmorg-7.0.1-rc1 |
|
| #
ef1899b0 |
| 01-Nov-2018 |
Volodymyr Sapsai <[email protected]> |
[CodeGen] Move `emitConstant` from ScalarExprEmitter to CodeGenFunction. NFC.
The goal is to use `emitConstant` in more places. Didn't move `ComplexExprEmitter::emitConstant` because it returns a di
[CodeGen] Move `emitConstant` from ScalarExprEmitter to CodeGenFunction. NFC.
The goal is to use `emitConstant` in more places. Didn't move `ComplexExprEmitter::emitConstant` because it returns a different type.
Reviewers: rjmccall, ahatanak
Reviewed By: rjmccall
Subscribers: dexonsmith, erik.pilkington, cfe-commits
Differential Revision: https://reviews.llvm.org/D53725
llvm-svn: 345897
show more ...
|
| #
fa98390b |
| 30-Oct-2018 |
Erik Pilkington <[email protected]> |
NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)
We haven't supported compiling ObjC1 for a long time (and never will again), so there isn't any reason to keep these separat
NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)
We haven't supported compiling ObjC1 for a long time (and never will again), so there isn't any reason to keep these separate. This patch replaces LangOpts::ObjC1 and LangOpts::ObjC2 with LangOpts::ObjC.
Differential revision: https://reviews.llvm.org/D53547
llvm-svn: 345637
show more ...
|