Simon Pilgrim [Mon, 3 Feb 2020 15:16:14 +0000 (15:16 +0000)]
[X86] Add some initial BEXTR combine tests
Simon Pilgrim [Mon, 3 Feb 2020 14:01:12 +0000 (14:01 +0000)]
[X86] Move BEXTR DemandedBits handling inside SimplifyDemandedBitsForTargetNode
Some prep work for PR39153.
Matt Arsenault [Mon, 3 Feb 2020 14:07:36 +0000 (09:07 -0500)]
AMDGPU: Fix extra type mangling on llvm.amdgcn.if.break
These have to be the same mask type.
Johannes Doerfert [Mon, 3 Feb 2020 14:58:24 +0000 (08:58 -0600)]
Revert "[OpenMP][OMPIRBuilder] Add Directives (master and critical) to OMPBuilder."
This reverts commit
1ca740387b9bbdc142ac81c8bdd6370a8813e328.
The bots break [0], investigation is needed.
[0] http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/22899
Saar Raz [Mon, 3 Feb 2020 13:44:33 +0000 (15:44 +0200)]
[Concepts] Instantiate invented template type parameter type-constraint along with function parameters
We previously instantiated type-constraints of template type parameters along with the type parameter itself,
this caused problems when the type-constraints created by abbreviated templates refreneced other parameters
in the abbreviated templates.
When encountering a template type parameter with a type constraint, if it is implicit, delay instantiation of
the type-constraint until the function parameter which created the invented template type parameter is
instantiated.
Reland after fixing bug caused by another flow reaching SubstParmVarDecl and instantiating the TypeConstraint
a second time.
Fady Ghanim [Mon, 3 Feb 2020 14:38:43 +0000 (08:38 -0600)]
[OpenMP][OMPIRBuilder] Add Directives (master and critical) to OMPBuilder.
Add support for Master and Critical directive in the OMPIRBuilder. Both make use of a new common interface for emitting inlined OMP regions called `emitInlinedRegion` which was added in this patch as well.
Also this patch modifies clang to use the new directives when `-fopenmp-enable-irbuilder` commandline option is passed.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D72304
John Brawn [Tue, 28 Jan 2020 14:04:09 +0000 (14:04 +0000)]
[FPEnv][AArch64] Add lowering of f128 STRICT_FSETCC
These get lowered to function calls, like the non-strict versions.
Differential Revision: https://reviews.llvm.org/D73784
Krzysztof Parzyszek [Mon, 3 Feb 2020 13:22:46 +0000 (07:22 -0600)]
[Hexagon] Rename FeatureHasPreV65 to FeaturePreV65
Sanjay Patel [Mon, 3 Feb 2020 13:55:43 +0000 (08:55 -0500)]
[InstCombine] reassociate splatted vector ops
bo (splat X), (bo Y, OtherOp) --> bo (splat (bo X, Y)), OtherOp
This patch depends on the splat analysis enhancement in D73549.
See the test with comment:
; Negative test - mismatched splat elements
...as the motivation for that first patch.
The motivating case for reassociating splatted ops is shown in PR42174:
https://bugs.llvm.org/show_bug.cgi?id=42174
In that example, a slight change in order-of-associative math results
in a big difference in IR and codegen. This patch gets all of the
unnecessary shuffles out of the way, but doesn't address the potential
scalarization (see D50992 or D73480 for that).
Differential Revision: https://reviews.llvm.org/D73703
Saar Raz [Mon, 3 Feb 2020 14:04:48 +0000 (16:04 +0200)]
Revert "[Concepts] Instantiate invented template type parameter type-constraint along with function parameters"
This temporarily reverts commit
eacca4824463d8b96e2e1c9f8bbf886055218a16, which caused some test failures.
Raphael Isemann [Mon, 3 Feb 2020 13:22:24 +0000 (14:22 +0100)]
Reland "[lldb] Increase the rate at which ConstString's memory allocator scales the memory chunks it allocates""
The parent revision is now passing the sanitizer bots and landed as
46e5603c8a08de6c5983ed7eb4f12828bbfcbd78,
so this can now actually land.
Saar Raz [Mon, 3 Feb 2020 13:44:33 +0000 (15:44 +0200)]
[Concepts] Instantiate invented template type parameter type-constraint along with function parameters
We previously instantiated type-constraints of template type parameters along with the type parameter itself,
this caused problems when the type-constraints created by abbreviated templates refreneced other parameters
in the abbreviated templates.
When encountering a template type parameter with a type constraint, if it is implicit, delay instantiation of
the type-constraint until the function parameter which created the invented template type parameter is
instantiated.
Matt Arsenault [Sat, 1 Feb 2020 16:19:38 +0000 (11:19 -0500)]
AMDGPU/GlobalISel: Reduce indentation
Matt Arsenault [Mon, 3 Feb 2020 01:15:54 +0000 (20:15 -0500)]
AMDGPU/GlobalISel: Fix mem size in test
This wasn't intended to tests an extload.
Simon Moll [Mon, 3 Feb 2020 13:25:49 +0000 (14:25 +0100)]
[NFC][VE] format VEInstrInfo
Simon Moll [Mon, 3 Feb 2020 13:22:06 +0000 (14:22 +0100)]
[NFC] unsigned->Register in storeRegTo/loadRegFromStack
Summary:
This patch makes progress on the 'unsigned -> Register' rewrite for
`TargetInstrInfo::loadRegFromStack` and `TII::storeRegToStack`.
Reviewers: arsenm, craig.topper, uweigand, jpienaar, atanasyan, venkatra, robertlytton, dylanmckay, t.p.northover, kparzysz, tstellar, k-ishizaka
Reviewed By: arsenm
Subscribers: wuzish, merge_guards_bot, jyknight, sdardis, nemanjai, jvesely, wdng, nhaehnle, hiraditya, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73870
Guillaume Chatelet [Mon, 3 Feb 2020 12:09:53 +0000 (13:09 +0100)]
[Alignment][NFC] Use Align for code creating MemOp
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73874
John Brawn [Wed, 22 Jan 2020 14:04:12 +0000 (14:04 +0000)]
[FPEnv][ARM] Add lowering of STRICT_FSETCC and STRICT_FSETCCS
These can be lowered to code sequences using CMPFP and CMPFPE which then get
selected to VCMP and VCMPE. The implementation isn't fully correct, as the chain
operand isn't handled correctly, but resolving that looks like it would involve
changes around FPSCR-handling instructions and how the FPSCR is modelled.
The fp-intrinsics test was already testing some of this but as the entire test
was being XFAILed it wasn't noticed. Un-XFAIL the test and instead leave the
cases where we aren't generating the right instruction sequences as FIXME.
Differential Revision: https://reviews.llvm.org/D73194
Karasev Nikita [Mon, 3 Feb 2020 12:53:08 +0000 (07:53 -0500)]
Allow modernize-use-using to apply to enumerations as well.
This addresses PR44528.
Alex Zinenko [Mon, 3 Feb 2020 12:49:21 +0000 (13:49 +0100)]
[mlir] ConvertStandardToLLVM: do not rely on command line options internally
The patterns for converting `std.alloc` and `std.dealoc` can be configured to
use `llvm.alloca` instead of calling `malloc` and `free`. This configuration
has been only possible through a command-line flag, despite the presence of a
(misleading) parameter in the pass constructor. Use the parameter instead and
only initalize it from the command line flags if the pass is constructed from
the mlir-opt registration.
Haojian Wu [Mon, 3 Feb 2020 12:43:26 +0000 (13:43 +0100)]
[clang] Add a missing change of
bdbdf748225525bb18cd0ffeb51c3e713f7b8e1b, fix the buildbot.
Raphael Isemann [Mon, 3 Feb 2020 12:32:52 +0000 (13:32 +0100)]
[lldb] Make the order in which ClusterManager calls destructors deterministic
Summary:
ClusterManager is using a SmallPtrSet to store the objects in it. We always only add every object once so using a set is not necessary.
Furthermore having a set means that iterating over it is nondeterministic (at least with more than 16 objects in it), so the order in
which the destructors for the managed objects are called is currently also non-deterministic.
This just replaces the SmallPtrSet with a SmallVector.
Reviewers: labath, JDevlieghere
Reviewed By: labath
Subscribers: mgrang, abidh, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D73871
Alex Zinenko [Fri, 31 Jan 2020 18:52:40 +0000 (19:52 +0100)]
[mlir] Drop customization hooks from StandardToLLVM conversion
Summary:
These hooks were originally introduced to support passes deriving the
StandardToLLVM conversion, in particular converting types from different
dialects to LLVM types in a single-step conversion. They are no longer in use
since the pass and conversion infrastructure has evolved sufficiently to make
defining new passes with exactly the same functionality simple through the use
of populate* functions, conversion targets and type converters. Remove the
hooks. Any users of this hooks can call the dialect conversion infrastructure
directly instead, which is likely to require less LoC than these hooks.
Differential Revision: https://reviews.llvm.org/D73795
James Henderson [Fri, 31 Jan 2020 10:51:10 +0000 (10:51 +0000)]
[DebugInfo][test] Adjust line table unit length to account for contents
Previously, if a debug line Prologue was created via
createBasicPrologue, its TotalLength field did not account for any
contents in the table itself. This change fixes this issue.
Reviewed by: probinson
Differential Revision: https://reviews.llvm.org/D73772
Marius Brehler [Mon, 3 Feb 2020 12:00:04 +0000 (13:00 +0100)]
[mlir] Fix link to 'Getting started with MLIR'
The link in the toy example pointed to the 'tensorflow/mlir' repo and is
replaced with https://mlir.llvm.org.
Differential Revision: https://reviews.llvm.org/D73770
Simon Tatham [Mon, 3 Feb 2020 09:35:36 +0000 (09:35 +0000)]
[ARM,MVE] Fix vreinterpretq in big-endian mode.
Summary:
In big-endian MVE, the simple vector load/store instructions (i.e.
both contiguous and non-widening) don't all store the bytes of a
register to memory in the same order: it matters whether you did a
VSTRB.8, VSTRH.16 or VSTRW.32. Put another way, the in-register
formats of different vector types relate to each other in a different
way from the in-memory formats.
So, if you want to 'bitcast' or 'reinterpret' one vector type as
another, you have to carefully specify which you mean: did you want to
reinterpret the //register// format of one type as that of the other,
or the //memory// format?
The ACLE `vreinterpretq` intrinsics are specified to reinterpret the
register format. But I had implemented them as LLVM IR bitcast, which
is specified for all types as a reinterpretation of the memory format.
So a `vreinterpretq` intrinsic, applied to values already in registers,
would code-generate incorrectly if compiled big-endian: instead of
emitting no code, it would emit a `vrev`.
To fix this, I've introduced a new IR intrinsic to perform a
register-format reinterpretation: `@llvm.arm.mve.vreinterpretq`. It's
implemented by a trivial isel pattern that expects the input in an
MQPR register, and just returns it unchanged.
In the clang codegen, I only emit this new intrinsic where it's
actually needed: I prefer a bitcast wherever it will have the right
effect, because LLVM understands bitcasts better. So we still generate
bitcasts in little-endian mode, and even in big-endian when you're
casting between two vector types with the same lane size.
For testing, I've moved all the codegen tests of vreinterpretq out
into their own file, so that they can have a different set of RUN
lines to check both big- and little-endian.
Reviewers: dmgreen, MarkMurrayARM, miyuki, ostannard
Reviewed By: dmgreen
Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D73786
Simon Tatham [Fri, 31 Jan 2020 10:53:31 +0000 (10:53 +0000)]
[ARM,MVE] Add intrinsics for v[id]dupq and v[id]wdupq.
Summary:
These instructions generate a vector of consecutive elements starting
from a given base value and incrementing by 1, 2, 4 or 8. The `wdup`
versions also wrap the values back to zero when they reach a given
limit value. The instruction updates the scalar base register so that
another use of the same instruction will continue the sequence from
where the previous one left off.
At the IR level, I've represented these instructions as a family of
target-specific intrinsics with two return values (the constructed
vector and the updated base). The user-facing ACLE API provides a set
of intrinsics that throw away the written-back base and another set
that receive it as a pointer so they can update it, plus the usual
predicated versions.
Because the intrinsics return two values (as do the underlying
instructions), the isel has to be done in C++.
This is the first family of MVE intrinsics that use the `imm_1248`
immediate type in the clang Tablegen framework, so naturally, I found
I'd given it the wrong C integer type. Also added some tests of the
check that the immediate has a legal value, because this is the first
time those particular checks have been exercised.
Finally, I also had to fix a bug in MveEmitter which failed an
assertion when I nested two `seq` nodes (the inner one used to extract
the two values from the pair returned by the IR intrinsic, and the
outer one put on by the predication multiclass).
Reviewers: dmgreen, MarkMurrayARM, miyuki, ostannard
Reviewed By: dmgreen
Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D73357
Simon Tatham [Fri, 31 Jan 2020 10:53:11 +0000 (10:53 +0000)]
[ARM,MVE] Add intrinsics for vdupq.
Summary:
The unpredicated case of this is trivial: the clang codegen just makes
a vector splat of the input, and LLVM isel is already prepared to
handle that. For the predicated version, I've generated a `select`
between the same vector splat and the `inactive` input parameter, and
added new Tablegen isel rules to match that pattern into a predicated
`MVE_VDUP` instruction.
Reviewers: dmgreen, MarkMurrayARM, miyuki, ostannard
Reviewed By: dmgreen
Subscribers: kristof.beyls, hiraditya, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D73356
Haojian Wu [Mon, 3 Feb 2020 11:10:56 +0000 (12:10 +0100)]
[clang][AST] Add an AST matcher for deducedTemplateSpeializationType.
Summary:
misc-unused-using clang-tidy check needs this matcher to fix a false
positive of C++17 deduced class template types.
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73869
Simon Pilgrim [Mon, 3 Feb 2020 11:08:48 +0000 (11:08 +0000)]
Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.
Raphael Isemann [Mon, 3 Feb 2020 10:13:51 +0000 (11:13 +0100)]
Reland "[llvm] Add a way to speed up the speed in which BumpPtrAllocator increases slab sizes""
Disable the red zone in the unit test allocator to fix the test errors in sanitizer builds.
The red zone changed the amount of allocated bytes which made the test fail as it
checked the number of allocated bytes of the allocator.
Martin Storsjö [Sat, 1 Feb 2020 20:45:28 +0000 (22:45 +0200)]
[LLDB] Add missing declarations for linking to psapi
This fixes building for mingw with BUILD_SHARED_LIBS. In static builds,
the psapi dependency gets linked in transitively from Support, but
when linking Support dynamically, it's revealed that these components
also need linking against psapi.
Differential Revision: https://reviews.llvm.org/D73839
Clement Courbet [Fri, 24 Jan 2020 11:51:39 +0000 (12:51 +0100)]
[llvm-exegesis] Restrict the range of allowable rounding countrols.
Summary:
It turns out that CUR_DIRECTION is just an internal placeholder, not an actual
valid encoded value.
Reviewers: gchatelet
Subscribers: tschuett, mstojanovic, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73343
Alexander Belyaev [Fri, 31 Jan 2020 10:34:15 +0000 (11:34 +0100)]
[MLIR][Linalg] Lower linalg.generic to ploops.
Differential Revision: https://reviews.llvm.org/D73684
Dmitri Gribenko [Mon, 3 Feb 2020 10:49:11 +0000 (11:49 +0100)]
Fixed a -Wunused-variable warning in no-assertion builds
Hans Wennborg [Mon, 3 Feb 2020 10:34:36 +0000 (11:34 +0100)]
Make quick-append.test resilient to running in paths with '1.o' in the name
Sam McCall [Mon, 3 Feb 2020 10:31:51 +0000 (11:31 +0100)]
[clangd] TUScheduler::run() (i.e. workspace/symbol) counts towards concurrent threads
This seems to just be an oversight.
Sam McCall [Mon, 3 Feb 2020 10:18:13 +0000 (11:18 +0100)]
[clangd] Refactor TUScheduler options into a struct. NFC
Raphael Isemann [Mon, 3 Feb 2020 10:10:50 +0000 (11:10 +0100)]
Revert "[llvm] Add a way to speed up the speed in which BumpPtrAllocator increases slab sizes"
This reverts commit
b848b510a8d52dbf50ee53a9a1ce844abb60d9bd as the unit tests
fail on the sanitizer bots:
/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/unittests/Support/AllocatorTest.cpp:145: Failure
Expected: SlabSize
Which is: 4096
To be equal to: Alloc.getTotalMemory()
Which is: 4097
Raphael Isemann [Mon, 3 Feb 2020 10:09:36 +0000 (11:09 +0100)]
Revert "[lldb] Increase the rate at which ConstString's memory allocator scales the memory chunks it allocates"
This reverts commit
500c324fa13eec2b171f4ea4dbed2ac1251f5aae because its parent commit
b848b510a8d52dbf50ee53a9a1ce844abb60d9bd is failing on the sanitizer bots.
Sergej Jaskiewicz [Fri, 31 Jan 2020 11:35:43 +0000 (14:35 +0300)]
Revert "[libcxx] Force-cache LIBCXX_CXX_ABI_LIBRARY_PATH"
This reverts commit
41f4dfd63ea0fe995ddfba1838aa5ed972cc1377.
It broke standalone libc++ builds, which now try to use libc++abi from the wrong directory, instead of system instance.
(cherry picked from commit
3573526c0286c9461f0459be1a4592b2214594e7)
Guillaume Chatelet [Fri, 31 Jan 2020 17:30:38 +0000 (18:30 +0100)]
Fix broken invariant
Summary:
A Copy with a source that is zeros is the same as a Set of zeros.
This fixes the invariant that SrcAlign should always be non-null.
Reviewers: courbet
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73791
Raphael Isemann [Mon, 3 Feb 2020 08:12:38 +0000 (09:12 +0100)]
[lldb] Increase the rate at which ConstString's memory allocator scales the memory chunks it allocates
Summary:
We currently do far more malloc calls than necessary in the ConstString BumpPtrAllocator. This is due to the 256 BumpPtrAllocators
our ConstString implementation uses internally which end up all just receiving a small share of the total allocated memory
and therefore keep allocating memory in small chunks for far too long. This patch fixes this by increasing the rate at which we increase the
memory chunk size so that our collection of BumpPtrAllocators behaves in total similar to a single BumpPtrAllocator.
Reviewers: llunak
Reviewed By: llunak
Subscribers: abidh, JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71699
Clement Courbet [Tue, 31 Dec 2019 10:28:40 +0000 (11:28 +0100)]
[llvm-exegesis] Add pfm counters for Zen2 (znver2).
Summary: There are no counters for individual ports, but this is already
enough to find a lot of issues in the current model (upcoming patch).
Reviewers: dblaikie, gchatelet
Subscribers: hiraditya, tschuett, RKSimon, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72032
Jay Foad [Fri, 31 Jan 2020 10:42:20 +0000 (10:42 +0000)]
[AMDGPU] Don't remove short branches over kills
Summary:
D68092 introduced a new SIRemoveShortExecBranches optimization pass and
broke some graphics shaders. The problem is that it was removing
branches over KILL pseudo instructions, and the fix is to explicitly
check for that in mustRetainExeczBranch.
Reviewers: critson, arsenm, nhaehnle, cdevadas, hakzsam
Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73771
Stephan Herhut [Fri, 31 Jan 2020 09:29:29 +0000 (10:29 +0100)]
[MLIR] Make gpu.launch implicitly capture uses of values defined above.
Summary:
In the original design, gpu.launch required explicit capture of uses
and passing them as operands to the gpu.launch operation. This was
motivated by infrastructure restrictions rather than design. This
change lifts the requirement and removes the concept of kernel
arguments from gpu.launch. Instead, the kernel outlining
transformation now does the explicit capturing.
This is a breaking change for users of gpu.launch.
Differential Revision: https://reviews.llvm.org/D73769
Sam Parker [Mon, 3 Feb 2020 08:02:12 +0000 (08:02 +0000)]
[JumpThreading] Half the duplicate threshold at Oz
Duplicating instructions can lead to code size increases but using
a threshold of 3 is good for reducing code size.
Differential Revision: https://reviews.llvm.org/D72916
Kazuaki Ishizaki [Sun, 26 Jan 2020 15:13:26 +0000 (00:13 +0900)]
[mlir] NFC: Fix trivial typo in comment
Summary: Also, an exercise to merge this into the master myself after a reviewer gives LGTM.
Reviewers: nicolasvasilache, mehdi_amini
Reviewed By: mehdi_amini
Subscribers: Joonsoo, merge_guards_bot, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, liufengdb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73432
Raphael Isemann [Mon, 3 Feb 2020 07:37:12 +0000 (08:37 +0100)]
[llvm] Add a way to speed up the speed in which BumpPtrAllocator increases slab sizes
Summary:
In D68549 we noticed that our BumpPtrAllocator we use for LLDB's ConstString implementation is growing its slabs at
a rate that is too slow for our use case. It causes that we spend a lot of time calling `malloc` for all the tiny slabs that our
ConstString BumpPtrAllocators create. We also can't just increase the slab size in the ConstString implementation
(which is what D68549 originally did) as this really increased the amount of (mostly unused) allocated memory
in any process using ConstString.
This patch adds a template argument for the BumpPtrAllocatorImpl that allows specifying a faster rate at which the
BumpPtrAllocator increases the slab size. This allows LLDB to specify a faster rate at which the slabs grow which
should keep both memory consumption and time spent calling malloc low.
Reviewers: george.karpenkov, chandlerc, NoQ
Subscribers: NoQ, llvm-commits, llunak
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71654
Martin Storsjö [Mon, 3 Feb 2020 07:47:46 +0000 (09:47 +0200)]
[PM][CGSCC] Add parentheses to avoid a GCC warning. NFC.
This avoids a warning about "suggest parentheses around && within ||".
Martin Storsjö [Sat, 1 Feb 2020 11:32:57 +0000 (13:32 +0200)]
[libcxxabi] Fix layout of __cxa_exception for win64
Win64 isn't LP64, it's LLP64, but there's no __LLP64__ predefined -
just check _WIN64 in addition to __LP64__.
This fixes compilation after static asserts about the struct layout
were added in
f2a436058fcbc11291e73badb44e243f61046183.
Differential Revision: https://reviews.llvm.org/D73838
Martin Storsjö [Mon, 3 Feb 2020 07:45:03 +0000 (09:45 +0200)]
[OpenMP] Fix GCC warnings. NFC.
Remove an extra semicolon, and add llvm_unreachable to avoid warnings
about control reaching the end of a non-void function.
Martin Storsjö [Mon, 3 Feb 2020 07:44:31 +0000 (09:44 +0200)]
[LLDB] Fix GCC warnings about extra semicolon. NFC.
Martin Probst [Fri, 31 Jan 2020 09:23:02 +0000 (10:23 +0100)]
clang-format: [JS] document InsertTrailingCommas.
Summary: In release notes and the regular docs.
Reviewers: MyDeveloperDay
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73768
Johannes Doerfert [Mon, 3 Feb 2020 06:45:48 +0000 (00:45 -0600)]
[Attributor][FIX] Try to resolve non-determinism problem for now
There seems to be another instance of non-determinism which causes the
number of iterations to be either 1 or 3 for one benchmark, depending
on the system. This needs to be investigated and resolved. In the
meantime we do not verify the number of iterations for this benchmark.
Johannes Doerfert [Mon, 30 Dec 2019 22:15:38 +0000 (16:15 -0600)]
[Attributor] AANoRecurse check all call sites for `norecurse`
If all call sites are in `norecurse` functions we can derive `norecurse`
as the ReversePostOrderFunctionAttrsPass does. This should make
ReversePostOrderFunctionAttrsLegacyPass obsolete once the Attributor is
enabled.
Reviewed By: uenoku
Differential Revision: https://reviews.llvm.org/D72017
Johannes Doerfert [Mon, 30 Dec 2019 22:12:36 +0000 (16:12 -0600)]
[Attributor] Propagate known information from `checkForAllCallSites`
If we know that all call sites have been processed we can derive an
early fixpoint. The use in this patch is likely not to trigger right now
but a follow up patch will make use of it.
Reviewed By: uenoku, baziotis
Differential Revision: https://reviews.llvm.org/D72016
Fangrui Song [Mon, 3 Feb 2020 05:44:01 +0000 (21:44 -0800)]
[Driver][test] Change %itanium_abi_triple to generic ELF
x86_64-windows and darwin default to PIC. They don't use PIE.
Igor Kudrin [Fri, 31 Jan 2020 10:56:15 +0000 (17:56 +0700)]
[DebugInfo] Remove an unused method DWARFUnit::getDWARF5HeaderSize(). NFC.
The method was initially added for DWARFVerifier::verifyUnitHeader() but
its results were never actually used.
Differential Revision: https://reviews.llvm.org/D73773
Craig Topper [Mon, 3 Feb 2020 05:27:43 +0000 (21:27 -0800)]
[X86] Remove a couple unnecessary calls to ConvertCmpIfNecessary.
We only need to call this on floating point comparisons. In this
case these are known to be integer compares. One of them even
has a SUB opcode instead of CMP.
Johannes Doerfert [Mon, 30 Dec 2019 23:02:09 +0000 (17:02 -0600)]
[PM][CGSCC] Add a helper to update the call graph from SCC passes
With this patch new trivial edges can be added to an SCC in a CGSCC
pass via the updateCGAndAnalysisManagerForCGSCCPass method. It shares
almost all the code with the existing
updateCGAndAnalysisManagerForFunctionPass method but it implements the
first step towards the TODOs.
This was initially part of D70927.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D72025
Juneyoung Lee [Sat, 1 Feb 2020 17:34:10 +0000 (02:34 +0900)]
[llvm-extract] Add -keep-const-init commandline option
Summary:
This adds -keep-const-init option to llvm-extract which preserves initializers of
used global constants.
For example:
```
$ cat a.ll
@g = constant i32 0
define i32 @f() {
%v = load i32, i32* @g
ret i32 %v
}
$ llvm-extract --func=f a.ll -S -o -
@g = external constant i32
define i32 @f() { .. }
$ llvm-extract --func=f a.ll -keep-const-init -S -o -
@g = constant i32 0
define i32 @f() { .. }
```
This option is useful in checking whether a function that uses a constant global is optimized correctly.
Reviewers: jsji, MaskRay, david2050
Reviewed By: MaskRay
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73833
LLVM GN Syncbot [Mon, 3 Feb 2020 05:24:55 +0000 (05:24 +0000)]
[gn build] Port
c953409ff89
Johannes Doerfert [Tue, 28 Jan 2020 06:20:03 +0000 (00:20 -0600)]
[Inliner][NoAlias] Use call site attributes too
If we had `noalias` on an argument the inliner created alias scope
metadata already. However, the call site `noalias` annotation was not
considered. Since the Attributor can derive such call site `noalias`
annotation we should treat them the same as argument annotations.
Reviewed By: hfinkel
Differential Revision: https://reviews.llvm.org/D73528
Johannes Doerfert [Mon, 23 Dec 2019 21:50:27 +0000 (15:50 -0600)]
[OpenMP][Part 1] Reusable OpenMP context/traits handling
This is the first of multiple parts to make OpenMP context/trait
handling reusable and generic. This patch was originally part of D71830
but with the unit tests it can be tested independently.
This patch implements an almost complete handling of OpenMP
contexts/traits such that we can reuse most of the logic in Flang
through the OMPContext.{h,cpp} in llvm/Frontend/OpenMP.
All but construct SIMD specifiers, e.g., inbranch, and the device ISA
selector are define in llvm/lib/Frontend/OpenMP/OMPKinds.def. From
these definitions we generate the enum classes TraitSet,
TraitSelector, and TraitProperty as well as conversion and helper
functions in llvm/lib/Frontend/OpenMP/OMPContext.{h,cpp}.
The OpenMP context is now an explicit object (see `struct OMPContext`).
This is in anticipation of construct traits that need to be tracked. The
OpenMP context, as well as the VariantMatchInfo, are basically made up
of a set of active or respectively required traits, e.g., 'host', and an
ordered container of constructs which allows duplication. Matching and
scoring is kept as generic as possible to allow easy extension in the
future.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D71847
Fangrui Song [Mon, 3 Feb 2020 04:55:24 +0000 (20:55 -0800)]
[Driver] Fix fsemantic-interposition.c for Windows and Darwin
Fangrui Song [Mon, 3 Feb 2020 03:30:39 +0000 (19:30 -0800)]
[Driver] Move -fsemantic-interposition decision from cc1 to driver
And add test/Driver/fsemantic-interposition.c
Shengchen Kan [Mon, 3 Feb 2020 04:31:42 +0000 (12:31 +0800)]
[NFC] Fix helptext for opt/llc after https://reviews.llvm.org/D68411
Remove "cl::value_desc("jcc, fused, jmp, call, ret, indirect"),", which
makes the option+it's cl::value_desc too long in all of help.
Saleem Abdulrasool [Mon, 3 Feb 2020 00:18:00 +0000 (16:18 -0800)]
build: attempt to repair the build
The change in
9b84dabc5f36f7e027c62b5c00ea97e21cfcacdd uses a newer
syntax which not all the builders support. Use an explicit `OR` over
the languages instead to repair the builders.
Nathan James [Sun, 2 Feb 2020 21:51:34 +0000 (21:51 +0000)]
Fixed typo in CTE release notes failing build
Nathan James [Sun, 2 Feb 2020 21:27:04 +0000 (21:27 +0000)]
[clang-tidy] Added option for disabling const qualifiers in readability-qualified-auto
Summary: Adds an option called `AddConstToQualified` to readability-qualified-auto to toggle adding const to the auto typed pointers and references. By default its enabled but in the LLVM module its disabled.
Reviewers: aaron.ballman, alexfh, JonasToth, hokein, sammccall
Reviewed By: aaron.ballman
Subscribers: Quuxplusone, merge_guards_bot, lebedev.ri, xazax.hun, cfe-commits
Tags: #clang, #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D73548
Nathan James [Sun, 2 Feb 2020 21:26:04 +0000 (21:26 +0000)]
[clang-tidy] Fix false positive for cppcoreguidelines-init-variables
Summary: Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=44746 | False positive for cppcoreguidelines-init-variables in range based for loop in template function ]]
Reviewers: aaron.ballman, alexfh, hokein, JonasToth, gribozavr2
Reviewed By: aaron.ballman
Subscribers: merge_guards_bot, xazax.hun, wuzish, nemanjai, kbarton, cfe-commits
Tags: #clang, #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D73843
Craig Topper [Sun, 2 Feb 2020 21:23:35 +0000 (13:23 -0800)]
[X86] Use MVT::f80 for the result type of the FLD used to convert from SSE register to X87 register in FP_TO_INTHelper.
Saleem Abdulrasool [Sun, 2 Feb 2020 18:49:03 +0000 (10:49 -0800)]
build: only pass -UNDEBUG when compiling C/C++
This patch limits adding -UNDEBUG to C and C++ files so that projects
can include files compiled with compilers that don't recognize this
argument (Swift e.g.).
add_definitions does not expand generators, hence the change from
add_definitions to add_compile_options.
Patch by Evan Wilde!
Nicolas Vasilache [Sun, 2 Feb 2020 15:21:34 +0000 (10:21 -0500)]
[mlir][Linalg][doc] Add Design Document for the Linalg Dialect
Summary: This revision adds a Rationale for the Linalg Dialect
Reviewers: rriddle, mehdi_amini, ftynse, albertcohen
Reviewed By: albertcohen
Subscribers: merge_guards_bot, jfb, jpienaar, burmako, shauheen, antiagainst, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73595
Nicolas Vasilache [Sun, 2 Feb 2020 15:21:02 +0000 (10:21 -0500)]
Revert "[mlir][Linalg][doc] Add Design Document for the Linalg Dialect"
This reverts commit
1d58a7c82f77154bf56a51a5f248ef5d0a9bb4a8.
Craig Topper [Sun, 2 Feb 2020 18:24:35 +0000 (10:24 -0800)]
[X86] Cleanup the lrint/llrint/lround/llround tests a bit.
We don't need tests for truncating the result. There's nothing
special about those truncates.
We can test llrint/llround for 64-bit and 32-bit targets in the same file.
Same with lrint/lround with i32 result result. lrint/lround with
64-bit result should only occur on a 64-bit target.
Add some missing tests for f80 conversions.
LLVM GN Syncbot [Sun, 2 Feb 2020 18:45:50 +0000 (18:45 +0000)]
[gn build] Port
a7bbe45a3e2
Tyker [Sun, 2 Feb 2020 13:46:59 +0000 (14:46 +0100)]
Build assume from call
Fix attempt
this is part of the implementation of http://lists.llvm.org/pipermail/llvm-dev/2019-December/137632.html
this patch gives the basis of building an assume to preserve all information from an instruction and add support for building an assume that preserve the information from a call.
Fangrui Song [Sun, 2 Feb 2020 18:40:23 +0000 (10:40 -0800)]
[test] More tests to target specific directories after CodeGenPrepare requires TargetPassConfig (D73754)
Simon Pilgrim [Sun, 2 Feb 2020 18:27:16 +0000 (18:27 +0000)]
Regenerate bitcast test for upcoming patch.
Simon Pilgrim [Sun, 2 Feb 2020 18:15:44 +0000 (18:15 +0000)]
Fix a few spelling mistakes in comments. NFCI.
Fangrui Song [Sun, 2 Feb 2020 18:05:42 +0000 (10:05 -0800)]
[gn build] Delete stale AttributesCompatFunc after D72455/
cfe87a4a16b73652dc06f9fa334137656991f13f
Simon Pilgrim [Sun, 2 Feb 2020 17:59:45 +0000 (17:59 +0000)]
[X86][SSE] Add bitcast <128 x i1> %1 to <2 x i64> test case
Simon Pilgrim [Sun, 2 Feb 2020 17:57:15 +0000 (17:57 +0000)]
[X86][SSE] combineBitcastvxi1 - add pre-AVX512 v64i1 handling
Fangrui Song [Sun, 2 Feb 2020 17:53:17 +0000 (09:53 -0800)]
[CodeGenPrepare][test] Add REQUIRES to two tests after D73754
Fangrui Song [Sun, 2 Feb 2020 17:45:48 +0000 (09:45 -0800)]
[CodeGenPrepare] Delete dead !DL check
Follow-up for D73754
DL is assigned in CodeGenPrepare::runOnFunction and is guaranteed to be
non-null.
Tyker [Sun, 2 Feb 2020 17:34:09 +0000 (18:34 +0100)]
Revert "[WIP] Build assume from call"
casued buildbot failure
This reverts commit
8ebe001553d0c204cc41f3dbc595031828b1f140.
Fangrui Song [Fri, 31 Jan 2020 00:17:43 +0000 (16:17 -0800)]
[CodeGenPrepare] Make TargetPassConfig required
The code paths in the absence of TargetMachine, TargetLowering or
TargetRegisterInfo are poorly tested. As rL285987 said, requiring
TargetPassConfig allows us to delete many (untested) checks littered
everywhere.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D73754
Tyker [Sun, 2 Feb 2020 13:46:59 +0000 (14:46 +0100)]
[WIP] Build assume from call
Summary:
this is part of the implementation of http://lists.llvm.org/pipermail/llvm-dev/2019-December/137632.html
this patch gives the basis of building an assume to preserve all information from an instruction and add support for building an assume that preserve the information from a call.
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: mgrang, fhahn, mgorny, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72475
Tyker [Sun, 2 Feb 2020 17:09:06 +0000 (18:09 +0100)]
Revert "[WIP] Build assume from call"
caused build bot failure
This reverts commit
780d2c532fe5ca4a368c5e631197a839e03a3cc4.
Tyker [Sun, 2 Feb 2020 13:46:59 +0000 (14:46 +0100)]
[WIP] Build assume from call
Summary:
this is part of the implementation of http://lists.llvm.org/pipermail/llvm-dev/2019-December/137632.html
this patch gives the basis of building an assume to preserve all information from an instruction and add support for building an assume that preserve the information from a call.
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: mgrang, fhahn, mgorny, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72475
Tyker [Sun, 2 Feb 2020 16:49:23 +0000 (17:49 +0100)]
Revert "[WIP] Build assume from call"
This reverts commit
355e4bfd7890e50b492b2dc29f70fc41ad8f867f.
Tyker [Sun, 2 Feb 2020 13:46:59 +0000 (14:46 +0100)]
[WIP] Build assume from call
Summary:
this is part of the implementation of http://lists.llvm.org/pipermail/llvm-dev/2019-December/137632.html
this patch gives the basis of building an assume to preserve all information from an instruction and add support for building an assume that preserve the information from a call.
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: mgrang, fhahn, mgorny, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72475
Sanjay Patel [Sun, 2 Feb 2020 14:16:42 +0000 (09:16 -0500)]
[Analysis] add optional index parameter to isSplatValue()
We want to allow splat value transforms to improve PR44588 and related bugs:
https://bugs.llvm.org/show_bug.cgi?id=44588
...but to do that, we need to know if values are splatted from the same,
specific index (lane) rather than splatted from an arbitrary index.
We can improve the undef handling with 1-liner follow-ups because the
Constant API optionally allow undefs now.
Differential Revision: https://reviews.llvm.org/D73549
Aaron Puchert [Sun, 2 Feb 2020 15:22:58 +0000 (16:22 +0100)]
Remove superfluous space from -Wrange-loop-construct message
Tyker [Sun, 2 Feb 2020 13:46:50 +0000 (14:46 +0100)]
[NFC] Refactor TableGen for attributes
Summary:
this patch makes tablegen generate llvm attributes in a more generic and simpler (at least to me).
changes: make tablegen generate
...
ATTRIBUTE_ENUM(Alignment,align)
ATTRIBUTE_ENUM(AllocSize,allocsize)
...
which can be used to generate most of what was previously used and more.
Tablegen was also generating attributes from 2 identical files leading to identical output. so I removed one of them and made user use the other.
Reviewers: jdoerfert, thakis, aaron.ballman
Reviewed By: aaron.ballman
Subscribers: mgorny, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72455
Tyker [Sun, 2 Feb 2020 14:03:37 +0000 (15:03 +0100)]
Revert "[NFC] Refactor TableGen for attributes"
This reverts commit
4dba14cf37abda16ab33cb748a5c762dae2e95e9.
Tyker [Sun, 2 Feb 2020 14:03:22 +0000 (15:03 +0100)]
Revert "[WIP] Build assume from call"
This reverts commit
2ff5602cb52969d3273062f36340fe95ac4e82da.
Nathan James [Sun, 2 Feb 2020 14:04:25 +0000 (14:04 +0000)]
[clang-tidy] Fixed crash 44745 in readability-else-after-return
Summary: Fixes [[ https://bugs.llvm.org/show_bug.cgi?id=44745 | readability-else-after-return crashes ]]
Reviewers: aaron.ballman, alexfh, hokein, JonasToth, gribozavr2
Reviewed By: alexfh
Subscribers: merge_guards_bot, xazax.hun, cfe-commits
Tags: #clang, #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D73841