platform/upstream/llvm.git
4 years ago[PATCH] [ARM] ARMv8.6-a command-line + BFloat16 Asm Support
Ties Stuij [Thu, 26 Mar 2020 08:17:29 +0000 (08:17 +0000)]
[PATCH] [ARM] ARMv8.6-a command-line + BFloat16 Asm Support

Summary:
This patch introduces command-line support for the Armv8.6-a architecture and assembly support for BFloat16. Details can be found
https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/arm-architecture-developments-armv8-6-a

in addition to the GCC patch for the 8..6-a CLI:
https://gcc.gnu.org/legacy-ml/gcc-patches/2019-11/msg02647.html

In detail this patch

- march options for armv8.6-a
- BFloat16 assembly

This is part of a patch series, starting with command-line and Bfloat16
assembly support. The subsequent patches will upstream intrinsics
support for BFloat16, followed by Matrix Multiplication and the
remaining Virtualization features of the armv8.6-a architecture.

Based on work by:
- labrinea
- MarkMurrayARM
- Luke Cheeseman
- Javed Asbar
- Mikhail Maltsev
- Luke Geeson

Reviewers: SjoerdMeijer, craig.topper, rjmccall, jfb, LukeGeeson

Reviewed By: SjoerdMeijer

Subscribers: stuij, kristof.beyls, hiraditya, dexonsmith, danielkiss, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D76062

4 years agoDo export symbols when LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is on.
Simon Tatham [Thu, 26 Mar 2020 09:06:59 +0000 (09:06 +0000)]
Do export symbols when LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is on.

Summary:
In D76527, we stopped exporting symbols from clang, opt and llc unless
the `LLVM_ENABLE_PLUGINS` cmake variable is true (which causes clang's
own plugin collection to be built).

But another reasonable build configuration is to ask clang to export
its symbols for out-of-tree plugins to use, without building the
in-tree ones. That is, you might set `LLVM_EXPORT_SYMBOLS_FOR_PLUGINS`
without also setting `LLVM_ENABLE_PLUGINS` (at least if you're using
MSVC, where you need to ask explicitly for the symbols to be
exported).

In that situation, the symbols should still be exported, but after
D76527, they weren't being.

Reviewers: efriedma, john.brawn

Reviewed By: efriedma, john.brawn

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76760

4 years ago[ARM] Sink splats to vector float instructions
David Green [Wed, 25 Mar 2020 11:35:53 +0000 (11:35 +0000)]
[ARM] Sink splats to vector float instructions

Some MVE floating point instructions have gpr register variants that take
the scalar gpr value and splat them to all lanes. In order to accept
them in loops, the shuffle_vector and insert need to be sunk down into
the loop, next to the instruction so that ISel can see the whole
pattern.

This does that sinking for FAdd, FSub, FMul and FCmp. The patterns for
mul are slightly more constrained as there are no fms variants taking
register arguments.

Differential Revision: https://reviews.llvm.org/D76023

4 years ago[MLIR] Delete extra declaration of createAffineDataCopyGenerationPass.
Tres Popp [Thu, 26 Mar 2020 08:52:09 +0000 (09:52 +0100)]
[MLIR] Delete extra declaration of createAffineDataCopyGenerationPass.

This was caused by a bad rebase for
27c201aa1d972c10bfc38ff5b4abaf78ab3d2ad2

4 years ago[AST] Print a<b<c>> without extra spaces in C++11 or later.
Sam McCall [Wed, 25 Mar 2020 20:41:12 +0000 (21:41 +0100)]
[AST] Print a<b<c>> without extra spaces in C++11 or later.

Summary: It's not 1998 anymore.

Reviewers: kadircet

Subscribers: jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76801

4 years ago[clangd] Simplify "preferred" vs "definition" logic a bit in XRefs AST code.
Sam McCall [Fri, 24 Jan 2020 17:31:37 +0000 (18:31 +0100)]
[clangd] Simplify "preferred" vs "definition" logic a bit in XRefs AST code.

Summary:
Now Preferred is always the canonical (first) decl, Definition is always the def
if available.

In practice the index was already forcing this behaviour anyway, so there's no
change. (Unless you weren't using this index, in which case this patch makes
textDocument/declaration and toggling work as expected).

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D73369

4 years ago[Analyzer] Only add container note tags to the operations of the affected container
Adam Balogh [Thu, 30 Jan 2020 12:54:52 +0000 (13:54 +0100)]
[Analyzer] Only add container note tags to the operations of the affected container

If an error happens which is related to a container the Container
Modeling checker adds note tags to all the container operations along
the bug path. This may be disturbing if there are other containers
beside the one which is affected by the bug. This patch restricts the
note tags to only the affected container and adjust the debug checkers
to be able to test this change.

Differential Revision: https://reviews.llvm.org/D75514

4 years ago[MLIR] Add parallel loop collapsing.
Tres Popp [Wed, 11 Mar 2020 13:38:10 +0000 (14:38 +0100)]
[MLIR] Add parallel loop collapsing.

This allows conversion of a ParallelLoop from N induction variables to
some nuber of induction variables less than N.

The first intended use of this is for the GPUDialect to convert
ParallelLoops to iterate over 3 dimensions so they can be launched as
GPU Kernels.

To implement this:
- Normalize each iteration space of the ParallelLoop
- Use the same induction variable in a new ParallelLoop for multiple
  original iterations.
- Split the new induction variable back into the original set of values
  inside the body of the ParallelLoop.

Subscribers: mgorny, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76363

4 years ago[AST] Build recovery expressions for nonexistent member exprs.
Haojian Wu [Wed, 25 Mar 2020 11:43:53 +0000 (12:43 +0100)]
[AST] Build recovery expressions for nonexistent member exprs.

Summary: Previously, we dropped the AST node for nonexistent member exprs.

Reviewers: sammccall

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76764

4 years ago[Analyzer] Use note tags to track container begin and and changes
Adam Balogh [Thu, 30 Jan 2020 12:54:52 +0000 (13:54 +0100)]
[Analyzer] Use note tags to track container begin and and changes

Container operations such as `push_back()`, `pop_front()`
etc. increment and decrement the abstract begin and end
symbols of containers. This patch introduces note tags
to `ContainerModeling` to track these changes. This helps
the user to better identify the source of errors related
to containers and iterators.

Differential Revision: https://reviews.llvm.org/D73720

