- Mar 19, 2019
-
-
Markus Lavin authored
Introduce a DW_OP_LLVM_convert Dwarf expression pseudo op that allows for a convenient way to perform type conversions on the Dwarf expression stack. As an additional bonus it paves the way for using other Dwarf v5 ops that need to reference a base_type. The new DW_OP_LLVM_convert is used from lib/Transforms/Utils/Local.cpp to perform sext/zext on debug values but mainly the patch is about preparing terrain for adding other Dwarf v5 ops that need to reference a base_type. For Dwarf v5 the op maps to DW_OP_convert and for earlier versions a complex shift & mask pattern is generated to emulate sext/zext. Differential Revision: https://reviews.llvm.org/D56587 llvm-svn: 356442
-
Don Hinton authored
Summary: This patch refactors several instances of cast<> used in if conditionals. Since cast<> asserts on failure, the else branch can never be taken. In some cases, the fix is to replace cast<> with dyn_cast<>. While others required the removal of the conditional and some minor refactoring. A discussion can be seen here: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20190318/265044.html Differential Revision: https://reviews.llvm.org/D59529 llvm-svn: 356441
-
Heejin Ahn authored
Summary: - Make some class member methods const - Delete unnecessary includes - Use a simpler form of `BuildMI` Reviewers: kripken Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59454 llvm-svn: 356440
-
Heejin Ahn authored
Summary: This adds `preds` comment lines to BB names for readability, while also fixes some of existing incorrect comment lines. Also deletes a few unnecessary attributes. Autogenerated by `opt`. Reviewers: kripken Subscribers: dschuff, sbc100, jgravelle-google, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59456 llvm-svn: 356439
-
Heejin Ahn authored
Reviewers: tlively, sbc100 Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59469 llvm-svn: 356438
-
Heejin Ahn authored
Summary: After r355981, intrinsic arguments that are immediate values should be marked as `ImmArg`. Reviewers: dschuff, tlively Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59447 llvm-svn: 356437
-
Heejin Ahn authored
Summary: `wasm.throw` builtin's first 'tag' argument should be an immediate index into the event section. Reviewers: dschuff, craig.topper Subscribers: sbc100, jgravelle-google, sunfish, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59448 llvm-svn: 356436
-
Marshall Clow authored
Mark 'front()' and 'back()' as noexcept for array/deque/string/string_view. These are just rebranded 'operator[]', and should be noexcept like it is. llvm-svn: 356435
-
Michael Kruse authored
The ParallelLoopGenerator class is changed such that GNU OpenMP specific code was removed, allowing to use it as super class in a template-pattern. Therefore, the code has been reorganized and one may not use the ParallelLoopGenerator directly anymore, instead specific implementations have to be provided. These implementations contain the library-specific code. As such, the "GOMP" (code completely taken from the existing backend) and "KMP" variant were created. For "check-polly" all tests that involved "GOMP": equivalents were added that test the new functionalities, like static scheduling and different chunk sizes. "docs/UsingPollyWithClang.rst" shows how the alternative backend may be used. Patch by Michael Halkenhäuser <michaelhalk@web.de> Differential Revision: https://reviews.llvm.org/D59100 llvm-svn: 356434
-
Richard Smith authored
tokens. We now actually form an angled_string_literal token for a header name by concatenation rather than just working out what its contents would be. This substantially simplifies downstream processing and is necessary for C++20 header unit imports. llvm-svn: 356433
-
Richard Smith authored
the file. NFC unless a skipped #include is found at the final permitted #include level. llvm-svn: 356432
-
Thomas Lively authored
Summary: Adds patterns to lower all the remaining setcc modes: lt, gt, le, and ge. Fixes PR40912. Reviewers: aheejin, sbc100, dschuff Reviewed By: dschuff Subscribers: jgravelle-google, hiraditya, sunfish, jdoerfert, llvm-commits, srj Tags: #llvm Differential Revision: https://reviews.llvm.org/D59519 llvm-svn: 356431
-
Aaron Puchert authored
See D59455. llvm-svn: 356430
-
Eric Fiselier authored
llvm-svn: 356429
-
Fangrui Song authored
Summary: This implements Rui Ueyama's idea in PR39044. I've checked that ld.bfd and gold do not have the power-of-2 requirement and do not require sh_entsize to be a multiple of sh_align. Now on the updated test merge-entsize.s, all the 3 linkers happily create .rodata that is not 3-byte aligned. This has a use case in Linux arch/x86/crypto/sha512-avx2-asm.S It uses sh_entsize of 640, which is not a power of 2. See https://github.com/ClangBuiltLinux/linux/issues/417 Reviewers: ruiu, espindola Reviewed By: ruiu Subscribers: nickdesaulniers, E5ten, emaste, arichardson, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59478 llvm-svn: 356428
-
Aaron Puchert authored
Summary: Similar to D56967, we add the existing diag::note_locked_here to tell the user where we saw the locking that isn't matched correctly. Reviewers: aaron.ballman, delesley Reviewed By: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59455 llvm-svn: 356427
-
Reid Kleckner authored
Needed after r356397 llvm-svn: 356426
-
- Mar 18, 2019
-
-
Reid Kleckner authored
As background, when constructing a complete object, virtual bases are constructed first. If an exception is thrown later in the ctor, those virtual bases are destroyed, so sema marks the relevant constructors and destructors of virtual bases as referenced. If necessary, they are emitted. However, an abstract class can never be used to construct a complete object. In the Itanium C++ ABI, this works out nicely, because we never end up emitting the "complete" constructor variant, only the "base" constructor variant, which can be called by constructors of derived classes. Clang's Sema::MarkBaseAndMemberDestructorsReferenced is aware of this optimization, and it does not mark ctors and dtors of virtual bases referenced when the constructor of an abstract class is emitted. In the Microsoft ABI, there are no complete/base variants, so before this change, the constructor of an abstract class could reference ctors and dtors of a virtual base without marking them referenced. This could lead to unresolved symbol errors at link time, as reported in PR41065. The fix is to implement the same optimization as Sema: If the class is abstract, don't bother initializing its virtual bases. The "is this class the most derived class" check in the constructor will never pass, and the virtual base constructor calls are always dead. Skip them. I think Richard noticed this missed optimization back in 2016 when he was implementing inheriting constructors. I wasn't able to find any bugs or email about it, though. Fixes PR41065 llvm-svn: 356425
-
Nikita Popov authored
This reverts commit 106f0cde. This change impacts the AMDGPU smed3.ll and umed3.ll codegen tests. llvm-svn: 356424
-
Craig Topper authored
This is another attempt at what Erich Keane tried to do in r355322. This adds rolb, rolw, rold, rolq and their ror equivalent as always_inline wrappers around __builtin_rotate* which will lower to funnel shift intrinsics in IR. Additionally, when _MSC_VER is not defined we will define _rotl, _lrotl, _rotr, _lrotr as macros to one of the always_inline intrinsics mentioned above. Making sure that _lrotl/_lrotr use either 32 or 64 bit based on the size of long. These need to be macros because we have builtins with the same name for MS compatibility, but _MSC_VER isn't always defined when those builtins are enabled. We also define _rotwl and _rotwr as macros aliasing to rolw/rorw just like gcc to complete the set. These don't need to be gated with _MSC_VER because these aren't MS builtins. I've added tests both for non-MS and -ms-extensions with and without _MSC_VER being defined. Differential Revision: https://reviews.llvm.org/D59346 llvm-svn: 356423
-
Kostya Serebryany authored
llvm-svn: 356422
-
Eric Fiselier authored
llvm-svn: 356421
-
Craig Topper authored
[X86] Add coverage for 16-bit and 64-bit versions of bsf/bsr/bt/btc/btr/bts in the assembly tests that are supposed to provide full coverage. Add coverage for cwtl/cltq/cwtd/cqto as well. llvm-svn: 356420
-
Craig Topper authored
llvm-svn: 356419
-
Julian Lettner authored
* Array index out of bounds: 100 iterations, but size of array is 2. * Unmatched barrier_init (2) with barrier_wait (200) * Number of iterations must be smaller than the available parallelism for the queue, otherwise we deadlock (since every barrier_wait call blocks the thread). Scary: All of this worked reliably in gcd-apply.mm (for Darwin) Rievewed By: kubamracek Differential Revision: https://reviews.llvm.org/D59510 llvm-svn: 356418
-
Eric Fiselier authored
Summary: The reason libc++ implemented a throwing debug mode handler was for ease of testing. Specifically, I thought that if a debug violation aborted, we could only test one violation per file. This made it impossible to test debug mode. Which throwing behavior we could test more! However, the throwing approach didn't work either, since there are debug violations underneath noexcept functions. This lead to the introduction of `_NOEXCEPT_DEBUG`, which was only noexcept when debug mode was off. Having thought more and having grown wiser, `_NOEXCEPT_DEBUG` was a horrible decision. It was viral, it didn't cover all the cases it needed to, and it was observable to the user -- at worst changing the behavior of their program. This patch removes the throwing debug handler, and rewrites the debug tests using 'fork-ing' style death tests. Reviewers: mclow.lists, ldionne, thomasanderson Reviewed By: ldionne Subscribers: christof, arphaman, libcxx-commits, #libc Differential Revision: https://reviews.llvm.org/D59166 llvm-svn: 356417
-
Jason Molenda authored
Aarch32 Cortex-M target processor debugging. <rdar://problem/48448564> llvm-svn: 356416
-
Nikita Popov authored
Add support for min/max flavor selects in computeConstantRange(), which allows us to fold comparisons of a min/max against a constant in InstSimplify. This was suggested by spatel as an alternative approach to D59378. I've also added the infinite looping test from that revision here. Differential Revision: https://reviews.llvm.org/D59506 llvm-svn: 356415
-
Nikita Popov authored
Baseline tests for D59471 (InstCombine of `add nuw` and `uaddo` with constants). Patch by Dan Robertson. Differential Revision: https://reviews.llvm.org/D59472 llvm-svn: 356414
-
Craig Topper authored
[X86] Allow any 8-bit immediate to be used with BT/BTC/BTR/BTS not just sign extended 8-bit immediates. We need to allow [128,255] in addition to [-128, 127] to match gas. llvm-svn: 356413
-
Alex Langford authored
LLVM installed llvm-lit with a .py suffix on windows. Let's match that behavior here. llvm-svn: 356412
-
Amara Emerson authored
Forgot to add a change to relax some asserts in r356396. llvm-svn: 356411
-
Sam Clegg authored
The default implementation does we want and is going to more compatible with dynamic linking (-fPIC) support that is planned. This is NFC because currently we only build wasm with `-relocation-model=static` which in turn means that the default `isOffsetFoldingLegal` always returns true today. Differential Revision: https://reviews.llvm.org/D54661 llvm-svn: 356410
-
Nikita Popov authored
This is preparation for D59506. The InstructionSimplify abs handling is moved into computeConstantRange(), which is the general place for such calculations. This is NFC and doesn't affect the existing tests in test/Transforms/InstSimplify/icmp-abs-nabs.ll. Differential Revision: https://reviews.llvm.org/D59511 llvm-svn: 356409
-
Nikita Popov authored
These are baseline tests for D59506. llvm-svn: 356408
-
Craig Topper authored
[X86] Use relocImm in the ROL8ri/ROL16ri/ROL32ri/ROL64ri patterns to be consistent with the ROR patterns. llvm-svn: 356407
-
Craig Topper authored
For the i8, i16, and i32 instructions we were using a relocImm. Presumably we should for i64 as well. llvm-svn: 356406
-
Michael Liao authored
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59501 llvm-svn: 356405
-
Jake Ehrlich authored
This change makes linking into .build-id atomic and safe to use. Some users under particular workflows are reporting that this races more than half the time under particular conditions. llvm-svn: 356404
-
Nikita Popov authored
- Do not use unnamed values in saddo tests - Add tests for canonicalization of a constant arg0 Patch by Dan Robertson. Differential Revision: https://reviews.llvm.org/D59476 llvm-svn: 356403
-