Simon Pilgrim [Sun, 7 Jun 2020 12:16:31 +0000 (13:16 +0100)]
MemorySSAUpdater.h - reduce includes to forward declarations. NFC.
Simon Pilgrim [Sun, 7 Jun 2020 11:47:37 +0000 (12:47 +0100)]
DependenceAnalysis.h - reduce AliasAnalysis.h include to forward declaration. NFC.
This requires the replacement of legacy class AliasAnalysis usages with AAResults (which it typedefs to anyhow)
Simon Pilgrim [Sun, 7 Jun 2020 11:10:50 +0000 (12:10 +0100)]
MustExecute.h - remove unnecessary Instruction.h include. NFC.
We already have the Instruction forward declaration.
Simon Pilgrim [Sun, 7 Jun 2020 10:48:46 +0000 (11:48 +0100)]
ObjCARCAnalysisUtils.h - remove unused LLVMContext.h include. NFC.
Simon Pilgrim [Sun, 7 Jun 2020 10:44:27 +0000 (11:44 +0100)]
OrderedInstructions.h - reduce includes to forward declarations. NFC.
Simon Pilgrim [Sun, 7 Jun 2020 10:43:41 +0000 (11:43 +0100)]
[X86][SSE] Extend ICMP(MOVMSK(BITCAST(X))) tests to allof patterns as well as the existing noneof/anyof patterns.
Simon Pilgrim [Sun, 7 Jun 2020 10:19:45 +0000 (11:19 +0100)]
[X86][SSE] Attempt to widen MOVMSK vector input if the signbits are splatted.
As shown on PR37087, if we have a MOVMSK(BICAST(X)) from a wider vector, then by using MOVMSK from the wider type (32/64-bit elements) we can improve the chances of further combines with SimplifyDemandedBits/Elts and on some targets (skylake) can be more efficient.
Florian Hahn [Sun, 7 Jun 2020 10:11:27 +0000 (11:11 +0100)]
[Matrix] Implement * binary operator for MatrixType.
This patch implements the * binary operator for values of
MatrixType. It adds support for matrix * matrix, scalar * matrix and
matrix * scalar.
For the matrix, matrix case, the number of columns of the first operand
must match the number of rows of the second. For the scalar,matrix variants,
the element type of the matrix must match the scalar type.
Reviewers: rjmccall, anemet, Bigcheese, rsmith, martong
Reviewed By: rjmccall
Differential Revision: https://reviews.llvm.org/D76794
Jaroslav Sevcik [Mon, 1 Jun 2020 20:43:18 +0000 (20:43 +0000)]
Support build-ids of other sizes than 16 in UUID::SetFromStringRef
SBTarget::AddModule currently handles the UUID parameter in a very
weird way: UUIDs with more than 16 bytes are trimmed to 16 bytes. On
the other hand, shorter-than-16-bytes UUIDs are completely ignored. In
this patch, we change the parsing code to handle UUIDs of arbitrary
size.
To support arbitrary size UUIDs in SBTarget::AddModule, this patch
changes UUID::SetFromStringRef to parse UUIDs of arbitrary length. We
subtly change the semantics of SetFromStringRef - SetFromStringRef now
only succeeds if the entire input is consumed to prevent some
prefix-parsing confusion. This is up for discussion, but I believe
this is more consistent - we always return false for invalid UUIDs
rather than sometimes truncating to a valid prefix. Also, all the
call-sites except the API and interpreter seem to expect to consume
the entire input.
This also adds tests for adding existing modules 4-, 16-, and 20-byte
build-ids. Finally, we took the liberty of testing the minidump
scenario we care about - removing placeholder module from minidump and
replacing it with the real module.
Reviewed By: labath, friss
Differential Revision: https://reviews.llvm.org/D80755
Simon Pilgrim [Sun, 7 Jun 2020 09:48:11 +0000 (10:48 +0100)]
[X86][SSE] Add MOVMSK tests where we're using a more narrow vector elements than necessary
First step towards fixing PR37087
Xing GUO [Sun, 7 Jun 2020 07:47:14 +0000 (15:47 +0800)]
[ObjectYAML][DWARF] Support emitting .debug_ranges section in ELFYAML.
This patch enables yaml2elf to emit the .debug_ranges section.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D81217
Fangrui Song [Sun, 7 Jun 2020 06:11:31 +0000 (23:11 -0700)]
[gcov] Improve tests and lower the minimum supported version to gcov 3.4
global-ctor.ll no longer checks what it intended to check
(@_GLOBAL__sub_I_global-ctor.ll needs a !dbg to work).
Rewrite it.
gcov 3.4 and gcov 4.2 use the same format, thus we can lower the version
requirement to 3.4
Fangrui Song [Sun, 7 Jun 2020 03:36:46 +0000 (20:36 -0700)]
[gcov] Delete unneeded code
James Y Knight [Tue, 12 May 2020 14:36:34 +0000 (10:36 -0400)]
Simplify MachineVerifier's block-successor verification.
There's two properties we want to verify:
1. That the successors returned by analyzeBranch are in the CFG
successor list, and
2. That there are no extraneous successors are in the CFG successor
list.
The previous implementation mostly accomplished this, but in a very
convoluted manner.
Differential Revision: https://reviews.llvm.org/D79793
James Y Knight [Wed, 19 Feb 2020 15:41:28 +0000 (10:41 -0500)]
MachineBasicBlock::updateTerminator now requires an explicit layout successor.
Previously, it tried to infer the correct destination block from the
successor list, but this is a rather tricky propspect, given the
existence of successors that occur mid-block, such as invoke, and
potentially in the future, callbr/INLINEASM_BR. (INLINEASM_BR, in
particular would be problematic, because its successor blocks are not
distinct from "normal" successors, as EHPads are.)
Instead, require the caller to pass in the expected fallthrough
successor explicitly. In most callers, the correct block is
immediately clear. But, in MachineBlockPlacement, we do need to record
the original ordering, before starting to reorder blocks.
Unfortunately, the goal of decoupling the behavior of end-of-block
jumps from the successor list has not been fully accomplished in this
patch, as there is currently no other way to determine whether a block
is intended to fall-through, or end as unreachable. Further work is
needed there.
Differential Revision: https://reviews.llvm.org/D79605
Ben Shi [Sun, 7 Jun 2020 01:40:59 +0000 (18:40 -0700)]
[RISCV] Fix a typo in RISCVISelLowering.cpp
The 9th parameter of "static bool CC_RISCV(...)" is isFixed, not isRet.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D81333
Mike Edwards [Sat, 6 Jun 2020 23:53:58 +0000 (16:53 -0700)]
[LIT] NFC adding max-failures option to lit documentation.
Differential Revision: https://reviews.llvm.org/D81337
Craig Topper [Sun, 7 Jun 2020 00:24:06 +0000 (17:24 -0700)]
[X86] Correct some isel patterns for v1i1 KNOT/KANDN/KXNOR.
The KNOT pattern was missing. The others were
looking for a v1i1 -1 instead of a vector all ones.
Douglas Yung [Sat, 6 Jun 2020 23:30:46 +0000 (23:30 +0000)]
Revert "[codeview] Put !heapallocsite on calls to operator new"
This reverts commit
672ed5386024ba5cee53e19d637b7920a4889837.
This commit is hitting an assertion failure across multiple bots in the test:
Profile-<arch> :: instrprof-gcov-multithread_fork.test
Failing bots include:
http://lab.llvm.org:8011/builders/llvm-avr-linux/builds/2205
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-lld/builds/8967
http://lab.llvm.org:8011/builders/clang-cmake-armv7-full/builds/10789
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/27750
http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/16751
Jan Kratochvil [Sat, 6 Jun 2020 21:31:30 +0000 (23:31 +0200)]
[lldb] [nfc] Fix comment in testcase DW_TAG_variable-DW_AT_const_value.s
Fangrui Song [Sat, 6 Jun 2020 18:58:26 +0000 (11:58 -0700)]
[gcov] Delete `XFAIL: host-byteorder-big-endian` for test/Transforms/GCOVProfiling/{exit-block.ll,function-numbering.ll}
LLVM GN Syncbot [Sat, 6 Jun 2020 18:22:19 +0000 (18:22 +0000)]
[gn build] Port
8422bc9efcb
Yaxun (Sam) Liu [Fri, 5 Jun 2020 20:49:38 +0000 (16:49 -0400)]
recommit "[HIP] Add default header and include path"
recommit
11d06b9511bd25aabbfad10dff548b0ce29135a5 with
fix for lit tests.
Fangrui Song [Sat, 6 Jun 2020 18:01:47 +0000 (11:01 -0700)]
[gcov] Support big-endian .gcno and simplify version handling in .gcda
Jonas Paulsson [Tue, 21 Apr 2020 16:16:29 +0000 (18:16 +0200)]
[SystemZ] Implement -fstack-clash-protection
Probing of allocated stack space is now done when this option is passed. The
purpose is to protect against the stack clash attack (see
https://www.qualys.com/2017/06/19/stack-clash/stack-clash.txt).
Review: Ulrich Weigand
Differential Revision: https://reviews.llvm.org/D78717
Jacques Pienaar [Sat, 6 Jun 2020 16:31:51 +0000 (09:31 -0700)]
[mlir] Change to re-enable cuda-runner tests
mlir-cuda-runner tests were failing post
https://reviews.llvm.org/D80676, small change to get those passing
again. More cleanup may be needed post.
Matt Arsenault [Sat, 6 Jun 2020 14:31:08 +0000 (10:31 -0400)]
AMDGPU/GlobalISel: Fix test failure in release build
The annoying behavior where the output is different due to the
legality check struck again, plus the subtarget predicate wasn't
really correctly set for DS FP atomics.
Some of the FP min/max instructions seem to be in the gfx6/gfx7
manuals, but IIRC this might have been one of the cases where the
manual got ahead of the actual hardware support, but I've left these
as-is for now since the assembler tests seem to expect them.
Simon Pilgrim [Sat, 6 Jun 2020 14:48:17 +0000 (15:48 +0100)]
EHPersonalities.h - reduce Triple.h include to forward declaration. NFC.
Move implicit include dependencies down to source files.
Sanjay Patel [Fri, 5 Jun 2020 21:16:29 +0000 (17:16 -0400)]
[DAGCombiner] clean-up FMA+FMUL folds; NFC
D80801 suggests some readability improvements before mocing this block.
Simon Pilgrim [Sat, 6 Jun 2020 14:18:25 +0000 (15:18 +0100)]
CFG.h - add missing GraphTraits.h include. NFC.
MSVC doesn't care that this isn't declared for default template args but gcc (sometimes) does.
Simon Pilgrim [Sat, 6 Jun 2020 14:06:03 +0000 (15:06 +0100)]
CFG.h - reduce includes to forward declarations. NFC.
Remove unnecessary includes from CFG.cpp.
Fix implicit include dependency in X86WinEHState.cpp.
Matt Arsenault [Sun, 24 May 2020 15:12:11 +0000 (11:12 -0400)]
AMDGPU/GlobalISel: Start rewriting load/store legality rules
The current set is an incomprehensible mess riddled with ordering
hacks for various limitations in the legalizer at the time of writing,
many of which have been fixed. This takes a very small step in
correcting this.
The core first change is to start checking for fully legal cases
first, rather than trying to figure out all of the actions that could
need to be performed. It's recommended to check the legal cases first
for faster legality checks in the common case. This still has a table
listing some common cases, but it needs measuring whether this really
helps or not.
More significantly, stop trying to allow any arbitrary type with a
legal bitwidth as a legal memory type, and start using the bitcast
legalize action for them. Allowing loads of these weird vector types
produced new burdens we don't need for handling all of the
legalization artifacts. Unlike the SelectionDAG handling, this is
still not casting 64 or 16-bit element vectors to 32-bit
vectors. These cases should still be handled by increasing/decreasing
the number of 16-bit elements. This is primarily to fix 8-bit element
vectors.
Another change is to stop trying to handle the load-widening based on
a higher alignment. We should still do this, but the way it was
handled wasn't really correct. We really need to modify the MMO's size
at the same time, and not just increase the result type. The
LegalizerHelper does not do this, and I think this would really
require a separate WidenMemory action (or to add a memory action
payload to the LegalizeMutation). These will now fail to legalize.
The structure of the legalizer rules makes writing concise rules here
difficult. It would be easier if the same function could answer the
query the query, and report the action to perform at the same
time. Instead these two are split into distinct predicate and action
functions. This is mostly tolerable for other cases, but the
load/store rules get pretty complicated so it's difficult to keep two
versions of these functions in sync.
dfukalov [Thu, 4 Jun 2020 23:18:18 +0000 (02:18 +0300)]
[AMDGPU] Increase max iterations count to analyze complete unroll
Summary: In some cases inner loops may not get boosts so try to analyze them deeper.
Reviewers: rampitec, mzolotukhin
Reviewed By: rampitec
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, zzheng, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81204
Simon Pilgrim [Sat, 6 Jun 2020 13:23:08 +0000 (14:23 +0100)]
LoopPassManager.h - add missing MemorySSA.h include
Fix buildbot failure due to rG5006e551d310 - oddly I can't reproduce this locally on my msvc expensive checks build.
Simon Pilgrim [Sat, 6 Jun 2020 13:06:25 +0000 (14:06 +0100)]
LoopAnalysisManager.h - reduce includes to forward declarations. NFC.
Move implicit include dependencies down to header/source files.
Paul Walker [Fri, 5 Jun 2020 11:49:44 +0000 (11:49 +0000)]
[SVE ACLE] Remove redundant bool_t typedef.
Subscribers: tschuett, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81252
Simon Pilgrim [Sat, 6 Jun 2020 12:30:00 +0000 (13:30 +0100)]
LegacyDivergenceAnalysis.h - reduce DivergenceAnalysis.h include to forward declaration. NFC.
Move implicit include dependencies down to source file.
Simon Pilgrim [Sat, 6 Jun 2020 11:59:22 +0000 (12:59 +0100)]
LoopInfoImpl.h - remove unused SetVector.h include. NFC.
Roman Lebedev [Sat, 6 Jun 2020 09:59:58 +0000 (12:59 +0300)]
[SCEV] ScalarEvolution::createSCEV(): Instruction::Or: drop bogus no-wrap flag detection
Summary:
That's just really wrong. While sure, if LHS is AddRec, and we could
propagate it's no-wrap flags, that doesn't make, because as long as
the operands of `or` had no common bits set, then the `add`
of these operands will never overflow: http://volta.cs.utah.edu:8080/z/gmt7Sy
IOW we need no propagation/detection, we are free to just set NUW+NSW.
But as rG39e3683534c83573da5c8b70c8adfb43948f601f shows,
even when the old code failed to "deduce" flags,
we'd eventually re-deduce them somewhere, later.
So let's just set them.
Reviewers: mkazantsev, reames, sanjoy, efriedma
Reviewed By: efriedma
Subscribers: efriedma, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81246
Roman Lebedev [Sat, 6 Jun 2020 09:59:44 +0000 (12:59 +0300)]
[SCEV] ScalarEvolution::createSCEV(): clarify no-wrap flag propagation for shift by bitwidth-1
Summary:
There was this comment here previously:
```
- // It is currently not resolved how to interpret NSW for left
- // shift by BitWidth - 1, so we avoid applying flags in that
- // case. Remove this check (or this comment) once the situation
- // is resolved. See
- // http://lists.llvm.org/pipermail/llvm-dev/2015-April/084195.html
- // and http://reviews.llvm.org/D8890 .
```
But langref was fixed in rL286785, and the behavior is pretty obvious:
http://volta.cs.utah.edu:8080/z/MM4WZP
^ nuw can always be propagated. nsw can be propagated if
either nuw is specified, or the shift is by *less* than bitwidth-1.
This mimics similar D81189 Reassociate change, alive2 is happy about that one.
I'm not sure `NUW` isn't being printed, but that seems unrelated.
Reviewers: mkazantsev, reames, sanjoy, nlopes, craig.topper, efriedma
Reviewed By: efriedma
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81243
Nikita Popov [Sat, 6 Jun 2020 09:49:20 +0000 (11:49 +0200)]
[NewGVN] Remove alignment from LoadExpression (NFC)
The alignment is not actually used.
Nikita Popov [Sat, 6 Jun 2020 09:15:45 +0000 (11:15 +0200)]
[InstCombine] Remove unnecessary MaybeAlign use (NFC)
Alloca align is required now.
Marco Elver [Sat, 6 Jun 2020 09:18:46 +0000 (11:18 +0200)]
[ASan][Test] Fix globals test on 32-bit architectures
Buildbot reports failures on e.g. armv7 and thumbv7. Fix the test by
expecting either i32 or i64 for the size-argument.
Tres Popp [Sat, 6 Jun 2020 09:15:57 +0000 (11:15 +0200)]
Revert "[mlir] Canonicalization and folding of shape.cstr_broadcastable"
This reverts commit
6aab70945915ef1d565f1146734416029549a5a9.
Some users have failing builds with ShapeCanonicalization.td, so revert
for now.
Tres Popp [Sat, 6 Jun 2020 09:08:41 +0000 (11:08 +0200)]
Revert "[mlir] Folding and canonicalization of shape.cstr_eq"
This reverts commit
0a554e607ff6247b79d1c4f184999750e5ad53b9.
Some users have build failures when building ShapeCanonicalization.td,
so revert changes that created and rely on it.
Tres Popp [Fri, 5 Jun 2020 09:22:10 +0000 (11:22 +0200)]
[mlir] Move attr-dict to end of Shape dialect ops
Summary: This is to be consistent with most other assemblyFormat examles in MLIR.
Differential Revision: https://reviews.llvm.org/D81245
Lang Hames [Fri, 5 Jun 2020 21:08:15 +0000 (14:08 -0700)]
[ORC] Always use ObjectLinkingLayer/JITLink for MachO on x86-64 and arm64.
JITLink supports all code and relocation models, so there's no reason to
conditionalize using JITLink on the code or relocation model settings.
Clients wanting to use RTDyldObjectLinkingLayer/RuntimeDyld will now
need to use a custom object linking layer creator.
Wen-Heng (Jack) Chung [Fri, 5 Jun 2020 21:26:57 +0000 (16:26 -0500)]
[mlir][mlir-rocm-runner] Detect HIP version and AMD ISA version.
Summary:
Prior to ROCm / HIP 3.5, HSA code object V2 is the default binary format.
Starting from ROCm 3.5, HSA code object V3 becomes default.
Also invoke `rocm_agent_enumerator` to detect proper AMD ISA version on the
system. Use `gfx900` as the fallback value.
Reviewers: jerryyin yaxunl
Subscribers: mgorny, yaxunl, mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, aartbik, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, jurahul, msifontes
Tags: #mlir
Differential Revision: https://reviews.llvm.org/D81309
LLVM GN Syncbot [Sat, 6 Jun 2020 01:50:36 +0000 (01:50 +0000)]
[gn build] Port
29203480632
Nico Weber [Sat, 6 Jun 2020 01:50:04 +0000 (21:50 -0400)]
Revert "recommit "[HIP] Add default header and include path""
This reverts commit
1fa43e0b34d9736f62c6c1b6c371a5e39cd1624d.
Still breaks tests on several bots, see https://reviews.llvm.org/D81176
Nico Weber [Sat, 6 Jun 2020 01:20:11 +0000 (21:20 -0400)]
Revert "Migrate the rest of COFFObjectFile to Error"
This reverts commit
b5289656b865d2a73cf90819e20a96fb8414ab0b.
__attribute__((optnone)) doesn't build with msvc, see
http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/16326
LLVM GN Syncbot [Sat, 6 Jun 2020 00:47:43 +0000 (00:47 +0000)]
[gn build] Port
1fa43e0b34d
Jessica Paquette [Fri, 5 Jun 2020 00:08:36 +0000 (17:08 -0700)]
[AArch64][GlobalISel] Move dup optimization into post-legalizer combiner
Since all of the other G_SHUFFLE_VECTOR transforms are going there, let's do
this with dup as well. This is nice, because it lets us split up the original
code into matching, register bank selection, and instruction selection.
- Create G_DUP, make it equivalent to AArch64dup
- Add a post-legalizer combine which is 90% a copy-and-paste from
tryOptVectorDup, except with shuffle matching closer to what SelectionDAG
does in `ShuffleVectorSDNode::isSplatMask`.
- Teach RegBankSelect about G_DUP. Since dup selection relies on the correct
register bank for FP/GPR dup selection, this is necessary.
- Kill `tryOptVectorDup`, since it's now entirely handled by G_DUP.
- Add testcases for the combine, RegBankSelect, and selection. The selection
test gives the same selection results as the old test.
Differential Revision: https://reviews.llvm.org/D81221
Diego Caballero [Sat, 6 Jun 2020 00:29:56 +0000 (17:29 -0700)]
[mlir] Fix representation of BF16 constants
This patch is a follow-up on https://reviews.llvm.org/D81127
BF16 constants were represented as 64-bit floating point values due to the lack
of support for BF16 in APFloat. APFloat was recently extended to support
BF16 so this patch is fixing the BF16 constant representation to be 16-bit.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D81218
Yaxun (Sam) Liu [Fri, 5 Jun 2020 20:49:38 +0000 (16:49 -0400)]
recommit "[HIP] Add default header and include path"
recommit
11d06b9511bd25aabbfad10dff548b0ce29135a5 with
fix for lit tests.
Diego Caballero [Sat, 6 Jun 2020 00:06:42 +0000 (17:06 -0700)]
Fix convertBFloatAPFloatToAPInt for NaN/Inf values
Bfloat type has an 8-bit exponent so the exponent of NaN/Inf numbers
must be 0xff instead of 0x1f. This is probably a copy-paste mistake
from the half float type.
Reviewed By: lattner
Differential Revision: https://reviews.llvm.org/D81302
Richard Smith [Mon, 4 May 2020 23:56:47 +0000 (16:56 -0700)]
PR34581: Don't remove an 'if (p)' guarding a call to 'operator delete(p)' under -Oz.
Summary:
This transformation is correct for a builtin call to 'free(p)', but not
for 'operator delete(p)'. There is no guarantee that a user replacement
'operator delete' has no effect when called on a null pointer.
However, the principle behind the transformation *is* correct, and can
be applied more broadly: a 'delete p' expression is permitted to
unconditionally call 'operator delete(p)'. So do that in Clang under
-Oz where possible. We do this whether or not 'p' has trivial
destruction, since the destruction might turn out to be trivial after
inlining, and even for a class-specific (but non-virtual,
non-destroying, non-array) 'operator delete'.
Reviewers: davide, dnsampaio, rjmccall
Reviewed By: dnsampaio
Subscribers: hiraditya, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D79378
stevewan [Fri, 5 Jun 2020 23:54:00 +0000 (19:54 -0400)]
[PowerPC] Do not special case Darwin on PowerPC in target cpu handling
Summary: This patch removes the special handling for Darwin on PowerPC in the default target cpu handling, because Darwin is no longer supported on the PowerPC platform.
Reviewers: hubert.reinterpretcast, daltenty
Reviewed By: hubert.reinterpretcast
Subscribers: wuzish, nemanjai, shchenz, steven.zhang, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81115
Philip Reames [Fri, 5 Jun 2020 21:48:52 +0000 (14:48 -0700)]
[Tests] Migrate a number of tests to gc-live bundle representation
Reid Kleckner [Fri, 5 Jun 2020 20:56:51 +0000 (13:56 -0700)]
Migrate the rest of COFFObjectFile to Error
Reid Kleckner [Fri, 5 Jun 2020 23:12:38 +0000 (16:12 -0700)]
Re-land "Migrate Binary::checkOffset from error_code to Error, NFC"
This reverts commit
38f3ba591e3a64fa5bbe684b3171c7bda6c5b527.
Fix the XCOFF error handling. Unlike std::error_code, Error must be
consumed or handled.
Fangrui Song [Fri, 5 Jun 2020 23:16:49 +0000 (16:16 -0700)]
Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds after
ebcbd5ba39c017bb621eefa3175a224aae85ddc8
Richard Smith [Fri, 5 Jun 2020 02:16:05 +0000 (19:16 -0700)]
PR46209: properly determine whether a copy assignment operator is
trivial.
We previously took a shortcut by assuming that if a subobject had a
trivial copy assignment operator (with a few side-conditions), we would
always invoke it, and could avoid going through overload resolution.
That turns out to not be correct in the presenve of ref-qualifiers (and
also won't be the case for copy-assignments with requires-clauses
either). Use the same logic for lazy declaration of copy-assignments
that we use for all other special member functions.
Previously committed as
c57f8a3a20540fcf9fbf98c0a73f381ec32fce2a. This
now also includes an extension of LLDB's workaround for handling special
members without the help of Sema to cover copy assignments.
Richard Smith [Fri, 5 Jun 2020 02:15:22 +0000 (19:15 -0700)]
Set the captures on a CXXRecordDecl representing a lambda closure type
before marking it complete.
No functionality change intended.
Previously committed as
c13dd74e311d2ac70dd3ea663d800307d1aa5b6b.
Fangrui Song [Fri, 5 Jun 2020 22:59:34 +0000 (15:59 -0700)]
[ELF] Don't cause assertion failure if --dynamic-list or --version-script takes an empty file
Fixes PR46184
Report line 1 of the last memory buffer.
Alex Lorenz [Fri, 5 Jun 2020 22:40:00 +0000 (15:40 -0700)]
[arm][darwin] Don't generate libcalls for wide shifts on Darwin
Similar to
ceb801612a678bdffe7e7bf163bd0eed9c9b73a2.
Darwin doesn't always use compiler-rt, and so we can't assume that these
functions are available on arm.
Davide Italiano [Fri, 5 Jun 2020 21:51:58 +0000 (14:51 -0700)]
[IRExecutionUnit] Early returns for clarity. NFCI.
Nicolas Vasilache [Fri, 5 Jun 2020 21:44:02 +0000 (17:44 -0400)]
[mlir][Linalg] NFC - Make useFullTileBuffersByDefault option take a boolean.
Dan Gohman [Fri, 5 Jun 2020 21:27:52 +0000 (14:27 -0700)]
[WebAssembly] Improve clang diagnostics for wasm attributes
This patch addresses the review comments on r352930:
- Removes redundant diagnostic checking code
- Removes errnoneous use of diag::err_alias_is_definition, which
turned out to be ineffective anyway since functions can be defined later
in the translation unit and avoid detection.
- Adds a test for various invalid cases for import_name and import_module.
This reapplies D59520, with the addition of adding
`InGroup<IgnoredAttributes>` to the new warnings, to fix the
Misc/warning-flags.c failure.
Differential Revision: https://reviews.llvm.org/D59520
Craig Topper [Fri, 5 Jun 2020 21:27:04 +0000 (14:27 -0700)]
[X86] Add test cases for PR46203. NFC
Nicolas Vasilache [Fri, 5 Jun 2020 21:23:15 +0000 (17:23 -0400)]
[mlir] Fix spurious f64 -> f16 change in CPU runner test
Nikita Popov [Fri, 5 Jun 2020 21:18:26 +0000 (23:18 +0200)]
[CGP] Remove unnecessary MaybeAlign use (NFC)
Stores now always have an alignment.
Nikita Popov [Fri, 5 Jun 2020 21:11:04 +0000 (23:11 +0200)]
[LoopIdiomRecognize] Remove unnecessary MaybeAlign use (NFC)
Loads and stores always have an alignment now.
Marco Elver [Fri, 5 Jun 2020 20:56:24 +0000 (22:56 +0200)]
[ASan][Test] Fix globals test for Mach-O
Summary: Use a portable section name, as for the test's purpose any name will do.
Reviewers: nickdesaulniers, thakis
Reviewed By: thakis
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81306
Nico Weber [Fri, 5 Jun 2020 21:00:20 +0000 (17:00 -0400)]
Revert "Migrate Binary::checkOffset from error_code to Error, NFC"
This reverts commit
74bd98829d82312676a60c5c2d142e20691b2f13.
Breaks LLVM::section-headers.test everywhere, see e.g.
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/29940/steps/test-check-all/logs/FAIL%3A%20LLVM%3A%3Asection-headers.test
Adrian Prantl [Fri, 5 Jun 2020 18:58:05 +0000 (11:58 -0700)]
Fix an oversight in GetXcodeContentsDirectory()
Since FindXcodeContentsDirectoryInPath expects the *.app/Contents and
DEVELOPER_DIR is supposed to point to Xcode.app, we need to append the
Contents path first.
Differential Revision: https://reviews.llvm.org/D81290
Adrian Prantl [Fri, 5 Jun 2020 18:38:59 +0000 (11:38 -0700)]
Factor out GetEnvDeveloperDir() (NFC)
Differential Revision: https://reviews.llvm.org/D81289
Craig Topper [Fri, 5 Jun 2020 18:46:07 +0000 (11:46 -0700)]
[X86] Fold undef elts to 0 in getTargetVShiftByConstNode.
Similar to D81212.
Differential Revision: https://reviews.llvm.org/D81292
Reid Kleckner [Fri, 5 Jun 2020 20:32:33 +0000 (13:32 -0700)]
Migrate Binary::checkOffset from error_code to Error, NFC
In my use case, this saved 100ms of time doing one-time-initialization
for std::error_code().
Stanislav Mekhanoshin [Wed, 27 May 2020 20:09:00 +0000 (13:09 -0700)]
AMDGPU/GlobalISel: cmp/select method for extract element
Differential Revision: https://reviews.llvm.org/D80749
Reid Kleckner [Tue, 2 Jun 2020 00:11:06 +0000 (17:11 -0700)]
[codeview] Put !heapallocsite on calls to operator new
Clang marks calls to operator new as heap allocation sites, but the
operator declared at global scope returns a void pointer. There is no
explicit cast in the code, so the compiler has to write down the
allocated type itself.
Also generalize a cast to use CallBase, so that we mark heap alloc sites
when exceptions are enabled.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D80966
LLVM GN Syncbot [Fri, 5 Jun 2020 19:48:20 +0000 (19:48 +0000)]
[gn build] Port
8a8c6913a93
Stanislav Mekhanoshin [Mon, 1 Jun 2020 21:35:12 +0000 (14:35 -0700)]
SROA: Remove pointer from visited along with instruction
If an instruction is erased we also need to remove it from
Visited set. There is a very small chance that an another
newly created instruction will be created with the same
pointer value in place of an erased one.
Differential Revision: https://reviews.llvm.org/D80958
Yaxun (Sam) Liu [Fri, 5 Jun 2020 19:41:00 +0000 (15:41 -0400)]
Revert "[HIP] Add default header and include path"
This reverts commit
11d06b9511bd25aabbfad10dff548b0ce29135a5.
Yaxun (Sam) Liu [Fri, 5 Jun 2020 19:31:11 +0000 (15:31 -0400)]
Attempt to fix hip-include-path.hip
Saleem Abdulrasool [Fri, 5 Jun 2020 00:40:41 +0000 (17:40 -0700)]
lld: use modern library search ordering
This merges the static and shared library and behaves as if
`-search_paths_first` was specified which is also the default behaviour
on ld64 (and now lld). Unify the paths, and use `llvm::sys::path` to
deal with the path to be truly agnostic to the host.
Alexandre Ganea [Thu, 4 Jun 2020 19:30:45 +0000 (15:30 -0400)]
[llvm-pdbutil] Add missing --id-stats to dump the IPI stream
Before this patch, llvm-pdbutil supported only --type-stats to dump stats about a PDB TPI stream.
Adding --id-stats for completion.
Matt Arsenault [Sun, 31 May 2020 00:28:36 +0000 (20:28 -0400)]
GlobalISel: Add helper for constructing load from offset
Adrian Prantl [Fri, 5 Jun 2020 02:02:11 +0000 (19:02 -0700)]
Teach GetXcodeSDK to look in the Xcode that contains LLDB
instead of preferring the one chosen with xcode-select.
<rdar://problem/
64000666>
Differential Revision: https://reviews.llvm.org/D81210
Adrian Prantl [Fri, 5 Jun 2020 00:57:11 +0000 (17:57 -0700)]
Move GetXcode*Directory into HostInfo (NFC)
These functions really don't belong into PlatformDarwin, since they
actualy query state of the Host and not of the remote platform.
Matt Arsenault [Thu, 4 Jun 2020 02:06:49 +0000 (22:06 -0400)]
GlobalISel: Make known bits/alignment API more consistent
Just computing the alignment makes sense without caring about the
general known bits, such as for non-integral pointers. Separate the
two and start calling into the TargetLowering hooks for frame indexes.
Start calling the TargetLowering implementation for FrameIndexes,
which improves the AMDGPU matching for stack addressing modes. Also
introduce a new hook for returning known alignment of target
instructions. For AMDGPU, it would be useful to report the known
alignment implied by certain intrinsic calls.
Also stop using MaybeAlign.
Matt Arsenault [Sat, 16 May 2020 14:41:35 +0000 (10:41 -0400)]
GlobalISel: Add G_EXTRACT/G_INSERT offset to legalize info
Immediate legalize fields were added for G_SEXT_INREG. Simiarly, these
are likely not legal except for certain offsets.
Dan Gohman [Fri, 5 Jun 2020 18:52:11 +0000 (11:52 -0700)]
Revert "[WebAssembly] Improve clang diagnostics for wasm attributes"
It broke clang-check.
This reverts commit
931fcd3ba011c27626a95e5e35b657763284882a.
Jay Foad [Fri, 5 Jun 2020 16:12:32 +0000 (17:12 +0100)]
Correctly report modified status for AMDGPUUnifyDivergentExitNodes
Related to https://reviews.llvm.org/D80916
Differential Revision: https://reviews.llvm.org/D81271
Fangrui Song [Fri, 5 Jun 2020 18:46:50 +0000 (11:46 -0700)]
Fix -Wunused-variable after D80515
Nico Weber [Fri, 5 Jun 2020 18:39:04 +0000 (14:39 -0400)]
[gn build] (manually) merge
5eedf07ab999d
Yaxun (Sam) Liu [Fri, 5 Jun 2020 18:36:17 +0000 (14:36 -0400)]
Attempt to fix hip-include-path.hip
Matt Arsenault [Fri, 5 Jun 2020 17:57:29 +0000 (13:57 -0400)]
AMDGPU: Fix incorrect selection of buffer atomic fadd
There were additional standalone patterns for these nodes which were
missing the subtarget predicate.
Matt Arsenault [Fri, 5 Jun 2020 17:48:59 +0000 (13:48 -0400)]
AMDGPU: Fix missing immarg on buffer.atomic.fadd intrinsic
Craig Topper [Fri, 5 Jun 2020 17:49:21 +0000 (10:49 -0700)]
[X86] Teach combineVectorShiftImm to constant fold undef elements to 0 not undef.
Shifts are supposed to always shift in zeros or sign bits regardless of their inputs. It's possible the input value may have been replaced with undef by SimplifyDemandedBits, but the shift in zeros are still demanded.
This issue was reported to me by ispc from 10.0. Unfortunately their failing test does not fail on trunk. Seems to be because the shl is optimized out earlier now and doesn't become VSHLI.
ispc bug https://github.com/ispc/ispc/issues/1771
Differential Revision: https://reviews.llvm.org/D81212