4 years ago[MLIR] Add flat affine constraints method to round trip integer set
Uday Bondhugula [Mon, 23 Mar 2020 14:06:18 +0000 (19:36 +0530)]
[MLIR] Add flat affine constraints method to round trip integer set

- add method to get back an integer set from flat affine constraints;
  this allows a round trip
- use this to complete the simplification of integer sets in
  -simplify-affine-structures
- update FlatAffineConstraints::removeTrivialRedundancy to also do GCD
  tightening and normalize by GCD (while still keeping it linear time).

Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>
4 years ago[ELF][test] Delete unneeded binding directive (.weak or .globl)
Fangrui Song [Thu, 26 Mar 2020 06:30:30 +0000 (23:30 -0700)]
[ELF][test] Delete unneeded binding directive (.weak or .globl)

Future MC may error for a changed symbol binding.
This may be a preferred resolution to https://bugs.llvm.org/show_bug.cgi?id=38921

See https://sourceware.org/pipermail/binutils/2020-March/110399.html

4 years ago[X86] Update more intrinsic tests to prepare to extend D60940 to scalar fp.
Craig Topper [Thu, 26 Mar 2020 05:07:14 +0000 (22:07 -0700)]
[X86] Update more intrinsic tests to prepare to extend D60940 to scalar fp.

I want to extend D60940 to scalar FP which will prevent forming
masked instructions if the arithmetic op has another use. To
prepare for that, this patch updates tests to avoid repeating
the operation multiple times with different masking.

4 years ago[InstCombine] Fix a code-sinking bug after D73832/f1a9efabcb9b
Fangrui Song [Thu, 26 Mar 2020 05:41:02 +0000 (22:41 -0700)]
[InstCombine] Fix a code-sinking bug after D73832/f1a9efabcb9b

- UserParent = PN->getIncomingBlock(*I->use_begin());
+ UserParent = PN->getIncomingBlock(*SingleUse);

The first use of I may be droppable (llvm.assume).

When compiling llvm/lib/IR/AutoUpgrade.cpp with a bootstrapped clang
with ThinLTO with minimized bitcode files, I see such a case in
the function _ZN4llvm20UpgradeIntrinsicCallEPNS_8CallInstEPNS_8FunctionE

  clang -c -fthinlto-index=AutoUpgrade.o.thinlto.bc AutoUpgrade.bc -O3

Unfortunately it is really difficult to get a minimized reproduce.

4 years agoFix `-Wreturn-type` warning. NFC.
Michael Liao [Thu, 26 Mar 2020 04:51:31 +0000 (00:51 -0400)]
Fix `-Wreturn-type` warning. NFC.

4 years agoUse optimal layout and preserve alloca alignment in coroutine frames.
John McCall [Wed, 25 Mar 2020 20:58:09 +0000 (16:58 -0400)]
Use optimal layout and preserve alloca alignment in coroutine frames.

Previously, we would ignore alloca alignment when building the frame
and just use the natural alignment of the allocated type.  If an alloca
is over-aligned for its IR type, this could lead to a frame entry with
inadequate alignment for the downstream uses of the alloca.

Since highly-aligned fields also tend to produce poor layouts under a
naive layout algorithm, I've also switched coroutine frames to use the
new optimal struct layout algorithm.

In order to communicate the frame size and alignment to later passes,
I needed to set align+dereferenceable attributes on the frame-pointer
parameter of the resume function.  This is clearly the right thing to
do, but the align attribute currently seems to result in assumptions
being added during inlining that the optimizer cannot easily remove.

4 years ago[PowerPC] Improve the way legalize mul for v8i16 and add pattern to match mul + add
QingShan Zhang [Thu, 26 Mar 2020 02:18:44 +0000 (02:18 +0000)]
[PowerPC] Improve the way legalize mul for v8i16 and add pattern to match mul + add

We can legalize the operation MUL for v8i16 with instruction (vmladduhm A, B, 0)
if altivec enabled. Now, it is set as custom and expand it later, which is not
the right way. And then, we can add the pattern to match the mul + add with (vmladduhm A, B, C)

Reviewed By: Nemanjai

Differential Revision: https://reviews.llvm.org/D76751

4 years ago[X86] Split more masked instruction tests to enable D60940.
Craig Topper [Wed, 25 Mar 2020 16:23:07 +0000 (09:23 -0700)]
[X86] Split more masked instruction tests to enable D60940.

More mechanical splitting of tests so we can add a one use
check to the isel patterns for forming masked instructions.

In a few cases I changed immediates of instructions in
order to avoid needing to split.

4 years agoRelax newly added opcode checks to check only for a number instead of a specific...
Douglas Yung [Thu, 26 Mar 2020 03:15:33 +0000 (20:15 -0700)]
Relax newly added opcode checks to check only for a number instead of a specific opcode.

4 years agoRevert "tsan: fix leak of ThreadSignalContext for fibers"
Jonas Devlieghere [Thu, 26 Mar 2020 02:18:01 +0000 (19:18 -0700)]
Revert "tsan: fix leak of ThreadSignalContext for fibers"

Temporarily revert "tsan: fix leak of ThreadSignalContext for fibers"
because it breaks the LLDB bot on GreenDragon.

This reverts commit 93f7743851b7a01a8c8f54b3753b6e5cd5591e15.
This reverts commit d8a0f76de7bd98dc7a271bc15b39a4cdbfdf6ecb.

4 years ago[AMDGPU] Fixed function traversal in attribute propagation
Stanislav Mekhanoshin [Thu, 26 Mar 2020 00:34:49 +0000 (17:34 -0700)]
[AMDGPU] Fixed function traversal in attribute propagation

AMDGPUPropagateAttributes pass was skipping some of the functions
when cloning. Functions were added to root set and then skipped
on the next interation because they are already in the root set,
while were meant to be processed with different features.

Differential Revision: https://reviews.llvm.org/D76815

4 years agoFixing a sanitizer lint problem that was breaking some builds.
Wolfgang [Thu, 26 Mar 2020 01:15:17 +0000 (18:15 -0700)]
Fixing a sanitizer lint problem that was breaking some builds.

4 years agoRemove overly verbose debug from GenericDomTreeConstruction
Mehdi Amini [Wed, 25 Mar 2020 20:19:16 +0000 (20:19 +0000)]
Remove overly verbose debug from GenericDomTreeConstruction

This particular debug shows all the time when I'm processing any MLIR
module:

discovered a new reachable node ^bb0
discovered a new reachable node ^bb0
discovered a new reachable node ^bb0
discovered a new reachable node ^bb0
        ...
        (repeated x1875)

