#
fbfd97ed |
| 12-Nov-2015 |
Eric Christopher <echristo@gmail.com> |
Move checkTargetFeatures to CodeGenFunction.cpp to make it more obvious that it's generic.
llvm-svn: 252833
|
#
9f5260ab |
| 06-Nov-2015 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
CodeGen: Remove implicit ilist iterator conversions, NFC
Make ilist iterator conversions explicit in clangCodeGen. Eventually I'll remove them everywhere.
llvm-svn: 252358
|
#
637d1e66 |
| 20-Oct-2015 |
Angel Garcia Gomez <angelgarcia@google.com> |
Roll-back r250822.
Summary: It breaks the build for the ASTMatchers
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D13893
llvm-svn: 250827
|
#
b5250d34 |
| 20-Oct-2015 |
Angel Garcia Gomez <angelgarcia@google.com> |
Apply modernize-use-default to clang.
Summary: Replace empty bodies of default constructors and destructors with '= default'.
Reviewers: bkramer, klimek
Subscribers: klimek, alexfh, cfe-commits
D
Apply modernize-use-default to clang.
Summary: Replace empty bodies of default constructors and destructors with '= default'.
Reviewers: bkramer, klimek
Subscribers: klimek, alexfh, cfe-commits
Differential Revision: http://reviews.llvm.org/D13890
llvm-svn: 250822
show more ...
|
#
c7d5c94f |
| 17-Sep-2015 |
Charles Davis <cdavis5x@gmail.com> |
Support __builtin_ms_va_list.
Summary: This change adds support for `__builtin_ms_va_list`, a GCC extension for variadic `ms_abi` functions. The existing `__builtin_va_list` support is inadequate fo
Support __builtin_ms_va_list.
Summary: This change adds support for `__builtin_ms_va_list`, a GCC extension for variadic `ms_abi` functions. The existing `__builtin_va_list` support is inadequate for this because `va_list` is defined differently in the Win64 ABI vs. the System V/AMD64 ABI.
Depends on D1622.
Reviewers: rsmith, rnk, rjmccall
CC: cfe-commits
Differential Revision: http://reviews.llvm.org/D1623
llvm-svn: 247941
show more ...
|
#
9df56372 |
| 10-Sep-2015 |
David Majnemer <david.majnemer@gmail.com> |
[MS ABI] Make member pointers return true for isIncompleteType
The type of a member pointer is incomplete if it has no inheritance model. This lets us reuse more general logic already embedded in c
[MS ABI] Make member pointers return true for isIncompleteType
The type of a member pointer is incomplete if it has no inheritance model. This lets us reuse more general logic already embedded in clang.
llvm-svn: 247346
show more ...
|
#
7f416cc4 |
| 08-Sep-2015 |
John McCall <rjmccall@apple.com> |
Compute and preserve alignment more faithfully in IR-generation.
Introduce an Address type to bundle a pointer value with an alignment. Introduce APIs on CGBuilderTy to work with Address values. C
Compute and preserve alignment more faithfully in IR-generation.
Introduce an Address type to bundle a pointer value with an alignment. Introduce APIs on CGBuilderTy to work with Address values. Change core APIs on CGF/CGM to traffic in Address where appropriate. Require alignments to be non-zero. Update a ton of code to compute and propagate alignment information.
As part of this, I've promoted CGBuiltin's EmitPointerWithAlignment helper function to CGF and made use of it in a number of places in the expression emitter.
The end result is that we should now be significantly more correct when performing operations on objects that are locally known to be under-aligned. Since alignment is not reliably tracked in the type system, there are inherent limits to this, but at least we are no longer confused by standard operations like derived-to-base conversions and array-to-pointer decay. I've also fixed a large number of bugs where we were applying the complete-object alignment to a pointer instead of the non-virtual alignment, although most of these were hidden by the very conservative approach we took with member alignment.
Also, because IRGen now reliably asserts on zero alignments, we should no longer be subject to an absurd but frustrating recurring bug where an incomplete type would report a zero alignment and then we'd naively do a alignmentAtOffset on it and emit code using an alignment equal to the largest power-of-two factor of the offset.
We should also now be emitting much more aggressive alignment attributes in the presence of over-alignment. In particular, field access now uses alignmentAtOffset instead of min.
Several times in this patch, I had to change the existing code-generation pattern in order to more effectively use the Address APIs. For the most part, this seems to be a strict improvement, like doing pointer arithmetic with GEPs instead of ptrtoint. That said, I've tried very hard to not change semantics, but it is likely that I've failed in a few places, for which I apologize.
ABIArgInfo now always carries the assumed alignment of indirect and indirect byval arguments. In order to cut down on what was already a dauntingly large patch, I changed the code to never set align attributes in the IR on non-byval indirect arguments. That is, we still generate code which assumes that indirect arguments have the given alignment, but we don't express this information to the backend except where it's semantically required (i.e. on byvals). This is likely a minor regression for those targets that did provide this information, but it'll be trivial to add it back in a later patch.
I partially punted on applying this work to CGBuiltin. Please do not add more uses of the CreateDefaultAligned{Load,Store} APIs; they will be going away eventually.
llvm-svn: 246985
show more ...
|
#
a24296b4 |
| 02-Sep-2015 |
Sanjay Patel <spatel@rotateright.com> |
add __builtin_unpredictable and convert to metadata
This patch depends on r246688 (D12341).
The goal is to make LLVM generate different code for these functions for a target that has cheap branches
add __builtin_unpredictable and convert to metadata
This patch depends on r246688 (D12341).
The goal is to make LLVM generate different code for these functions for a target that has cheap branches (see PR23827 for more details):
int foo();
int normal(int x, int y, int z) { if (x != 0 && y != 0) return foo(); return 1; }
int crazy(int x, int y) { if (__builtin_unpredictable(x != 0 && y != 0)) return foo(); return 1; }
Differential Revision: http://reviews.llvm.org/D12458
llvm-svn: 246699
show more ...
|
Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4, llvmorg-3.7.0-rc3, studio-1.4 |
|
#
dbf1045a |
| 31-Jul-2015 |
David Majnemer <david.majnemer@gmail.com> |
[MS ABI] Hook clang up to the new EH instructions
The new EH instructions make it possible for LLVM to generate .xdata tables that the MSVC personality routines will be happy about. Because this is
[MS ABI] Hook clang up to the new EH instructions
The new EH instructions make it possible for LLVM to generate .xdata tables that the MSVC personality routines will be happy about. Because this is experimental, hide it behind a -cc1 flag (-fnew-ms-eh).
Differential Revision: http://reviews.llvm.org/D11405
llvm-svn: 243767
show more ...
|
Revision tags: llvmorg-3.7.0-rc2, llvmorg-3.7.0-rc1 |
|
#
98cb8ba6 |
| 07-Jul-2015 |
Reid Kleckner <reid@kleckner.net> |
Update clang for intrinsic rename of framerecover to localrecover
llvm-svn: 241634
|
#
9fe7f239 |
| 07-Jul-2015 |
Reid Kleckner <reid@kleckner.net> |
Revert "Revert 241171, 241187, 241199 (32-bit SEH)."
This reverts commit r241244, but restricts SEH support to Win64.
This way, Chromium builds will still fall back on TUs with SEH, and Clang devel
Revert "Revert 241171, 241187, 241199 (32-bit SEH)."
This reverts commit r241244, but restricts SEH support to Win64.
This way, Chromium builds will still fall back on TUs with SEH, and Clang developers can work on this incrementally upstream while patching this small predicate locally. It'll also make it easier to review small fixes.
llvm-svn: 241533
show more ...
|
#
85365cd7 |
| 02-Jul-2015 |
Akira Hatanaka <ahatanaka@apple.com> |
Attach attribute "trap-func-name" to call sites of llvm.trap and llvm.debugtrap.
This is needed to use clang's command line option "-ftrap-function" for LTO and enable changing the trap function nam
Attach attribute "trap-func-name" to call sites of llvm.trap and llvm.debugtrap.
This is needed to use clang's command line option "-ftrap-function" for LTO and enable changing the trap function name on a per-call-site basis.
rdar://problem/21225723
Differential Revision: http://reviews.llvm.org/D10831
llvm-svn: 241306
show more ...
|
#
642f173a |
| 02-Jul-2015 |
Benjamin Kramer <benny.kra@googlemail.com> |
Switch users of the 'for (StmtRange range = stmt->children(); range; ++range)‘ pattern to range for loops.
The pattern was born out of the lack of range-based for loops in C++98 and is somewhat obsc
Switch users of the 'for (StmtRange range = stmt->children(); range; ++range)‘ pattern to range for loops.
The pattern was born out of the lack of range-based for loops in C++98 and is somewhat obscure. No functionality change intended.
llvm-svn: 241300
show more ...
|
#
e4f974c6 |
| 02-Jul-2015 |
Nico Weber <nicolasweber@gmx.de> |
Revert 241171, 241187, 241199 (32-bit SEH).
It still doesn't produce quite the right code, test binaries built with this enabled fail some tests.
llvm-svn: 241244
|
#
d0d9a1f6 |
| 01-Jul-2015 |
Reid Kleckner <reid@kleckner.net> |
[SEH] Add 32-bit lowering for SEH __try
This re-lands r236052 and adds support for __exception_code().
In 32-bit SEH, the exception code is not available in eax. It is only available in the filter
[SEH] Add 32-bit lowering for SEH __try
This re-lands r236052 and adds support for __exception_code().
In 32-bit SEH, the exception code is not available in eax. It is only available in the filter function, and now we arrange to load it and store it into an escaped variable in the parent frame.
As a consequence, we have to disable the "catch i8* null" optimization on 32-bit and always generate a filter function. We can re-enable the optimization if we detect an __except block that doesn't use the exception code, but this probably isn't worth optimizing.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D10852
llvm-svn: 241171
show more ...
|
Revision tags: llvmorg-3.6.2, llvmorg-3.6.2-rc1 |
|
#
b9b73ef9 |
| 19-Jun-2015 |
Alexander Potapenko <glider@google.com> |
[ASan] Initial support for Kernel AddressSanitizer
This patch adds initial support for the -fsanitize=kernel-address flag to Clang. Right now it's quite restricted: only out-of-line instrumentation
[ASan] Initial support for Kernel AddressSanitizer
This patch adds initial support for the -fsanitize=kernel-address flag to Clang. Right now it's quite restricted: only out-of-line instrumentation is supported, globals are not instrumented, some GCC kasan flags are not supported. Using this patch I am able to build and boot the KASan tree with LLVMLinux patches from github.com/ramosian-glider/kasan/tree/kasan_llvmlinux. To disable KASan instrumentation for a certain function attribute((no_sanitize("kernel-address"))) can be used.
llvm-svn: 240131
show more ...
|
#
c4122c17 |
| 15-Jun-2015 |
Peter Collingbourne <peter@pcc.me.uk> |
Protection against stack-based memory corruption errors using SafeStack: Clang command line option and function attribute
This patch adds the -fsanitize=safe-stack command line argument for clang, w
Protection against stack-based memory corruption errors using SafeStack: Clang command line option and function attribute
This patch adds the -fsanitize=safe-stack command line argument for clang, which enables the Safe Stack protection (see http://reviews.llvm.org/D6094 for the detailed description of the Safe Stack).
This patch is our implementation of the safe stack on top of Clang. The patches make the following changes:
- Add -fsanitize=safe-stack and -fno-sanitize=safe-stack options to clang to control safe stack usage (the safe stack is disabled by default).
- Add __attribute__((no_sanitize("safe-stack"))) attribute to clang that can be used to disable the safe stack for individual functions even when enabled globally.
Original patch by Volodymyr Kuznetsov and others at the Dependable Systems Lab at EPFL; updates and upstreaming by myself.
Differential Revision: http://reviews.llvm.org/D6095
llvm-svn: 239762
show more ...
|
#
0b9bbbfc |
| 09-Jun-2015 |
Reid Kleckner <reid@kleckner.net> |
Revert "Re-land r236052, "[SEH] Add 32-bit lowering code for __try""
This reverts commit r239415. This was committed accidentally, LLVM isn't ready for this.
llvm-svn: 239417
|
#
65870442 |
| 09-Jun-2015 |
Reid Kleckner <reid@kleckner.net> |
Re-land r236052, "[SEH] Add 32-bit lowering code for __try"
This reverts r236167.
LLVM should be ready for this now.
llvm-svn: 239415
|
#
43f9bb73 |
| 18-May-2015 |
David Blaikie <dblaikie@gmail.com> |
API update for streamlining of IRBuilder::CreateCall to just use ArrayRef/initializer_list+braced init
llvm-svn: 237625
|
#
915df996 |
| 15-May-2015 |
Peter Collingbourne <peter@pcc.me.uk> |
Implement no_sanitize attribute.
Differential Revision: http://reviews.llvm.org/D9631
llvm-svn: 237463
|
Revision tags: llvmorg-3.6.1, llvmorg-3.6.1-rc1 |
|
#
52cc487b |
| 07-May-2015 |
Artem Belevich <tra@google.com> |
[cuda] Include GPU binary into host object file and generate init/deinit code.
- added -fcuda-include-gpubinary option to incorporate results of device-side compilation into host-side one. - gener
[cuda] Include GPU binary into host object file and generate init/deinit code.
- added -fcuda-include-gpubinary option to incorporate results of device-side compilation into host-side one. - generate code to register GPU binaries and associated kernels with CUDA runtime and clean-up on exit. - added test case for init/deinit code generation.
Differential Revision: http://reviews.llvm.org/D9507
llvm-svn: 236765
show more ...
|
#
65512647 |
| 02-May-2015 |
Justin Bogner <mail@justinbogner.com> |
InstrProf: Cede ownership of createProfileWeights to CGF
The fact that PGO has a say in how these branch weights are determined isn't interesting to most of CodeGen, so it makes more sense for this
InstrProf: Cede ownership of createProfileWeights to CGF
The fact that PGO has a say in how these branch weights are determined isn't interesting to most of CodeGen, so it makes more sense for this API to be accessible via CodeGenFunction rather than CodeGenPGO.
llvm-svn: 236380
show more ...
|
#
cb7a0a05 |
| 30-Apr-2015 |
Reid Kleckner <reid@kleckner.net> |
Revert most of r236271, leaving only the datalayout change in lib/Basic/Targets.cpp
llvm-svn: 236274
|
#
af67602e |
| 30-Apr-2015 |
Reid Kleckner <reid@kleckner.net> |
Use 4 byte preferred aggregate alignment in datalayout on x86 Win32
llvm-svn: 236271
|