Kadir Cetinkaya [Tue, 21 Apr 2020 09:52:28 +0000 (11:52 +0200)]
[clangd] Change field name to prevent shadowing
Pierre Oechsel [Tue, 21 Apr 2020 09:43:28 +0000 (11:43 +0200)]
[mlir] [linalg] Only promote selected buffers.
The promotion transformation is promoting all input and output buffers of the transformed op. The user might want to only promote some of these buffers.
Differential Revision: https://reviews.llvm.org/D78498
Kazushi (Jam) Marukawa [Tue, 21 Apr 2020 09:42:03 +0000 (11:42 +0200)]
[VE] Create a TargetInfo header. NFC
Summary:
Move the declarations of getThe<Name>Target() functions into a new header in
TargetInfo and make users of these functions include this new header in
order to follow other architectures.
Differential Revision: https://reviews.llvm.org/D78543
Kadir Cetinkaya [Tue, 21 Apr 2020 08:55:52 +0000 (10:55 +0200)]
[clangd] Fix windows buildbots for #import statements
Haojian Wu [Tue, 21 Apr 2020 07:57:06 +0000 (09:57 +0200)]
[AST] dont invaliate VarDecl when the initializer contains errors.
Summary:
This patch contains 2 separate changes:
1) the initializer of a variable should play no part in decl "invalid" bit;
2) preserve the invalid initializer via recovery exprs;
With 1), we will regress the diagnostics (one big regression is that we loose
the "selected 'begin' function with iterator type" diagnostic in for-range stmt;
but with 2) together, we don't have regressions (the new diagnostics seems to be
improved).
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D78116
Sander de Smalen [Mon, 20 Apr 2020 20:24:38 +0000 (21:24 +0100)]
[SVEIntrinsicOpts] NFC: Remove unused isReinterpretFromBool for no-assert builds
isReinterpretFromBool's only use is in an assert, which causes a warning that the
function is defined but not used in no-assert builds.
LLVM GN Syncbot [Tue, 21 Apr 2020 08:34:22 +0000 (08:34 +0000)]
[gn build] Port
2214b9076f1
Kadir Cetinkaya [Thu, 2 Apr 2020 08:53:23 +0000 (10:53 +0200)]
[clangd] Make signatureHelp work with stale preambles
Summary:
This is achieved by calculating newly added includes and implicitly
parsing them as if they were part of the main file.
This also gets rid of the need for consistent preamble reads.
Reviewers: sammccall
Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, mgrang, arphaman, jfb, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D77392
Kadir Cetinkaya [Wed, 15 Apr 2020 20:00:19 +0000 (22:00 +0200)]
[clangd] Store ppdirective in Inclusion
Summary:
This will enable PreamblePatching proposed in D77392 craft a more
informed patch.
Reviewers: sammccall
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D78235
Sam Parker [Thu, 9 Apr 2020 06:41:18 +0000 (07:41 +0100)]
[TTI] Remove getOperationCost
This API call has been used recently with, a very valid, expectation
that it would do something useful but it doesn't actually query any
backend information. So, remove this method and merge its
functionality into getUserCost. As well as that, also use
getCastInstrCost to get a proper cost from the backend for the
concerned instructions though we only currently return the answer if
it's considered free. The default implementation now also checks
int/ptr conversions too, as well as truncs and bitcasts.
Differential Revision: https://reviews.llvm.org/D76124
Haojian Wu [Tue, 21 Apr 2020 07:18:37 +0000 (09:18 +0200)]
[AST] Suppress the spammy "attempt to use a deleted fucntion" diagnostic.
Summary:
This patch fixes the regression diagnostic, which was introduced in
https://reviews.llvm.org/D77395.
Reviewers: sammccall
Reviewed By: sammccall
Subscribers: rsmith, adamcz, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D78100
Sam Parker [Mon, 20 Apr 2020 14:04:03 +0000 (15:04 +0100)]
[ARM][ParallelDSP] Handle squaring multiplies
The logic in ARMParallelDSP is setup to merge two 16-bits loads into
a 32-bit load and feed them into the smlads. This requires that four
loads are combined for the four inputs, but there wasn't actually a
check for this.
Differential Revision: https://reviews.llvm.org/D78492
Craig Topper [Tue, 21 Apr 2020 07:00:33 +0000 (00:00 -0700)]
[DenseMap] Don't capture the BucketEnd pointer before an operation that might change the number of buckets.
This code was added in
887efa51c1e0e43ca684ed78b92dbc3a0720881b to
fix reverse iteration.
The call to InsertIntoBucket/InsertIntoBucketWithLookup can change
the number of buckets which will invalidate the BucketEnd. So
don't cache it and calculate it when creating the iterator.
Craig Topper [Tue, 21 Apr 2020 04:34:35 +0000 (21:34 -0700)]
[CallSite removal][Instrumentation] Use CallBase instead of CallSite in AddressSanitizer/DataFlowSanitizer/MemorySanitizer. NFC
Differential Revision: https://reviews.llvm.org/D78524
Max Kazantsev [Tue, 21 Apr 2020 04:25:38 +0000 (11:25 +0700)]
[LICM][NFC] Reorder checks to speed up things slightly
Side effect check is made faster than potentially heavy other checks.
Craig Topper [Tue, 21 Apr 2020 03:32:05 +0000 (20:32 -0700)]
[Local] Update getOrEnforceKnownAlignment/getKnownAlignment to use Align/MaybeAlign.
Differential Revision: https://reviews.llvm.org/D78443
Johannes Doerfert [Mon, 20 Apr 2020 23:25:24 +0000 (18:25 -0500)]
[OpenMPOpt] Make the combination of `ident_t*` deterministic
Before we kept the first applicable `ident_t*` during deduplication of
runtime calls. The problem is that "first" is dependent on the iteration
order of a DenseMap. Since the proper solution, which is to combine the
information from all `ident_t*`, should be deterministic on its own, we
will not try to make the iteration order deterministic. Instead, we will
create a fresh `ident_t*` if there is not a unique existing `ident_t*`
to pick.
Johannes Doerfert [Mon, 20 Apr 2020 23:15:08 +0000 (18:15 -0500)]
[OpenMPOpt] Use a pointer value type in map
The value type was a set before which can easily lead to excessive
memory usage and copying. We use a pointer to a vector instead now.
Johannes Doerfert [Mon, 20 Apr 2020 22:51:38 +0000 (17:51 -0500)]
[OpenMPOpt] Make the SCC a vector to ensure deterministic results
Richard Smith [Tue, 21 Apr 2020 04:14:41 +0000 (21:14 -0700)]
PR45535: Check for variables with non-trivial destruction when
determining whether a statement expression has side-effects.
Richard Smith [Tue, 21 Apr 2020 02:27:39 +0000 (19:27 -0700)]
PR45534: don't ignore unmodeled side-effects when constant-evaluating a call to __builtin_constant_p.
Such side-effects should result in the call evaluating to 'false', even
if we can still determine what value the argument expression will
evaluate to.
Fangrui Song [Tue, 24 Mar 2020 07:38:48 +0000 (15:38 +0800)]
Reland D76675 [llvm-objcopy] Match GNU behaviour regarding file symbols
Don't error on Config.KeepFileSymbols for COFF and Mach-O.
Original description:
GNU objcopy removes STT_FILE symbols for strip-debug operations, and
keeps them for --discard-all operation. Match their behaviour for
llvm-objcopy.
Bug: https://github.com/android/ndk/issues/1212
Differential Revision: https://reviews.llvm.org/D76675
Yi Kong [Tue, 21 Apr 2020 04:04:01 +0000 (12:04 +0800)]
Revert "[llvm-objcopy] Match GNU behaviour regarding file symbols"
This reverts commit
7c65e88d0bc85ff2732a4e23c397ff842b97b828.
Broke non ELF targets.
Yi Kong [Tue, 24 Mar 2020 07:38:48 +0000 (15:38 +0800)]
[llvm-objcopy] Match GNU behaviour regarding file symbols
GNU objcopy removes STT_FILE symbols for strip-debug operations, and
keeps them for --discard-all operation. Match their behaviour for
llvm-objcopy.
Bug: https://github.com/android/ndk/issues/1212
Differential Revision: https://reviews.llvm.org/D76675
Shengchen Kan [Tue, 21 Apr 2020 02:28:13 +0000 (19:28 -0700)]
[MC][NFC] Use camelCase style for functions in MCObjectStreamer
Shengchen Kan [Fri, 17 Apr 2020 12:26:26 +0000 (20:26 +0800)]
[MC][Bugfix] Remove redundant parameter for relaxInstruction
Summary:
Before this patch, `relaxInstruction` takes three arguments, the first
argument refers to the instruction before relaxation and the third
argument is the output instruction after relaxation. There are two quite
strange things:
1) The first argument's type is `const MCInst &`, the third
argument's type is `MCInst &`, but they may be aliased to the same
variable
2) The backends of ARM, AMDGPU, RISC-V, Hexagon assume that the third
argument is a fresh uninitialized `MCInst` even if `relaxInstruction`
may be called like `relaxInstruction(Relaxed, STI, Relaxed)` in a
loop.
In this patch, we drop the thrid argument, and let `relaxInstruction`
directly modify the given instruction. Also, this patch fixes the bug https://bugs.llvm.org/show_bug.cgi?id=45580, which is introduced by D77851, and
breaks the assumption of ARM, AMDGPU, RISC-V, Hexagon.
Reviewers: Razer6, MaskRay, jyknight, asb, luismarques, enderby, rtaylor, colinl, bcain
Reviewed By: Razer6, MaskRay, bcain
Subscribers: bcain, nickdesaulniers, nathanchance, wuzish, annita.zhang, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, tpr, sbc100, jgravelle-google, kristof.beyls, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78364
Yonghong Song [Sun, 19 Apr 2020 22:19:06 +0000 (15:19 -0700)]
BPF: fix a CORE optimization bug
For the test case in this patch like below
struct t { int a; } __attribute__((preserve_access_index));
int foo(void *);
int test(struct t *arg) {
long param[1];
param[0] = (long)&arg->a;
return foo(param);
}
The IR right before BPF SimplifyPatchable phase:
%1:gpr = LD_imm64 @"llvm.t:0:0$0:0"
%2:gpr = LDD killed %1:gpr, 0
%3:gpr = ADD_rr %0:gpr(tied-def 0), killed %2:gpr
STD killed %3:gpr, %stack.0.param, 0
After SimplifyPatchable phase, the incorrect IR is generated:
%1:gpr = LD_imm64 @"llvm.t:0:0$0:0"
%3:gpr = ADD_rr %0:gpr(tied-def 0), killed %1:gpr
CORE_MEM killed %3:gpr, 306, %0:gpr, @"llvm.t:0:0$0:0"
Note that CORE_MEM pseudo op is introduced to encode
memory operations related to CORE. In the above, we intend
to check whether we have a store like
*(%3:gpr + 0) = ...
and if this is the case, we could replace it with
*(%0:gpr + @"llvm.t:0:0$0:0"_ = ...
Unfortunately, in the above, IR for the store is
*(%stack.0.param + 0) = %3:gpr
and transformation should not happen.
Note that we won't have problem if the actual CORE
dereference (arg->a) happens.
This patch fixed the problem by skip CORE optimization if
the use of ADD_rr result is not the base address of the store
operation.
Differential Revision: https://reviews.llvm.org/D78466
Mircea Trofin [Tue, 21 Apr 2020 01:14:13 +0000 (18:14 -0700)]
[llvm][NFC][CallSite] Remove CallSite from ArgumentPromotion
Reviewers: dblaikie, craig.topper
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78528
Johannes Doerfert [Thu, 16 Apr 2020 22:54:40 +0000 (17:54 -0500)]
[Attributor] Use the BumpPtrAllocator in InformationCache as well
We now also use the BumpPtrAllocator from the Attributor in the
InformationCache. The lifetime of objects in either is pretty much the
same and it should result in consistently good performance regardless of
the allocator.
Doing so requires to call more constructors manually but so far that
does not seem to be problematic or messy.
---
Single run of the Attributor module and then CGSCC pass (oldPM)
for SPASS/clause.c (~10k LLVM-IR loc):
Before:
```
calls to allocation functions: 615359 (368257/s)
temporary memory allocations: 83315 (49859/s)
peak heap memory consumption: 75.64MB
peak RSS (including heaptrack overhead): 163.43MB
total memory leaked: 269.04KB
```
After:
```
calls to allocation functions: 613042 (359555/s)
temporary memory allocations: 83322 (48869/s)
peak heap memory consumption: 75.64MB
peak RSS (including heaptrack overhead): 162.92MB
total memory leaked: 269.04KB
```
Difference:
```
calls to allocation functions: -2317 (-68147/s)
temporary memory allocations: 7 (205/s)
peak heap memory consumption: 2.23KB
peak RSS (including heaptrack overhead): 0B
total memory leaked: 0B
---
Johannes Doerfert [Tue, 21 Apr 2020 02:11:02 +0000 (21:11 -0500)]
[Attributor] Partially disable three tests to unblock the windows bot
The windows bot reported a crash [0] which seems to not happen on other
platforms. We disable the old pass manager cgscc runs while this is
under investigation.
[0]
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/23151
Dan Liew [Tue, 21 Apr 2020 00:22:35 +0000 (17:22 -0700)]
Unbreak ASan runtime in the simulators.
Summary:
861b69faee5df8d4e13ef316c7474a10e4069e81 (rdar://problem/
58789439) while
fixing symbolization for TSan completely broke ASan's runtime for the
simulators.
The problem with the previous patch is that the memory passed to
`putenv()` was poisoned and when passed to `putenv()` it tripped
an interceptor for `strchr()` which saw the memory was poisoned and
raised an ASan issue.
The memory was poisoned because `AtosSymbolizerProcess` objects
are created using ASan's internal allocator. Memory from this
allocator gets poisoned with `kAsanInternalHeapMagic`.
To workaround this, this patch makes the memory for the environment
variable entry a global variable that isn't poisoned.
This pass also adds a `DCHECK(getenv(K_ATOS_ENV_VAR))` because the
following DCHECK would crash because `internal_strcmp()` doesn't
work on nullptr.
rdar://problem/
62067724
Reviewers: kubamracek, yln
Subscribers: #sanitizers, llvm-commits
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D78525
Shengchen Kan [Mon, 20 Apr 2020 09:53:00 +0000 (02:53 -0700)]
[MC][NFC] Use camelCase style for function EmitInstToData
Mircea Trofin [Mon, 20 Apr 2020 19:56:36 +0000 (12:56 -0700)]
[llvm][NFC][CallSite] Remove CallSite from CoroEarly
Reviewers: dblaikie, craig.topper
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78523
Chris Bieneman [Mon, 20 Apr 2020 23:28:37 +0000 (18:28 -0500)]
Fix DenseMap iterator asserts when shouldReverseIterate==true
This patch gets the asserts working correctly when LLVM_REVERSE_ITERATION=On by fixing the iterators returned by the DenseMap::find* methods so that they return well-formed iterators that work with reverse iteration, and satisfy the assertions.
David Blaikie [Tue, 21 Apr 2020 00:23:47 +0000 (17:23 -0700)]
Recommit: DebugInfo: Fix rangesBaseAddress DICompileUnit bitcode serialization/deserialization
Recommits
c51b45e32ef7f35c11891f60871aa9c2c04cd991
Reverted in
b350c666ab65b7585bc58301b03d2b46dc6b0504 due to some
(Google-internal) regressions I cannot reproduce... (so we'll see if
they reproduce this time around)
River Riddle [Tue, 21 Apr 2020 00:13:55 +0000 (17:13 -0700)]
[mlir] Fix getTypes() support for result ranges.
Sam Kerner [Tue, 21 Apr 2020 00:13:00 +0000 (17:13 -0700)]
[dfsan] Fix a bug in strcasecmp() and strncasecmp(): Compare the lowercase versions of the characters when choosing a return value.
Summary:
Resolves this bug:
https://bugs.llvm.org/show_bug.cgi?id=38369
Reviewers: morehouse, pcc
Reviewed By: morehouse
Subscribers: #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D78490
Sean Silva [Sat, 18 Apr 2020 03:14:41 +0000 (20:14 -0700)]
Fix inlining multi-block callees with type conversion.
The previous code result a mismatch between block argument types and
predecessor successor args when a type conversion was needed in a
multiblock case. It was assuming the replaced result types matched the
region result types.
Also, slighly improve the debug output from the inliner.
Differential Revision: https://reviews.llvm.org/D78415
Alexander Shaposhnikov [Mon, 20 Apr 2020 23:33:18 +0000 (16:33 -0700)]
[llvm-objcopy][MachO] Copy LC_ENCRYPT_INFO/LC_ENCRYPT_INFO_64 load commands
Copy LC_ENCRYPT_INFO/LC_ENCRYPT_INFO_64 load commands.
Test plan: make check-all
Differential revision: https://reviews.llvm.org/D78339
Pavel Iliin [Mon, 20 Apr 2020 22:54:04 +0000 (23:54 +0100)]
[AArch64][NFC] More intrinsic tests.
Eric Christopher [Mon, 20 Apr 2020 22:25:47 +0000 (15:25 -0700)]
Update LLVMOps for CreateShuffleVector deprecation and rework
creation string.
Differential Revision: https://reviews.llvm.org/D78519
Chris Bieneman [Mon, 20 Apr 2020 22:43:28 +0000 (17:43 -0500)]
Fixing bot breakage
This should resolve the failures from
31282d399b7.
Chris Bieneman [Mon, 20 Apr 2020 21:50:20 +0000 (16:50 -0500)]
Fix LLVM_REVERSE_ITERATION
A recent change (
4e86e5eedc6), broke `LLVM_REVERSE_ITERATION` for DenseMaps by adding an assert. It is valid to de-reference and increment one step behind `End` when reverse iteration is enabled because `End` is actually the start of the pointer bucket.
Sriraman Tallam [Mon, 20 Apr 2020 21:41:30 +0000 (14:41 -0700)]
New pass to make internal linkage symbol names unique.
With clang option -funique-internal-linkage-symbols, symbols with
internal linkage get names with the module hash appended.
Differential Revision: https://reviews.llvm.org/D78243
Christopher Tetreault [Mon, 20 Apr 2020 21:09:41 +0000 (14:09 -0700)]
[SVE] Remove calls to getBitWidth from PowerPC
Reviewers: efriedma, sdesmalen, hfinkel, david-arm, fpetrogalli
Reviewed By: efriedma, fpetrogalli
Subscribers: wuzish, nemanjai, tschuett, hiraditya, kbarton, rkruppe, psnobl, shchenz, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77900
Christopher Tetreault [Mon, 20 Apr 2020 20:58:02 +0000 (13:58 -0700)]
[SVE] Remove calls to getBitWidth from mips
Reviewers: efriedma, ahatanak, sdesmalen, c-rhodes, david-arm
Reviewed By: efriedma
Subscribers: dexonsmith, sdardis, arichardson, tschuett, hiraditya, jrtc27, atanasyan, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77906
David Green [Mon, 20 Apr 2020 18:53:53 +0000 (19:53 +0100)]
[ARM] MVE and scalar postinc mir tests. NFC
Piotr Sobczak [Mon, 20 Apr 2020 20:01:24 +0000 (22:01 +0200)]
Revert "[AMDGPU] Set the CostPerUse value for vgpr registers."
This reverts commit
728b878de689e4921ca7f864ed3036f9b2c53853.
D76417 has caused vgpr count to go up significantly in real-world
graphics content.
Louis Dionne [Mon, 20 Apr 2020 20:42:53 +0000 (16:42 -0400)]
Revert "[libc++] Re-enable warnings in the new format"
This reverts commit
20fd62438004, which broke the C++03 build bot.
I'll have another stab at this after fixing those failures.
Christopher Tetreault [Mon, 20 Apr 2020 20:27:06 +0000 (13:27 -0700)]
[SVE] Remove calls to getBitWidth from Analysis
Reviewers: efriedma, sdesmalen, jnspaulsson, jonpa
Reviewed By: efriedma
Subscribers: tschuett, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77898
Andrew Litteken [Fri, 10 Apr 2020 21:46:09 +0000 (14:46 -0700)]
[MachineOutliner] Annotation for outlined functions in AArch64
- Adding changes to support comments on outlined functions with outlining for the conditions through which it was outlined (e.g. Thunks, Tail calls)
- Adapts the emitFunctionHeader to print out a comment next to the header if the target specifies it based on information in MachineFunctionInfo
- Adds mir test for function annotiation
Differential Revision: https://reviews.llvm.org/D78062
Jonas Devlieghere [Mon, 20 Apr 2020 20:20:24 +0000 (13:20 -0700)]
[lldb/Reproducers] Fix passive replay for (char*, size_t) functions.
Several SB API functions return strings using (char*, size_t) output
arguments. During capture, we serialize an empty string for the char*
because the memory can be uninitialized.
During active replay, we have custom replay redirects that ensure that
we don't override the buffer from which we're reading, but rather write
to a buffer on the heap with the given length. This is sufficient for
the active reproducer use case, where we only care about the side
effects of the API calls, not the values actually returned.
This approach does not not work for passive replay because here we
ignore all the incoming arguments, and re-execute the current function
with the arguments deserialized from the reproducer. This means that
these function will update the deserialized copy of the arguments,
rather than whatever was passed in by the SWIG wrapper.
To solve this problem, this patch extends the reproducer instrumentation
to handle this special case for passive replay. We nog ignore the
replayer in the registry and the incoming char pointer, and instead
reinvoke the current method on the deserialized class, and populate the
output argument.
Differential revision: https://reviews.llvm.org/D77759
Craig Topper [Mon, 20 Apr 2020 20:25:06 +0000 (13:25 -0700)]
Revert "[Local] Update getOrEnforceKnownAlignment/getKnownAlignment to use Align/MaybeAlign."
This is breaking the clang build.
This reverts commit
897409fb56f4525639b0e47e88960f24cd91c924.
Jacques Pienaar [Thu, 16 Apr 2020 15:05:21 +0000 (08:05 -0700)]
[mlir][ods] Add materialize derived attribute method
Summary:
Generate method to generate a DictionaryAttr with attribute values of
derived attribute. If a conversion back from the derived attribute C++
type to Attribute is not defined, then attempting to materialize such an
op's derived attributes would result in runtime failure.
This allows to treat derived attributes and attributes of an op in more
uniform manner where needed. The derived attributes are not added to the
operation but returned as new attribute instead.
Differential Revision: https://reviews.llvm.org/D78302
Craig Topper [Mon, 20 Apr 2020 19:18:23 +0000 (12:18 -0700)]
[Local] Update getOrEnforceKnownAlignment/getKnownAlignment to use Align/MaybeAlign.
Differential Revision: https://reviews.llvm.org/D78443
Louis Dionne [Mon, 20 Apr 2020 15:33:29 +0000 (11:33 -0400)]
[libc++] Re-enable warnings in the new format
When the new libc++ test format was enabled, warnings were accidentally
dropped cause they were not part of the %{compile_flags} substitution.
This commit adds them back, however `-Werror` is only used for non-verify
tests (cause it doesn't make sense for verify tests).
Eli Friedman [Mon, 20 Apr 2020 19:48:04 +0000 (12:48 -0700)]
Fix lld testcases I missed in D78413 (9b9454a)
Uday Bondhugula [Sun, 19 Apr 2020 08:05:11 +0000 (13:35 +0530)]
[MLIR] NFC clean up loop tiling test cases
Summary:
Improve the checks and drop redundant ones. Rename the outlined maps
better.
Reviewers: andydavis1, nicolasvasilache
Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, Joonsoo, grosul1, frgossen, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78514
Mircea Trofin [Mon, 20 Apr 2020 17:28:11 +0000 (10:28 -0700)]
[llvm][NFC][CallSite] Remove CallSite from Lint.cpp
Summary: The CallSite arg iterator is really User::op_iterator.
Reviewers: dblaikie, craig.topper
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78507
Uday Bondhugula [Mon, 20 Apr 2020 16:59:21 +0000 (22:29 +0530)]
[MLIR] Fix affine loop tiling utility upper bound bug
Fix intra-tile upper bound setting in a scenario where the tile size was
larger than the trip count.
Differential Revision: https://reviews.llvm.org/D78505
Erik Pilkington [Mon, 13 Apr 2020 20:19:16 +0000 (16:19 -0400)]
[SemaObjC] Forbid storing an unboxed integer literal in an NSNumber
This fixes a common mistake (the 3 should be @3): NSNumber *n = 3. This extends
an existing check for NSString. Also, this only errs if the initializer isn't a
null pointer constant, so NSNumber *n = 0; continues to work. rdar://
47029572
Differential revision: https://reviews.llvm.org/D78066
Sam McCall [Thu, 16 Apr 2020 23:38:42 +0000 (01:38 +0200)]
[clangd] Enable diagnostic fixes within macro argument expansions.
Summary: This seems like a pretty safe case, and common enough to be useful.
Reviewers: hokein
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D78338
Chris Bowler [Mon, 20 Apr 2020 18:59:26 +0000 (14:59 -0400)]
[NFC] [AIX] [PowerPC] Add missing instruction to AIX byval test
Eli Friedman [Sat, 18 Apr 2020 02:33:26 +0000 (19:33 -0700)]
Require "target datalayout" to be at the beginning of an IR file.
This will allow us to use the datalayout to disambiguate other
constructs in IR, like load alignment. Split off from D78403.
Differential Revision: https://reviews.llvm.org/D78413
Jonas Devlieghere [Mon, 20 Apr 2020 18:33:35 +0000 (11:33 -0700)]
[lldb/Test] Don't friend std::make_unique
This wasn't a great idea to begin with, as you can't really rely on the
implementation, but since it also doesn't work with MSVC I've just made
the ctors public.
David Tenty [Mon, 20 Apr 2020 17:11:22 +0000 (13:11 -0400)]
[AIX] Return the correct set of callee saved regs
Summary:
r13 isn't reserved on 32-bit AIX, which is reflected in our calling
convention but not callee saved regs.
Reviewers: sfertile, ZarkoCA, cebowleratibm, jasonliu
Reviewed By: sfertile
Subscribers: thakis, lei, wuzish, nemanjai, hiraditya, kbarton, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77101
Nemanja Ivanovic [Mon, 20 Apr 2020 17:59:47 +0000 (12:59 -0500)]
[PowerPC] Do not attempt to reuse load for 64-bit FP_TO_UINT without FPCVT
We call the function that attempts to reuse the conversion without checking
whether the target matches the constraints that the callee expects. This patch
adds the check prior to the call.
Fixes: https://bugs.llvm.org/show_bug.cgi?id=43976
Differential revision: https://reviews.llvm.org/D77564
Louis Dionne [Mon, 20 Apr 2020 17:48:16 +0000 (13:48 -0400)]
[libc++] Fix a few warnings when running the test suite with GCC
David Green [Mon, 20 Apr 2020 17:12:43 +0000 (18:12 +0100)]
[ARM] Add an low overhead sibling loop test. NFC
Rumeet Dhindsa [Mon, 20 Apr 2020 17:23:46 +0000 (10:23 -0700)]
Revert "[MS] Fix assert handling enum forward decls in hasVisibleDefinition"
This reverts commit
e62dc1f6252c1dcdcc2a64e8e3b07a32412e9d89.
Reverting as per discussion with the patch author.
This patch causes module import error, but there was no intended
behavior change for code that does not use Microsoft extensions.
Craig Topper [Mon, 20 Apr 2020 17:02:08 +0000 (10:02 -0700)]
[CallSite removal][ExecutionEngine] Use CallBase in the Interpreter. NFC
Differential Revision: https://reviews.llvm.org/D78475
Zola Bridges [Fri, 17 Apr 2020 17:15:58 +0000 (10:15 -0700)]
[dfsan] Add "DataFlow" option to LLVM_USE_SANITIZER
Summary:
This patch add the dataflow option to LLVM_USE_SANITIZER and documents
it.
Tested via check-cxx (wip to fix the errors).
Reviewers: morehouse, #libc!
Subscribers: mgorny, cfe-commits, libcxx-commits
Tags: #clang, #libc
Differential Revision: https://reviews.llvm.org/D78390
Sean Fertile [Mon, 20 Apr 2020 17:02:07 +0000 (13:02 -0400)]
[PowerPC][AIX] Use a file check variable for register used in addressing.
David Tenty [Mon, 20 Apr 2020 17:00:26 +0000 (13:00 -0400)]
Revert "[AIX] Return the correct set of callee saved regs"
This reverts commit
6c881bf1fec2288907cd87a7895c863243bba7c5.
Oliver Stannard [Mon, 20 Apr 2020 14:54:41 +0000 (15:54 +0100)]
[LSan] Disable a failing test on ARM
This started failing after an OS upgrade on a buildbot machine, and I
don't see anything obvious to fix or revert, so disable it for now to
get the bot green.
Covered by https://bugs.llvm.org/show_bug.cgi?id=44158
Differential revision: https://reviews.llvm.org/D78496
Jonas Devlieghere [Mon, 20 Apr 2020 16:37:07 +0000 (09:37 -0700)]
[lldb/Reproducers] Support new replay mode: passive replay
Support passive replay as proposed in the RFC [1] on lldb-dev and
described in more detail on the lldb website [2].
This patch extends the LLDB_RECORD macros to re-invoke the current
function with arguments deserialized from the reproducer. This relies on
the function being called in the exact same order as during replay. It
uses the same mechanism to toggle the API boundary as during recording,
which guarantees that only boundary crossing calls are replayed.
Another major change is that before this patch we could ignore the
result of an API call, because we only cared about the observable
behavior. Now we need to be able to return the replayed result to the
SWIG bindings.
We reuse a lot of the recording infrastructure, which can be a little
confusing. We kept the existing naming to limit the amount of churn, but
might revisit that in a future patch.
[1] http://lists.llvm.org/pipermail/lldb-dev/2020-April/016100.html
[2] https://lldb.llvm.org/resources/reproducers.html
Differential revision: https://reviews.llvm.org/D77602
Nikita Popov [Fri, 17 Apr 2020 17:15:01 +0000 (19:15 +0200)]
[ValueLattice] Add move constructor (NFC)
Following the rule of five, declare move constructor and move
assignment operator for ValueLatticeElement. This allows moving
the ConstantRange rather than copying it.
This does not matter in most cases, where we're dealing with
APInts <= 64 bits. It does avoid unnecessary copies of allocations
for larger APInts.
Additionally we change the implementation approach to make the
copy/move assignment operators make use of the copy/move constructors,
rather than the other way around. The constructors are the more
primitive operations.
Differential Revision: https://reviews.llvm.org/D78425
Nikita Popov [Sun, 19 Apr 2020 20:12:05 +0000 (22:12 +0200)]
[IPT] Don't use OrderedInstructions (NFC)
Use Instruction::comesBefore() instead of OrderedInstructions
inside InstructionPrecedenceTracking. This also removes the
dominator tree dependency.
Differential Revision: https://reviews.llvm.org/D78461
Zola Bridges [Fri, 17 Apr 2020 21:51:40 +0000 (14:51 -0700)]
[libcxx][docs] Clearer mark up for --param
Summary:
When I read this on the website it looks like the `--` in the used font turns
into an em dash. I updated this with inline literal mark up so the `--` will
remain obvious.
Reviewers: EricWF, #libc!
Subscribers: libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D78405
Sean Fertile [Wed, 8 Apr 2020 13:26:57 +0000 (09:26 -0400)]
[PowerPC][AIX] ByVal formal argument support: passing on the stack.
Adds support for passing a ByVal formal argument completely on the stack
(ie after all argument registers are exhausted).
Differential Revision: https://reviews.llvm.org/D78263
Jonas Devlieghere [Mon, 20 Apr 2020 15:52:07 +0000 (08:52 -0700)]
[lldb/Scripts] Add verbose and failure only mode to replay script.
Add two modes to the reproducer replay script that make debugging a
little easier. Verbose mode prints stdout and stderr, regardless of
whether replay was successful. When --failure-only is passed, output is
limited to tests that failed to replay.
Sander de Smalen [Mon, 20 Apr 2020 15:34:23 +0000 (16:34 +0100)]
[SveEmitter] Implement zeroing of false lanes
This implements zeroing of false lanes for binary operations,
where instead of merging into the first operand vector (_m)
a `select` is placed on the first input vector. This approach
easily translates to the use of the `zeroing movprfx` instruction.
This patch also adds builtins for svabd, svadd, svdiv, svdivr,
svmax, svmin, svmul, svmulh, svub and svsubr.
Reviewers: SjoerdMeijer, efriedma, rovka
Reviewed By: efriedma
Tags: #clang
Differential Revision: https://reviews.llvm.org/D77593
Lei Zhang [Mon, 13 Apr 2020 18:54:09 +0000 (14:54 -0400)]
[mlir][ods] Update doc regarding attribute definitions
Differential Revision: https://reviews.llvm.org/D78044
Lei Zhang [Mon, 20 Apr 2020 15:52:29 +0000 (11:52 -0400)]
[mlir][spirv] NFC: remove unnecessary `%N =` in test CHECKs
Lei Zhang [Wed, 15 Apr 2020 12:42:28 +0000 (08:42 -0400)]
[mlir][spirv] Lower memref with dynamic dimensions to runtime arrays
memref types with dynamic dimensions do not have a compile-time
known size. They should be mapped to SPIR-V runtime array types.
Differential Revision: https://reviews.llvm.org/D78197
Julian Lettner [Sat, 18 Apr 2020 00:09:33 +0000 (17:09 -0700)]
[compiler-rt] Use --standalone when running tests on the iOS simulator
We can use `simctl spawn --standalone` to enable running tests without
the need for an already-booted simulator instance. This also side-steps
the problem of not having a good place to shutdown the instance after
we are finished with testing.
rdar://
58118442
Reviewed By: delcypher
Differential Revision: https://reviews.llvm.org/D78409
Florian Hahn [Mon, 20 Apr 2020 15:03:21 +0000 (16:03 +0100)]
[VectorUtils] Use early_inc_range instead of DelSet (NFC).
DelSet was used to avoid invalidating the current iterator while
modifying the map we are iterating over.
By using an early_inc_range, (which increments to iterator 'early',
allowing us to remove the current element), we can get rid of DelSet.
Reviewers: gilr, rengolin, Ayal, hsaito
Reviewed By: Ayal
Differential Revision: https://reviews.llvm.org/D78420
Sam McCall [Fri, 17 Apr 2020 14:07:21 +0000 (16:07 +0200)]
[Preamble] Allow recursive inclusion of header-guarded mainfile.
Summary:
This is guaranteed to be a no-op without the preamble, so should be a
no-op with it too.
Partially fixes https://github.com/clangd/clangd/issues/337
This doesn't yet work for #ifndef guards, which are not recognized in preambles.
see D78038
I can't for the life of me work out how to test this outside clangd.
The original reentrant preamble diagnostic was untested, I added a test
to clangd for that too.
Reviewers: kadircet
Subscribers: ilya-biryukov, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D78366
Sander de Smalen [Mon, 20 Apr 2020 14:13:34 +0000 (15:13 +0100)]
[SveEmitter] Explicitly merge with zero/undef
Builtins that have the merge type MergeAnyExp or MergeZeroExp,
merge into a 'undef' or 'zero' vector respectively, which enables the
_x and _z behaviour for unary operations.
This patch also adds builtins for svabs and svneg.
Reviewers: SjoerdMeijer, efriedma, rovka
Reviewed By: efriedma
Tags: #clang
Differential Revision: https://reviews.llvm.org/D77591
David Tenty [Fri, 17 Apr 2020 17:06:08 +0000 (13:06 -0400)]
[AIX] Return the correct set of callee saved regs
Summary:
r13 isn't reserved on 32-bit AIX, which is reflected in our calling
convention but not callee saved regs.
Reviewers: sfertile, ZarkoCA, cebowleratibm, jasonliu
Reviewed By: sfertile
Subscribers: lei, wuzish, nemanjai, hiraditya, kbarton, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77101
Alexander Belyaev [Mon, 20 Apr 2020 13:16:52 +0000 (15:16 +0200)]
[MLIR] Add AtomicRMWRegionOp.
https://llvm.discourse.group/t/rfc-add-std-atomic-rmw-op/489
Differensial revision: https://reviews.llvm.org/D78352
Petre-Ionut Tudor [Mon, 20 Apr 2020 14:43:56 +0000 (15:43 +0100)]
Revert "[ARM] Fix conditions for lowering to S[LR]I"
This reverts commit
cabfcf840a9d15d92466c6774953d3aa399cde92.
The patch introduced another bug in the optimization.
Simon Pilgrim [Mon, 20 Apr 2020 14:59:24 +0000 (15:59 +0100)]
BranchFolding.h - cleanup includes and forward declarations. NFC.
Push MBFIWrapper.h include down to BranchFolding.cpp/IfConversion.cpp
Simon Pilgrim [Mon, 20 Apr 2020 13:33:21 +0000 (14:33 +0100)]
MIRVRegNamerUtils.h - remove unnecessary includes. NFC.
Replace with forward declarations or push down to MIRVRegNamerUtils.cpp where necessary.
Fangrui Song [Sun, 5 Apr 2020 04:31:36 +0000 (21:31 -0700)]
[ELF] Add --warn-backrefs-exclude=<glob>
D77522 changed --warn-backrefs to not warn for linking sandwich
problems (-ldef1 -lref -ldef2). This removed lots of false positives.
However, glibc still has some problems. libc.a defines some symbols
which are normally in libm.a and libpthread.a, e.g. __isnanl/raise.
For a linking order `-lm -lpthread -lc`, I have seen:
```
// different resolutions: GNU ld/gold select libc.a(s_isnan.o) as the definition
backward reference detected: __isnanl in libc.a(printf_fp.o) refers to libm.a(m_isnanl.o)
// different resolutions: GNU ld/gold select libc.a(raise.o) as the definition
backward reference detected: raise in libc.a(abort.o) refers to libpthread.a(pt-raise.o)
```
To facilitate deployment of --warn-backrefs, add --warn-backrefs-exclude= so that
certain known issues (which may be impractical to fix) can be whitelisted.
Deliberate choices:
* Not a comma-separated list (`--warn-backrefs-exclude=liba.a,libb.a`).
-Wl, splits the argument at commas, so we cannot use commas.
--export-dynamic-symbol is similar.
* Not in the style of `--warn-backrefs='*' --warn-backrefs=-liba.a`.
We just need exclusion, not inclusion. For easier build system
integration, we should avoid order dependency. With the current
scheme, we enable --warn-backrefs, and indivial libraries can add
--warn-backrefs-exclude=<glob> to their LDFLAGS.
Reviewed By: psmith
Differential Revision: https://reviews.llvm.org/D77512
Tom Weaver [Mon, 20 Apr 2020 14:46:55 +0000 (15:46 +0100)]
[Dexter][NFC] Add Debugger Controller To Dexter
Add DebuggerControllerBase and DefaultController to Dexter
implements a new architecture that supports new and novel ways of running
a debugger under dexter.
Current implementation adds the original default behaviour via the new
architecture via the DefaultController, this should have NFC.
Reviewers: Orlando
Differential Revision: https://reviews.llvm.org/D76926
Louis Dionne [Mon, 20 Apr 2020 09:22:20 +0000 (05:22 -0400)]
[libc++] Fix the no-exceptions build of libc++ on Apple
We previously tried re-exporting symbols that didn't exist when
exceptions were disabled. Note that building libc++abi without
exceptions still doesn't work when linking against the default-provided
libSystem.dylib, because it transitively depends on libobjc.dylib,
and that requires __gxx_personality_v0. But building libc++abi
with exceptions and libc++ without exceptions does work.
Emre Kultursay [Mon, 20 Apr 2020 14:17:36 +0000 (16:17 +0200)]
[lldb] Remove m_last_file_sp from SourceManager
Summary:
...and replace it with m_last_file_spec instead.
When Source Cache is enabled, the value stored in m_last_file_sp is
already in the Source Cache, and caching it again in SourceManager
brings no extra benefit. All we need is to "remember" the last used
file, and FileSpec can serve the same purpose.
When Source Cache is disabled, the user explicitly requested no caching
of source files, and therefore, m_last_file_sp should NOT be used.
Bug: llvm.org/PR45310
Depends on D76805.
Reviewers: labath, jingham
Reviewed By: jingham
Subscribers: labath, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D76806
Emre Kultursay [Mon, 20 Apr 2020 14:17:27 +0000 (16:17 +0200)]
[lldb] Fix SourceManager::SourceFileCache insertion
Summary:
Lookup and subsequent insert was done using uninitialized
FileSpec object, which caused the cache to be a no-op.
Bug: llvm.org/PR45310
Depends on D76804.
Reviewers: labath, JDevlieghere
Reviewed By: labath
Subscribers: mgorny, jingham, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D76805
Emre Kultursay [Mon, 20 Apr 2020 14:17:17 +0000 (16:17 +0200)]
[lldb] Add new LLDB setting: use-source-cache
Summary:
LLDB memory-maps large source files, and at the same time, caches
all source files in the Source Cache.
On Windows, memory-mapped source files are not writeable, causing
bad user experience in IDEs (such as errors when saving edited files).
IDEs should have the ability to disable the Source Cache at LLDB
startup, so that users can edit source files while debugging.
Bug: llvm.org/PR45310
Reviewers: labath, JDevlieghere, jingham
Reviewed By: labath
Subscribers: lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D76804