I think that printing all the basic blocks in the function is likely low
value enough that we can get away with removing this.

Differential Revision: https://reviews.llvm.org/D76813

4 years ago[libcxx] Fix .gitignore to not exclude test directories
Shoaib Meenai [Fri, 18 Oct 2019 21:11:29 +0000 (14:11 -0700)]
[libcxx] Fix .gitignore to not exclude test directories

We have several test directories whose names end in .spec. Ensure we
don't accidentally ignore them by removing a section of the .gitignore
that's irrelevant for libc++.

Differential Revision: https://reviews.llvm.org/D69195

4 years ago[clangd] Add test for FindTarget+RecoveryExpr (which already works). NFC
Sam McCall [Wed, 25 Mar 2020 23:40:15 +0000 (00:40 +0100)]
[clangd] Add test for FindTarget+RecoveryExpr (which already works). NFC

4 years ago[clangd] Work around gcc bug after 8f237f9b0
Sam McCall [Wed, 25 Mar 2020 23:06:54 +0000 (00:06 +0100)]
[clangd] Work around gcc bug after 8f237f9b0

4 years ago[mlir][vulkan-runner] Add test to time a large vector add
Lei Zhang [Wed, 25 Mar 2020 20:43:55 +0000 (16:43 -0400)]
[mlir][vulkan-runner] Add test to time a large vector add

Summary:
The test performs add on vector<16384xf32> with
number of workgroups = (128, 1, 1)
local workgroup size = (128, 1, 1)

On a NVIDIA Quadro P1000, I see the following results:

Command buffer submit time: 13us
Compute shader execution time: 19.616us

Differential Revision: https://reviews.llvm.org/D76799

4 years ago[AMDGPU] Preserve original symbol during attribute propagation
Stanislav Mekhanoshin [Wed, 25 Mar 2020 18:06:34 +0000 (11:06 -0700)]
[AMDGPU] Preserve original symbol during attribute propagation

AMDGPUPropagateAttributes can swap names while cloning a function.
Only do it if original symbol was not externally visible.

Differential Revision: https://reviews.llvm.org/D76789

4 years ago[libc] Add a GNU extensions spec containing sincosf from math.h.
Siva Chandra Reddy [Wed, 25 Mar 2020 05:29:11 +0000 (22:29 -0700)]
[libc] Add a GNU extensions spec containing sincosf from math.h.

Reviewers: abrachet

Differential Revision: https://reviews.llvm.org/D76783

4 years agoConvert old python3 cgi method into the new html one
Gianfranco Costamagna [Wed, 25 Mar 2020 21:38:34 +0000 (22:38 +0100)]
Convert old python3 cgi method into the new html one

Summary: Patch by Gianfranco Costamagna

Reviewers: serge-sans-paille

Reviewed By: serge-sans-paille

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76126

4 years ago[SCCP] Add a few constantexpr,undef tests for cond propagation
Florian Hahn [Tue, 24 Mar 2020 13:54:13 +0000 (13:54 +0000)]
[SCCP] Add a few constantexpr,undef tests for cond propagation

4 years ago[libc++] Fix CMake configuration breakage when libc++ is built neither static nor...
Louis Dionne [Wed, 25 Mar 2020 20:50:19 +0000 (16:50 -0400)]
[libc++] Fix CMake configuration breakage when libc++ is built neither static nor dynamic

Introduced by https://reviews.llvm.org/D72687. This condition can happen
when the tests are not being run at all, and we're only trying to generate
the libc++ headers.

4 years ago[libc++] Require the use of clang-verify in .fail.cpp tests that don't fail without it
Louis Dionne [Mon, 16 Mar 2020 18:58:31 +0000 (14:58 -0400)]
[libc++] Require the use of clang-verify in .fail.cpp tests that don't fail without it

Some tests do not fail at all when -verify is not supported, unless some
arbitrary warning flag is added to make them fail. We currently used
-Werror=unused-result to make them fail, but doing so makes the test
suite a lot more inscrutable. It seems better to just disable those
tests when -verify is not supported.

Differential Revision: https://reviews.llvm.org/D76256

4 years ago[compiler-rt] Mark FDP non-template methods inline to avoid ODR violations.
Max Moroz [Wed, 25 Mar 2020 20:43:54 +0000 (13:43 -0700)]
[compiler-rt] Mark FDP non-template methods inline to avoid ODR violations.

4 years ago[libc++] Add a new %exec substitution
Louis Dionne [Wed, 25 Mar 2020 20:25:47 +0000 (16:25 -0400)]
[libc++] Add a new %exec substitution

It allows executing arbitrary commands with the same environment as
normal .pass.cpp tests, which is handy.

4 years ago[mlir] Provide CustomOpAsmParser::parseOptionalOperand
Alex Zinenko [Wed, 25 Mar 2020 15:25:52 +0000 (16:25 +0100)]
[mlir] Provide CustomOpAsmParser::parseOptionalOperand

Summary:
Some operations have custom syntax where an operand is always followed by a
specific token of streams if the operand is present. Parsing such operations
requires the ability to optionally parse an operand. Provide a relevant
function in the custom Op parser.

Differential Revision: https://reviews.llvm.org/D76779

4 years agoIgnore/Drop droppable uses for code-sinking in InstCombine
Tyker [Wed, 25 Mar 2020 18:49:04 +0000 (19:49 +0100)]
Ignore/Drop droppable uses for code-sinking in InstCombine

Summary:
This patch allows code-sinking in InstCombine to be performed when instruction have uses in llvm.assume.

Use are considered droppable when it is preferable to modify the User such that the use disappears rather than to prevent a transformation because of the use.
for now uses are considered droppable if they are in an llvm.assume.

Reviewers: jdoerfert, nikic, spatel, lebedev.ri, sstefan1

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73832

4 years ago[CFG/BasicBlock] Rename pred_const to const_pred. [NFC]
Alina Sbirlea [Tue, 10 Mar 2020 22:19:29 +0000 (15:19 -0700)]
[CFG/BasicBlock] Rename pred_const to const_pred. [NFC]

Summary:
Rename `pred_const_range` to `const_pred_range` to make it consistent with
the other pred/succ iterator definitions.

Reviewers: nicholas, dblaikie, nlewycky

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75962

4 years ago[CFG/BasicBlock] Rename succ_const to const_succ. [NFC]
Alina Sbirlea [Tue, 10 Mar 2020 18:33:02 +0000 (11:33 -0700)]
[CFG/BasicBlock] Rename succ_const to const_succ. [NFC]

Summary:
Rename `succ_const_iterator` to `const_succ_iterator` and
`succ_const_range` to `const_succ_range` for consistency with the
predecessor iterators, and the corresponding iterators in
MachineBasicBlock.

Reviewers: nicholas, dblaikie, nlewycky

Subscribers: hiraditya, bmahjour, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75952

4 years agoImplement post-commit comments for D75685/rG86e0a6c60627
Erich Keane [Wed, 25 Mar 2020 19:05:07 +0000 (12:05 -0700)]
Implement post-commit comments for D75685/rG86e0a6c60627

@Anastasia made a pair of comments on D75685 after it was committed
requesting changes to the test.  This patch updates the test based on
her comments.

4 years ago[mlir] Remove old VectorOps directory
River Riddle [Wed, 25 Mar 2020 19:18:11 +0000 (12:18 -0700)]
[mlir] Remove old VectorOps directory

This was accidentally re-added during a rebase.

4 years ago[Clang] Fix clang-tidy errors.
Alexander Belyaev [Wed, 25 Mar 2020 19:13:43 +0000 (20:13 +0100)]
[Clang] Fix clang-tidy errors.

4 years ago[mlir][Parser] Fix attribute parser errors for ui64
Frej Drejhammar [Wed, 25 Mar 2020 18:51:34 +0000 (11:51 -0700)]
[mlir][Parser] Fix attribute parser errors for ui64

Summary:
The attribute parser fails to correctly parse unsigned 64 bit
attributes as the check `isNegative ? (int64_t)-val.getValue() >= 0
: (int64_t)val.getValue() < 0` will falsely detect an overflow for
unsigned values larger than 2^63-1.

This patch reworks the overflow logic to instead of doing arithmetic
on int64_t use APInt::isSignBitSet() and knowledge of the attribute
type.

Test-cases which verify the de-facto behavior of the parser and
triggered the previous faulty handing of unsigned 64 bit attrbutes are
also added.

Differential Revision: https://reviews.llvm.org/D76493

4 years ago[WebAssembly] Move event section before global section
Heejin Ahn [Wed, 25 Mar 2020 02:36:13 +0000 (19:36 -0700)]
[WebAssembly] Move event section before global section

Summary:
https://github.com/WebAssembly/exception-handling/issues/98

Also this moves many parts of code to make code align with the section
order, even if they don't affect the output.

Reviewers: tlively

Subscribers: dschuff, sbc100, hiraditya, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76752

4 years ago[libc++] Drop custom support for flaky tests from libc++ test suite
Louis Dionne [Wed, 25 Mar 2020 18:30:06 +0000 (14:30 -0400)]
[libc++] Drop custom support for flaky tests from libc++ test suite

Instead, use the builtin support in lit. This makes the libc++ custom
test format slightly closer to the builtin ShTest format in behavior.

4 years agoFix vector type scalar checking when the scalar operand is dependent
Erich Keane [Wed, 25 Mar 2020 18:32:00 +0000 (11:32 -0700)]
Fix vector type scalar checking when the scalar operand is dependent

As reported in PR45298 and PR45299, vector_size type checking would
crash when done in a situation where the scalar is dependent, such as
a member of the current instantiation.

This is because the scalar checking ensures that you can implicitly
convert a value to a vector-type as long as it doesn't require
truncation. It does this by using the constant evaluator to get the
value as a float. Unfortunately, if the scalar is dependent (such as a
member of the current instantiation), we would hit the assert in the
evaluator.

This patch suppresses the truncation- of-value check in the first phase
of translation. All values are properly errored upon instantiation. This
has one minor regression, in that previously in a non-asserts build,

template<typename T>
struct S {
  float4 f(float4 f) {
    return k + f;
  }
  static constexpr k = 1.1; // causes a truncation on conversion.
};

would error immediately. Because 'k' is value dependent (as a
member-of-the-current-instantiation), this would still be evaluatable
(despite normally asserting).  Due to this patch, this diagnostic is
delayed until instantiation time.

4 years ago[ThinLTO] Don't rely on debug output for thinlto_samplepgo_icp3 test
Alexandre Ganea [Wed, 25 Mar 2020 17:53:26 +0000 (13:53 -0400)]
[ThinLTO] Don't rely on debug output for thinlto_samplepgo_icp3 test

Because using -print-imports is not thread-safe, make the test rely on llvm-dis instead.
Also cover the ICALL-PROM part as intended originally.

Differential Revision: https://reviews.llvm.org/D76775

4 years agorevert parts of d7888149aa813f that several bots do not like
Nico Weber [Wed, 25 Mar 2020 18:04:59 +0000 (14:04 -0400)]
revert parts of d7888149aa813f that several bots do not like

4 years ago[libc++] NFC: Remove unused include from test
Louis Dionne [Wed, 25 Mar 2020 18:00:25 +0000 (14:00 -0400)]
[libc++] NFC: Remove unused include from test

4 years ago[clang codegen] Address review comment on comment in constWithPadding.
Eli Friedman [Wed, 25 Mar 2020 17:56:48 +0000 (10:56 -0700)]
[clang codegen] Address review comment on comment in constWithPadding.

4 years agoSuppress a few -Wunreachable-code warnings.
Nico Weber [Wed, 25 Mar 2020 17:48:02 +0000 (13:48 -0400)]
Suppress a few -Wunreachable-code warnings.

No behavior change. Also fix a comment to say match reality.

4 years ago[X86][AVX] Combine shuffles to TRUNCATE/VTRUNC patterns
Simon Pilgrim [Wed, 25 Mar 2020 17:26:10 +0000 (17:26 +0000)]
[X86][AVX] Combine shuffles to TRUNCATE/VTRUNC patterns

Add support for combining shuffles to AVX512 truncate instructions - another step toward fixing D56387/D66004. It also fixes SKX code on PR31443.

We could probably extend this further to handle non-VLX truncation cases.

4 years ago[LV] Replace stored value with a VPValue (NFCI)
Gil Rapaport [Wed, 18 Mar 2020 19:58:13 +0000 (21:58 +0200)]
[LV] Replace stored value with a VPValue (NFCI)

InnerLoopVectorizer's code called during VPlan execution still relies on
original IR's def-use relations to decide which vector code to generate,
limiting VPlan transformations ability to modify def-use relations and still
have ILV generate the vector code.
This commit introduces a VPValue for VPWidenMemoryInstructionRecipe to use as
the stored value. The recipe is generated with a VPValue wrapping the stored
value of the scalar store. This reduces ingredient def-use usage by ILV as a
step towards full VPlan-based def-use relations.

Differential Revision: https://reviews.llvm.org/D76373

4 years ago[NFC] Rename function to match Coding Convention and fix typo in KnowledgeRetention
Tyker [Wed, 25 Mar 2020 17:28:51 +0000 (18:28 +0100)]
[NFC] Rename function to match Coding Convention and fix typo in KnowledgeRetention

4 years ago[gn build] try removing a duplicate include dir
Nico Weber [Wed, 25 Mar 2020 17:23:47 +0000 (13:23 -0400)]
[gn build] try removing a duplicate include dir

4 years ago[libc] Add a simple x86_64 linux loader.
Siva Chandra Reddy [Wed, 18 Mar 2020 19:46:33 +0000 (12:46 -0700)]
[libc] Add a simple x86_64 linux loader.

This adds a very simple loader. This will be extended to a full loader
in future patches. A utility rule to add unittests has been added to
serve us while we are building out the full loader.

Reviewers: abrachet, phosek

Differential Revision: https://reviews.llvm.org/D76412

4 years ago[ARM,CDE] Implement predicated Q-register CDE intrinsics
Mikhail Maltsev [Wed, 25 Mar 2020 17:08:19 +0000 (17:08 +0000)]
[ARM,CDE] Implement predicated Q-register CDE intrinsics

Summary:
This patch implements the following CDE intrinsics:

  T __arm_vcx1q_m(int coproc, T inactive, uint32_t imm, mve_pred_t p);
  T __arm_vcx2q_m(int coproc, T inactive, U n, uint32_t imm, mve_pred_t p);
  T __arm_vcx3q_m(int coproc, T inactive, U n, V m, uint32_t imm, mve_pred_t p);

  T __arm_vcx1qa_m(int coproc, T acc, uint32_t imm, mve_pred_t p);
  T __arm_vcx2qa_m(int coproc, T acc, U n, uint32_t imm, mve_pred_t p);
  T __arm_vcx3qa_m(int coproc, T acc, U n, V m, uint32_t imm, mve_pred_t p);

The intrinsics are not part of the released ACLE spec, but internally at
Arm we have reached consensus to add them to the next ACLE release.

Reviewers: simon_tatham, MarkMurrayARM, ostannard, dmgreen

Reviewed By: simon_tatham

Subscribers: kristof.beyls, hiraditya, danielkiss, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76610

4 years ago[clangd] Support multiple cursors in selectionRange.
Sam McCall [Tue, 24 Mar 2020 23:51:50 +0000 (00:51 +0100)]
[clangd] Support multiple cursors in selectionRange.

Summary:
One change: because there's no way to signal failure individually for
each cursor, we now "succeed" with an empty range with no parent if a
cursor doesn't point at anything.

Reviewers: usaxena95

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76741

4 years ago[analyzer][NFC] Add missing LLVM header blurb (and license)
Gabor Marton [Wed, 25 Mar 2020 16:56:40 +0000 (17:56 +0100)]
[analyzer][NFC] Add missing LLVM header blurb (and license)

4 years agoAdd method to TargetInfo to get CPU cache line size
zoecarver [Wed, 25 Mar 2020 16:48:01 +0000 (09:48 -0700)]
Add method to TargetInfo to get CPU cache line size

Summary:
This patch adds a virtual method `getCPUCacheLineSize()` to `TargetInfo`. Currently, I've only implemented the method in `X86TargetInfo`. It's extremely important that each CPU's cache line size correct (e.g., we can't just define it as `64` across the board) so, it has been a little slow getting to this point.

I'll work on the ARM CPUs next, but that will probably come later in a different patch.

Tags: #clang

Differential Revision: https://reviews.llvm.org/D74918

4 years ago[clang] Reformat cindex. NFC.
Michael Kruse [Wed, 25 Mar 2020 14:26:14 +0000 (09:26 -0500)]
[clang] Reformat cindex. NFC.

to reduce spurios changes in patches after clang-formatting them. In
particular, these files contain long enums that clang-format reformats
in their entirety if e.g. an element is added.

Reviews having this problem include https://reviews.llvm.org/D76342 and
https://reviews.llvm.org/D71447.

4 years ago[libc++] Run the builders Docker containers 'as 'buildbot instead of 'root'
Louis Dionne [Wed, 25 Mar 2020 15:11:31 +0000 (11:11 -0400)]
[libc++] Run the builders Docker containers 'as 'buildbot instead of 'root'

4 years agotsan: fix leak of ThreadSignalContext for fibers
Dmitry Vyukov [Wed, 25 Mar 2020 16:03:29 +0000 (17:03 +0100)]
tsan: fix leak of ThreadSignalContext for fibers

When creating and destroying fibers in tsan a thread state
is created and destroyed. Currently, a memory mapping is
leaked with each fiber (in __tsan_destroy_fiber).
This causes applications with many short running fibers
to crash or hang because of linux vm.max_map_count.

The root of this is that ThreadState holds a pointer to
ThreadSignalContext for handling signals. The initialization
and destruction of it is tied to platform specific events
in tsan_interceptors_posix and missed when destroying a fiber
(specifically, SigCtx is used to lazily create the
ThreadSignalContext in tsan_interceptors_posix). This patch
cleans up the memory by inverting the control from the
platform specific code calling the generic ThreadFinish to
ThreadFinish calling a platform specific clean-up routine
after finishing a thread.

The relevant code causing the leak with fibers is the fiber destruction:

void FiberDestroy(ThreadState *thr, uptr pc, ThreadState *fiber) {
  FiberSwitchImpl(thr, fiber);
  ThreadFinish(fiber);
  FiberSwitchImpl(fiber, thr);
  internal_free(fiber);
}

I would appreciate feedback if this way of fixing the leak is ok.
Also, I think it would be worthwhile to more closely look at the
lifecycle of ThreadState (i.e. it uses no constructor/destructor,
thus requiring manual callbacks for cleanup) and how OS-Threads/user
level fibers are differentiated in the codebase. I would be happy to
contribute more if someone could point me at the right place to
discuss this issue.

Reviewed-in: https://reviews.llvm.org/D76073
Author: Florian (Florian)

4 years agocompiler-rt: allow golang race detector to run on musl-c
Dmitry Vyukov [Wed, 25 Mar 2020 10:30:25 +0000 (11:30 +0100)]
compiler-rt: allow golang race detector to run on musl-c

tsan while used by golang's race detector was not working on alpine
linux, since it is using musl-c instead of glibc. Since alpine is very
popular distribution for container deployments, having working race
detector would be nice. This commits adds some ifdefs to get it working.

It fixes https://github.com/golang/go/issues/14481 on golang's issue tracker.

Reviewed-in: https://reviews.llvm.org/D75849
Author: graywolf-at-work (Tomas Volf)

4 years ago[lldb] add lit.local.cfg for breakpad tests
Pavel Labath [Wed, 25 Mar 2020 15:07:05 +0000 (16:07 +0100)]
[lldb] add lit.local.cfg for breakpad tests

The reason is to add .yaml as a valid test suffix. The test folder
contains one yaml file, which wasn't being run because of that.

Unsurprisingly the test fails, but this was not because the underlying
functionality was broken, but rather because the test was setup
incorrectly (most likely due to overly aggressive simplification of the
test data on my part).

Therefore this patch also tweaks the test inputs in order to test what
they are supposed to test, and also updates some other breakpad tests
(because they depend on the same inputs as this one) to be more
realistic -- specifically it avoids putting symbols to the first page of
the module, as that's where normally the COFF header would reside.

4 years ago[ARM] Move ConstantIsland and LowOverheadLoops Passes.
Yvan Roux [Wed, 25 Mar 2020 15:40:30 +0000 (16:40 +0100)]
[ARM] Move ConstantIsland and LowOverheadLoops Passes.

Move ARM ConstantIsland and LowOverheadLopps passes later in the pipeline
such that they will be run after the upcoming Machine Outlining pass.

Differential Revision: https://reviews.llvm.org/D76065

4 years ago[mlir] Removed TanHOp lowering from ConvertStandardToLLVM since there is no reasonabl...
Marcel Koester [Tue, 3 Mar 2020 10:07:14 +0000 (11:07 +0100)]
[mlir] Removed TanHOp lowering from ConvertStandardToLLVM since there is no reasonable TanH representation in LLVM.

Summary: The current ConvertStandardToLLVM phase lowers the standard TanHOp to function calls to external tanh symbols. However, this leads to misunderstandings since these external symbols are not defined anywhere. This commit removes the TanHOp lowering functionality from ConvertStandardToLLVM, adapts the LowerGpuOpsToNVVMOps and LowerGpuOpsToROCDLOps passes and adjusts the affected test cases.

Reviewers: mravishankar, herhut

Subscribers: jholewinski, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, csigg, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75509

4 years ago[gn build] Port ce984129eaa
LLVM GN Syncbot [Wed, 25 Mar 2020 15:36:51 +0000 (15:36 +0000)]
[gn build] Port ce984129eaa

4 years ago[AMDGPU] Add SIPreEmitPeephole pass.
cdevadas [Wed, 25 Mar 2020 14:15:16 +0000 (14:15 +0000)]
[AMDGPU] Add SIPreEmitPeephole pass.

This pass can handle all the optimization
opportunities found just before code emission.
Presently it includes the handling of vcc branch
optimization that was handled earlier in SIInsertSkips.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D76712

4 years ago[X86][AVX] Add common prefix to merge 32/64-bit AVX1 checks
Simon Pilgrim [Wed, 25 Mar 2020 15:33:11 +0000 (15:33 +0000)]
[X86][AVX] Add common prefix to merge 32/64-bit AVX1 checks

4 years ago[SystemZ] Improve foldMemoryOperandImpl()
Jonas Paulsson [Wed, 11 Mar 2020 14:18:35 +0000 (15:18 +0100)]
[SystemZ] Improve foldMemoryOperandImpl()

A spilled load of an immediate can use MVHI/MVGHI instead.
A compare of a spilled register against an immediate can use CHSI/CGHSI.
A logical compare can use CLFHSI/CLGHSI.

Review: Ulrich Weigand

Differential Revision: https://reviews.llvm.org/D76055

4 years ago[llvm-objdump] Replace array_pod_sort with llvm::stable_sort
Fangrui Song [Tue, 24 Mar 2020 22:55:34 +0000 (15:55 -0700)]
[llvm-objdump] Replace array_pod_sort with llvm::stable_sort

llvm-objdump.cpp has 3 array_pod_sort() calls used for symbolization.
array_pod_start() calls qsort() internally and can have different
behaviors across different libcs. Use llvm::stable_sort instead.

Reviewed By: davidb, thopre

Differential Revision: https://reviews.llvm.org/D76739

4 years ago[PowerPC][AIX] ByVal formal arguments in a single register.
Sean Fertile [Wed, 25 Mar 2020 14:17:49 +0000 (10:17 -0400)]
[PowerPC][AIX] ByVal formal arguments in a single register.

Adds support for passing ByVal formal arguments as long as they fit in a
single register.

Differential Revision: https://reviews.llvm.org/D76401

4 years agoAdd MS Mangling for OpenCL Pipe types, add mangling test.
Erich Keane [Thu, 5 Mar 2020 16:10:00 +0000 (08:10 -0800)]
Add MS Mangling for OpenCL Pipe types, add mangling test.

SPIRV2.0 Spec only specifies Linux mangling, however our downstream has
use for a Windows mangling for these types.

Unfortunately, the SPIRV
spec specifies a single mangling for all pipe types, despite clang
allowing overloading on these types.  Because of this, this patch
chooses to mangle the read/writability and element type for the windows
mangling.

The windows manglings in the test all demangle according to demangler:
"void __cdecl test1(struct __clang::ocl_pipe<int,1>)
"void __cdecl test2(struct __clang::ocl_pipe<float,0>)
"void __cdecl test2(struct __clang::ocl_pipe<int,1>)
"void __cdecl test3(struct __clang::ocl_pipe<int const,1>)
"void __cdecl test4(struct __clang::ocl_pipe<union
__clang::__vector<unsigned char,3>,1>)
"void __cdecl test5(struct __clang::ocl_pipe<union
__clang::__vector<int,4>,1>)
"void __cdecl test_reserved_read_pipe(struct __clang::_ASCLglobal<struct
Person > * __ptr64,struct __clang::ocl_pipe<struct Person,1>)

Differential Revision: https://reviews.llvm.org/D75685

4 years agoBuild fix: AttributeCommonInfo::AS_C2x
Hans Wennborg [Wed, 25 Mar 2020 14:42:21 +0000 (15:42 +0100)]
Build fix: AttributeCommonInfo::AS_C2x

4 years ago[VectorCombine] add shuffle tests; NFC
Sanjay Patel [Wed, 25 Mar 2020 14:33:59 +0000 (10:33 -0400)]
[VectorCombine] add shuffle tests; NFC
Goes with DD76727.

4 years agoAdd an attribute plugin example
John Brawn [Wed, 25 Mar 2020 13:49:02 +0000 (13:49 +0000)]
Add an attribute plugin example

Differential Revision: https://reviews.llvm.org/D31343

4 years agoDon't normalise CXX11/C2X attribute names to start with ::
John Brawn [Wed, 25 Mar 2020 10:53:30 +0000 (10:53 +0000)]
Don't normalise CXX11/C2X attribute names to start with ::

Currently square-bracket-style (CXX11/C2X) attribute names are normalised to
start with :: if they don't have a namespace. This is a bit odd, as such
names are rejected when parsing, so don't do this.

Differential Revision: https://reviews.llvm.org/D76704

4 years agoOpenMP] Adding InaccessibleMemOnly and InaccessibleMemOrArgMemOnly for runtime calls.
sstefan1 [Wed, 25 Mar 2020 14:08:50 +0000 (14:08 +0000)]
OpenMP] Adding InaccessibleMemOnly and InaccessibleMemOrArgMemOnly for runtime calls.

Summary: Attempt to add more attributes for runtime calls.

Reviewers: jdoerfert

Subscribers: guansong, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75010

4 years ago[SYCL] Implement __builtin_unique_stable_name.
Erich Keane [Wed, 18 Mar 2020 20:45:58 +0000 (13:45 -0700)]
[SYCL] Implement __builtin_unique_stable_name.

In order to support non-user-named kernels, SYCL needs some way in the
integration headers to name the kernel object themselves. Initially, the
design considered just RTTI naming of the lambdas, this results in a
quite unstable situation in light of some device/host macros.
Additionally, this ends up needing to use RTTI, which is a burden on the
implementation and typically unsupported.

Instead, we've introduced a builtin, __builtin_unique_stable_name, which
takes a type or expression, and results in a constexpr constant
character array that uniquely represents the type (or type of the
expression) being passed to it.

The implementation accomplishes that simply by using a slightly modified
version of the Itanium Mangling. The one exception is when mangling
lambdas, instead of appending the index of the lambda in the function,
it appends the macro-expansion back-trace of the lambda itself in the
form LINE->COL[~LINE->COL...].

Differential Revision: https://reviews.llvm.org/D76620

4 years ago[lldb][NFC] lldb_assert->lldbassert in ClangExpressionParser
Raphael Isemann [Wed, 25 Mar 2020 10:52:33 +0000 (11:52 +0100)]
[lldb][NFC] lldb_assert->lldbassert in ClangExpressionParser

lldbassert is the macro that takes care of passing along line/file/function
to the lldb_assert function. Let's call that instead of manually calling the
function.

4 years ago[libcxx] Allow tests to link with static libc++abi/libc++ even if the shared version...
Sergej Jaskiewicz [Wed, 25 Mar 2020 12:27:05 +0000 (15:27 +0300)]
[libcxx] Allow tests to link with static libc++abi/libc++ even if the shared version is present

Summary:
This is essentially D71894, but for libc++.

This is needed for running libc++ tests over SSH.

Reviewers: EricWF, ldionne, phosek, mehdi_amini, mclow.lists, jroelofs, bcraig, #libc

Reviewed By: ldionne, phosek, #libc

Subscribers: mgorny, christof, dexonsmith, libcxx-commits

Tags: #libc

Differential Revision: https://reviews.llvm.org/D72687

4 years ago[AArch64][SVE] Add SVE intrinsics for masked loads & stores
Kerry McLaughlin [Wed, 25 Mar 2020 11:26:25 +0000 (11:26 +0000)]
[AArch64][SVE] Add SVE intrinsics for masked loads & stores

Summary:
Implements the following intrinsics for contiguous loads & stores:
  - @llvm.aarch64.sve.ld1
  - @llvm.aarch64.sve.st1

Reviewers: sdesmalen, andwar, efriedma, cameron.mcinally, dancgr, rengolin

Reviewed By: cameron.mcinally

Subscribers: tschuett, kristof.beyls, hiraditya, rkruppe, psnobl, danielkiss, cfe-commits, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D76688

4 years agoRename test name, add more tests for codegenprepare
Juneyoung Lee [Wed, 25 Mar 2020 11:24:40 +0000 (20:24 +0900)]
Rename test name, add more tests for codegenprepare

4 years ago[ARM][MVE] Add HorizontalReduction flag
Sam Parker [Wed, 25 Mar 2020 11:12:03 +0000 (11:12 +0000)]
[ARM][MVE] Add HorizontalReduction flag

Add a target flag for instructions that reduce into one, or more,
scalar reg(s), including variants of:
- VADDV
- VABAV
- VMINV/VMAXV
- VMLADAV

Differential Revision: https://reviews.llvm.org/D76683

4 years ago[Sema][SVE] Allow casting SVE types to themselves in C
Richard Sandiford [Thu, 5 Mar 2020 20:33:19 +0000 (20:33 +0000)]
[Sema][SVE] Allow casting SVE types to themselves in C

Casts from an SVE type to itself aren't very useful, but they are
supposed to be valid, and could occur in things like macro expansions.

Such casts already work for C++ and are tested by sizeless-1.cpp.
This patch makes them work for C too.

Differential Revision: https://reviews.llvm.org/D76694

4 years ago[Sema][SVE] Allow ?: to select between SVE types in C
Richard Sandiford [Mon, 2 Mar 2020 18:58:03 +0000 (18:58 +0000)]
[Sema][SVE] Allow ?: to select between SVE types in C

When compiling C, a ?: between two values of the same SVE type
currently gives an error such as:

  incompatible operand types ('svint8_t' (aka '__SVInt8_t') and 'svint8_t')

It's supposed to be valid to select between (cv-qualified versions of)
the same SVE type, so this patch adds that case.

These expressions already work for C++ and are tested by
SemaCXX/sizeless-1.cpp.

Differential Revision: https://reviews.llvm.org/D76693

4 years ago[ARM,MVE] Add missing tests for vqdmlash intrinsics.
Simon Tatham [Wed, 25 Mar 2020 09:46:08 +0000 (09:46 +0000)]
[ARM,MVE] Add missing tests for vqdmlash intrinsics.

Summary:
These were accidentally left out of D76123. I added tests for the
other three instructions in this small cross-product family (vqdmlah,
vqrdmlah, vqrdmlash) but missed this one.

Reviewers: miyuki

Reviewed By: miyuki

Subscribers: kristof.beyls, dmgreen, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76714

4 years ago[clang-apply-replacements] No longer deduplucates replacements from the same TU
Nathan James [Mon, 23 Mar 2020 13:42:17 +0000 (13:42 +0000)]
[clang-apply-replacements] No longer deduplucates replacements from the same TU

Summary:
clang-apply-replacements currently deduplicates all diagnostic replacements. However if you get a duplicated replacement from one TU then its expected that it should not be deduplicated. This goes some way to solving [[ https://bugs.llvm.org/show_bug.cgi?id=45150 | export-fixes to yaml adds extra newlines and breaks offsets. ]]

Take this example yaml.
```
---
MainSourceFile:  '/home/nathan/test/test.cpp'
Diagnostics:
  - DiagnosticName:  readability-braces-around-statements
    DiagnosticMessage:
      Message:         statement should be inside braces
      FilePath:        '/home/nathan/test/test.cpp'
      FileOffset:      14
      Replacements:
        - FilePath:        '/home/nathan/test/test.cpp'
          Offset:          14
          Length:          0
          ReplacementText: ' {'
        - FilePath:        '/home/nathan/test/test.cpp'
          Offset:          28
          Length:          0
          ReplacementText: '

}'
  - DiagnosticName:  readability-braces-around-statements
    DiagnosticMessage:
      Message:         statement should be inside braces
      FilePath:        '/home/nathan/test/test.cpp'
      FileOffset:      20
      Replacements:
        - FilePath:        '/home/nathan/test/test.cpp'
          Offset:          20
          Length:          0
          ReplacementText: ' {'
        - FilePath:        '/home/nathan/test/test.cpp'
          Offset:          28
          Length:          0
          ReplacementText: '

}'
...```

The current behaviour is to deduplicate the text insertions at Offset 28 and only apply one of the replacements.
However as both of these replacements came from the same translation unit we can be confident they were both meant to be applied together
The new behaviour won't deduplicate the text insertion and instead insert both of the replacements.
If the duplicate replacement is found inside different translation units (from a header file change perhaps) then they will still be deduplicated as before.

Reviewers: aaron.ballman, gribozavr2, klimek, ymandel

Reviewed By: ymandel

Subscribers: ymandel, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76054

4 years agoAdd freeze(and x, const) case to codegenprepare's freeze-cmp.ll
Juneyoung Lee [Wed, 25 Mar 2020 08:18:19 +0000 (17:18 +0900)]
Add freeze(and x, const) case to codegenprepare's freeze-cmp.ll

4 years ago[VE] Change name of enum to CondCode
Kazushi (Jam) Marukawa [Wed, 25 Mar 2020 08:19:52 +0000 (09:19 +0100)]
[VE] Change name of enum to CondCode

Summary: Change enum name for condition codes from CondCodes to CondCode.

Reviewers: arsenm, simoll, k-ishizaka

Reviewed By: arsenm

Subscribers: wdng, hiraditya, llvm-commits

Tags: #llvm, #ve

Differential Revision: https://reviews.llvm.org/D76747

4 years ago[AST] Build recovery expressions by default for C++.
Haojian Wu [Tue, 24 Mar 2020 12:43:25 +0000 (13:43 +0100)]
[AST] Build recovery expressions by default for C++.

Update the existing tests.

Reviewers: sammccall

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D76696

4 years ago[compiler-rt] FuzzedDataProvider: make linter happy.
Max Moroz [Wed, 25 Mar 2020 07:39:17 +0000 (00:39 -0700)]
[compiler-rt] FuzzedDataProvider: make linter happy.

4 years agoMinor fixes to a comment in CodeGenPrepare
Juneyoung Lee [Wed, 25 Mar 2020 07:34:34 +0000 (16:34 +0900)]
Minor fixes to a comment in CodeGenPrepare

4 years ago[compiler-rt] Refactor FuzzedDataProvider for better readability.
Max Moroz [Thu, 19 Mar 2020 19:39:37 +0000 (12:39 -0700)]
[compiler-rt] Refactor FuzzedDataProvider for better readability.

Summary: Separate class definition and actual methods implementation. The main
goal is to keep the list of available methods in a concise readable form inside
the class definition.

Reviewers: hctim, metzman

Subscribers: dberris, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D76651

4 years ago[X86] Split masked instruction tests to enable D60940.
Craig Topper [Wed, 25 Mar 2020 02:03:36 +0000 (19:03 -0700)]
[X86] Split masked instruction tests to enable D60940.

We need to split tests that rely on isel duplicating operations
for different masking conditions. Repeating the operation is
more costly than emitting the masking separately.

The change here is a mechanical splitting of tests that
call multiple intrinsics in one function into separate
functions that call one intrinsic. We could obviously avoid
the splitting by giving the intrinsics different operands, but
that would need closer scrutiny than just splitting.

4 years ago[PowerPC] Pre-commit reduced test case for PR45297. NFC.
Kai Luo [Wed, 25 Mar 2020 06:19:59 +0000 (06:19 +0000)]
[PowerPC] Pre-commit reduced test case for PR45297. NFC.

4 years ago[libc] Generate math.h instead of the static file it is currently.
Siva Chandra Reddy [Tue, 24 Mar 2020 17:52:56 +0000 (10:52 -0700)]
[libc] Generate math.h instead of the static file it is currently.

Just enough to help a follow up patch adding cosf and sinf has been
added.

Reviewers: abrachet

Differential Revision: https://reviews.llvm.org/D76723

4 years ago[MLIR][NFC] std::is_same || -> llvm::is_one_of
Uday Bondhugula [Wed, 25 Mar 2020 02:23:05 +0000 (07:53 +0530)]
[MLIR][NFC] std::is_same || -> llvm::is_one_of

 Switch std::is_same disjunctions to llvm::is_one_of

Differential Revision: https://reviews.llvm.org/D76745

4 years ago[gn build] Port ba1f4405c68
LLVM GN Syncbot [Wed, 25 Mar 2020 03:27:56 +0000 (03:27 +0000)]
[gn build] Port ba1f4405c68