River Riddle [Wed, 3 Jun 2020 01:20:38 +0000 (18:20 -0700)]
[mlir] Refactor BoolAttr to be a special case of IntegerAttr
This simplifies a lot of handling of BoolAttr/IntegerAttr. For example, a lot of places currently have to handle both IntegerAttr and BoolAttr. In other places, a decision is made to pick one which can lead to surprising results for users. For example, DenseElementsAttr currently uses BoolAttr for i1 even if the user initialized it with an Array of i1 IntegerAttrs.
Differential Revision: https://reviews.llvm.org/D81047
Mircea Trofin [Wed, 3 Jun 2020 00:48:02 +0000 (17:48 -0700)]
[docs] Referenced llvm workflow in HowToAddABuilder
Reviewers: gkistanova, dblaikie
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81046
Dan Gohman [Thu, 4 Jun 2020 22:55:08 +0000 (15:55 -0700)]
[WebAssembly] Fix a testcase to be independent of the sysroot default
As a followup to D62922, add a sysroot command-line option to this test
to ensure that the output is independent of any default sysroot options,
and adjust the reactor test to be more consistent with the command test.
Nicolas Vasilache [Thu, 4 Jun 2020 22:55:26 +0000 (18:55 -0400)]
[mlir][Linalg] Add a hoistViewAllocOps helper function
This revision adds a helper function to hoist alloc/dealloc pairs and
alloca op out of immediately enclosing scf::ForOp if both conditions are true:
1. all operands are defined outside the loop.
2. all uses are ViewLikeOp or DeallocOp.
This is now considered Linalg-specific and will be generalized on a per-need basis.
Differential Revision: https://reviews.llvm.org/D81152
Jan Korous [Thu, 4 Jun 2020 22:55:44 +0000 (15:55 -0700)]
[Analyzer][NoUncountedMembersChecker] Fix crash for C structs
Fixes https://bugs.llvm.org/show_bug.cgi?id=46177
Fixes second bug reported in https://bugs.llvm.org/show_bug.cgi?id=46142
Philip Reames [Thu, 4 Jun 2020 22:22:07 +0000 (15:22 -0700)]
[Statepoint] Switch RS4GC to using gc-live bundle form
Now that we have an operand based form for the GC arguments to a statepoint intrinsic, update RS4GC to use it and update tests to reflect. This is pretty straight forward. I nearly landed without review, but figured a second set of eyes didn't hurt.
Differential Revision: https://reviews.llvm.org/D81121
Petr Hosek [Thu, 4 Jun 2020 22:47:05 +0000 (15:47 -0700)]
[Fuchsia] Rely on linker switch rather than dead code ref for profile runtime
Follow the model used on Linux, where the clang driver passes the
linker a -u switch to force the profile runtime to be linked in,
rather than having every TU emit a dead function with a reference.
Differential Revision: https://reviews.llvm.org/D79835
Petr Hosek [Thu, 4 Jun 2020 22:44:10 +0000 (15:44 -0700)]
Revert "[Fuchsia] Rely on linker switch rather than dead code ref for profile runtime"
This reverts commit
d51054217403b47f452619e11318bd214749a845 since
it broke several bots.
Julian Lettner [Thu, 4 Jun 2020 21:48:42 +0000 (14:48 -0700)]
Make linter happy
Vedant Kumar [Thu, 4 Jun 2020 21:32:46 +0000 (14:32 -0700)]
[docs] HowToUpdateDebugInfo: Minor cleanups
- Change the reference to salvageDebugInfoOrUndef to salvageDebugInfo
(in accordance with https://reviews.llvm.org/D78369).
- Reorganize a few sections in preparation for an upcoming change that
attempts to specify rules for updating debug locations.
- Fix some intra-document links.
- Some spelling / wording fixes.
Yuanfang Chen [Tue, 2 Jun 2020 00:09:40 +0000 (17:09 -0700)]
[Docs] Add the entry for `Advanced builds` in UserGuide.rst
Also add a link to it from ThinLTO.rst.
Alexey Bataev [Thu, 4 Jun 2020 21:33:13 +0000 (17:33 -0400)]
Fix undefined behaviour when trying to deref nullptr.
Craig Topper [Thu, 4 Jun 2020 19:21:04 +0000 (12:21 -0700)]
[Reassociate] Teach ConvertShiftToMul to preserve nsw flag if the shift amount is not bitwidth - 1.
Multiply and shl have different signed overflow behavior in
some cases. But it looks like we should be ok as long as the
shift amount is less than bitwidth - 1.
Alive2: http://volta.cs.utah.edu:8080/z/MM4WZP
Differential Revision: https://reviews.llvm.org/D81189
Matt Arsenault [Thu, 4 Jun 2020 18:37:39 +0000 (14:37 -0400)]
AMDGPU: Fix overriding global FP atomic feature predicates
Global TableGen let override blocks are pretty dangerous and override
any local special cases. In this case, the broader HasFlatGlobalInsts
was overriding the more specific predicate for
FeatureAtomicFaddInsts. Make sure HasFlatGlobalInsts is implied by
FeatureAtomicFaddInsts, and make sure the right predicate is used.
One issue with independently setting the subtarget features on
incompatible targets is all of the encoding families do not define all
opcodes. This will hit an assert on gfx10 for example, since we set
the encoding independently based on the generation and not based on a
feature.
Matt Arsenault [Thu, 28 May 2020 00:12:11 +0000 (20:12 -0400)]
AMDGPU: Select strict_fmul
Matt Arsenault [Sat, 23 May 2020 17:56:02 +0000 (13:56 -0400)]
AMDGPU: Select strict_fma
Like with strict_fadd, the legalization is scalarizing the v4f16 when
it should split.
Matt Arsenault [Sat, 23 May 2020 14:41:40 +0000 (10:41 -0400)]
AMDGPU: Select strict_fadd
Diego Caballero [Thu, 4 Jun 2020 21:08:49 +0000 (14:08 -0700)]
[mlir] Add support for bf16 to StandardToLLVM conversion
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D81127
Matt Arsenault [Mon, 1 Jun 2020 18:04:02 +0000 (14:04 -0400)]
AMDGPU: Add test for fdiv nofpexcept preservation
This logically belongs with
89d48ccabe6a950369b2bd922b1d8e987b856ac7,
but this order was needed to avoid regressions before adding
mayRaiseFPExceptions to relevant instructions.
Matt Arsenault [Wed, 27 May 2020 01:56:53 +0000 (21:56 -0400)]
AMDGPU: Set mayRaiseFPException
This may be missing a few overrides to set it off still in some
special cases. Since the flags set during selection should now be
reliably preserved, this should not change codegen for non-strictfp
functions.
Sanjay Patel [Thu, 4 Jun 2020 21:25:22 +0000 (17:25 -0400)]
[InstCombine] avoid crashing on select-shuffle detection
As mentioned in the post-commit comments of D81013 -
the mask check API has to assume the shuffle is
not length-changing, but we have not ruled that out
in this code. Use the ShuffleVectorInst call instead.
Petr Hosek [Thu, 4 Jun 2020 21:24:33 +0000 (14:24 -0700)]
[Fuchsia] Rely on linker switch rather than dead code ref for profile runtime
Follow the model used on Linux, where the clang driver passes the
linker a -u switch to force the profile runtime to be linked in,
rather than having every TU emit a dead function with a reference.
Patch By: mcgrathr
Differential Revision: https://reviews.llvm.org/D79835
Shilei Tian [Thu, 4 Jun 2020 20:58:37 +0000 (16:58 -0400)]
[OpenMP] Improve D2D memcpy to use more efficient driver API
Summary:
In current implementation, D2D memcpy is first to copy data back to host and then
copy from host to device. This is very efficient if the device supports D2D
memcpy, like CUDA.
In this patch, D2D memcpy will first try to use native supported driver API. If
it fails, fall back to original way. It is worth noting that D2D memcpy in this
scenerio contains two ideas:
- Same devices: this is the D2D memcpy in the CUDA context.
- Different devices: this is the PeerToPeer memcpy in the CUDA context.
My implementation merges this two parts. It chooses the best API according to
the source device and destination device.
Reviewers: jdoerfert, AndreyChurbanov, grokos
Reviewed By: jdoerfert
Subscribers: yaxunl, guansong, sstefan1, openmp-commits
Tags: #openmp
Differential Revision: https://reviews.llvm.org/D80649
Yaxun (Sam) Liu [Fri, 24 Apr 2020 20:41:24 +0000 (16:41 -0400)]
[CUDA][HIP] Fix implicit HD function resolution
recommit
e03394c6a6ff with fix
When implicit HD function calls a function in device compilation,
if one candidate is an implicit HD function, current resolution rule is:
D wins over HD and H
HD and H are equal
this caused regression when there is an otherwise worse D candidate
This patch changes that to
D, HD and H are all equal
The rationale is that we already know for host compilation there is already
a valid candidate in HD and H candidates that will not cause error. Allowing
HD and H gives us a fall back candidate that will not cause error. If D wins,
that means D has to be a better match otherwise, therefore D should also
be a valid candidate that will not cause error. In this way, we can guarantee
no regression.
Differential Revision: https://reviews.llvm.org/D80450
Matt Arsenault [Thu, 4 Jun 2020 19:31:28 +0000 (15:31 -0400)]
AMDGPU: Fix using unencodable instructions in tests
There are a number of MIR tests using instructions on subtargets where
they don't really exist. These are some of the easy cases that don't
require splitting up test functions.
Matt Arsenault [Thu, 4 Jun 2020 19:21:20 +0000 (15:21 -0400)]
AMDGPU/GlobalISel: Fix making LDS FP atomics legal on SI/CI
Matt Arsenault [Thu, 4 Jun 2020 19:14:23 +0000 (15:14 -0400)]
AMDGPU/GlobalISel: Fix trying to use wave32 for gfx9 test
Alexey Bataev [Mon, 4 May 2020 20:19:31 +0000 (16:19 -0400)]
[OPENMP50]Codegen for inscan reductions in worksharing directives.
Summary:
Implemented codegen for reduction clauses with inscan modifiers in
worksharing constructs.
Emits the code for the directive with inscan reductions.
The code is the following:
```
size num_iters = <num_iters>;
<type> buffer[num_iters];
for (i: 0..<num_iters>) {
<input phase>;
buffer[i] = red;
}
for (int k = 0; k != ceil(log2(num_iters)); ++k)
for (size cnt = last_iter; cnt >= pow(2, k); --k)
buffer[i] op= buffer[i-pow(2,k)];
for (0..<num_iters>) {
red = InclusiveScan ? buffer[i] : buffer[i-1];
<scan phase>;
}
```
Reviewers: jdoerfert
Subscribers: yaxunl, guansong, arphaman, cfe-commits, caomhin
Tags: #clang
Differential Revision: https://reviews.llvm.org/D79948
Thomas Lively [Thu, 4 Jun 2020 20:25:10 +0000 (13:25 -0700)]
[WebAssembly] Lower llvm.debugtrap properly
Summary:
Unlike normal traps, debug traps are allowed to return and can have
additional instructions in the same basic block. Without explicit
backend support for debug traps, they are lowered in ISel as normal
traps. Since normal traps are lowered in the WebAssembly backend to
the UNREACHABLE instruction, which is a terminator, using debug traps
could lead to invalid MBBs when there are additional instructions
after the trap. This patch fixes the issue by lowering debug traps to
a new version of the UNREACHABLE instruction, DEBUG_UNREACHABLE, that
is not a terminator.
An alternative approach would have been to make UNREACHABLE not a
terminator, but that breaks a large number of tests. In particular, it
would require removing the traps inserted after noreturn calls to
@llvm.wasm.throw because otherwise the terminator throw would be
followed by a non-terminator UNREACHABLE and we would be back to
having invalid MBBs. Overall the approach in this patch seems simpler.
Reviewers: aheejin, dschuff
Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81055
Pete Steinfeld [Tue, 26 May 2020 22:12:15 +0000 (15:12 -0700)]
[flang] Fixed crash on forward referenced `len` parameter
Summary:
Using a forward reference to define a `len` parameter causes a crash.
The underlying cause was that a previously declared type had an
erroneous expression for its `LEN` param value. When this expression
was referenced to evaluate a subsequent expression, bad things happened.
I fixed this by putting in code to detect this case.
Reviewers: tskeith, klausler, DavidTruby
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80593
Huihui Zhang [Thu, 4 Jun 2020 19:43:51 +0000 (12:43 -0700)]
[NFC] Move test vscale-factor-out-constant.ll to AArch64 sub-directory.
Vscale scalable vector is specific to AArch64 target.
Bring back 'uglygep' check.
Eric Schweitz [Tue, 2 Jun 2020 20:58:12 +0000 (13:58 -0700)]
[flang] Add the conversions for types.
Part of lowering is to convert the front-end types to their FIR dialect representations. These conversions are done by here in the ConvertType module.
proactively update the code to conform better with LLVM coding conventions
Differential Revision: https://reviews.llvm.org/D81034
aartbik [Wed, 3 Jun 2020 23:54:26 +0000 (16:54 -0700)]
[mlir] [VectorOps] Add missing comments to CreateMaskOp lowering
Summary: Add missing comment to CreateMask. Fixed typo in ConstantMask comment.
Reviewers: nicolasvasilache, rriddle, reidtatge, ftynse
Reviewed By: ftynse
Subscribers: mehdi_amini, rriddle, jpienaar, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, stephenneuendorffer, Joonsoo, grosul1, frgossen, Kayjukh, jurahul
Tags: #mlir
Differential Revision: https://reviews.llvm.org/D81125
Florian Hahn [Thu, 4 Jun 2020 19:15:21 +0000 (20:15 +0100)]
[SemaOverload] Use iterator_range to iterate over VectorTypes (NFC).
We can simplify the code a bit by using iterator_range instead of
plain iterators. Matrix type support here (added in
6f6e91d19337)
already uses an iterator_range.
Reviewers: rjmccall, arphaman, jfb, Bigcheese
Reviewed By: rjmccall
Differential Revision: https://reviews.llvm.org/D81138
Dmitri Gribenko [Thu, 4 Jun 2020 18:20:33 +0000 (20:20 +0200)]
AST Matchers test: use arrays instead of vectors
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81180
Valentin Clement [Thu, 4 Jun 2020 18:47:13 +0000 (14:47 -0400)]
[flang] avoid GCC < 8 compiler failure after D80794
Summary:
Patch D80794 remove the custom flags for release build for flang.
This leads to build failure with GCC < 8. This patch add upperbound check
in order to avoid the -Werror=array-bounds to trigger a build failure.
```
/home/4vn/versioning/llvm-project/flang/lib/Decimal/big-radix-floating-point.h:183:29: error: array subscript is above array bounds [-Werror=array-bounds]
digit_[j] = digit_[j + remove];
~~~~~~^
/home/4vn/versioning/llvm-project/flang/lib/Decimal/big-radix-floating-point.h:183:29: error: array subscript is above array bounds [-Werror=array-bounds]
digit_[j] = digit_[j + remove];
~~~~~~^
/home/4vn/versioning/llvm-project/flang/lib/Decimal/big-radix-floating-point.h:183:29: error: array subscript is above array bounds [-Werror=array-bounds]
digit_[j] = digit_[j + remove];
~~~~~~^
/home/4vn/versioning/llvm-project/flang/lib/Decimal/big-radix-floating-point.h:183:29: error: array subscript is above array bounds [-Werror=array-bounds]
digit_[j] = digit_[j + remove];
~~~~~~^
/home/4vn/versioning/llvm-project/flang/lib/Decimal/big-radix-floating-point.h:183:29: error: array subscript is above array bounds [-Werror=array-bounds]
digit_[j] = digit_[j + remove];
```
```
/home/4vn/versioning/llvm-project/flang/include/flang/Evaluate/integer.h:809:28: error: array subscript is above array bounds [-Werror=array-bounds]
xy += product[to];
~~~~~~~^
/home/4vn/versioning/llvm-project/flang/include/flang/Evaluate/integer.h:810:22: error: array subscript is above array bounds [-Werror=array-bounds]
product[to] = xy & partMask;
~~~~~~~^
/home/4vn/versioning/llvm-project/flang/include/flang/Evaluate/integer.h:809:28: error: array subscript is above array bounds [-Werror=array-bounds]
xy += product[to];
~~~~~~~^
```
Reviewers: DavidTruby, sscalpone, jdoerfert
Reviewed By: DavidTruby
Subscribers: llvm-commits
Tags: #llvm, #flang
Differential Revision: https://reviews.llvm.org/D81179
Hiroshi Yamauchi [Mon, 1 Jun 2020 17:45:28 +0000 (10:45 -0700)]
[PGO] Enable the working set size scaling under the partial sample PGO.
Summary: Following up D79831.
Reviewers: davidxl
Subscribers: eraman, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80939
Sanjay Patel [Thu, 4 Jun 2020 18:17:59 +0000 (14:17 -0400)]
[InstCombine] move vector select ahead of select-shuffle
select Cond, (shuf_sel X, Y), X --> shuf_sel X, (select Cond, Y, X)
A select of a select-shuffle ("blend" in x86 lingo) can be reversed
so that the select is done first.
This is a more limited version of what I was trying in D80658,
but it enables existing demanded bits transforms to catch some of the
motivating cases. The tricky bit in that seems to be that by moving
the shuffle later, we can always guarantee that poison is correctly
inhibited by the shuffle mask in the final value.
Alive2 checks for the basic tests:
http://volta.cs.utah.edu:8080/z/Qqd3RK
http://volta.cs.utah.edu:8080/z/S4wchM
http://volta.cs.utah.edu:8080/z/wf9zPL
http://volta.cs.utah.edu:8080/z/wJeEGk
Differential Revision: https://reviews.llvm.org/D81013
Jan Korous [Thu, 4 Jun 2020 03:04:48 +0000 (20:04 -0700)]
[docs] Fix self-contradictory description of llvm_unreachable
Just two paragraphs above it says:
"If the compiler does not support this [skipping code generation for a particular branch], it will fall back
to the "abort" implementation."
And that actually correctly describes llvm_unreachable implementation.
Differential Revision: https://reviews.llvm.org/D81130
Eduardo Caldas [Thu, 4 Jun 2020 17:27:35 +0000 (19:27 +0200)]
Propose naming principle for NodeRole and apply it
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81157
Louis Dionne [Thu, 4 Jun 2020 18:04:01 +0000 (14:04 -0400)]
[libc++] Avoid warning for large types with std::atomic in the test suite
It is legitimate for the test suite to use types that are slow to use
with std::atomic, since we need coverage for those too. If we don't
disable the warning, it is promoted to an error, which prevents us
from testing such types.
LLVM GN Syncbot [Thu, 4 Jun 2020 17:56:21 +0000 (17:56 +0000)]
[gn build] Port
e53f5580578
LLVM GN Syncbot [Thu, 4 Jun 2020 17:56:21 +0000 (17:56 +0000)]
[gn build] Port
c973ad1878f
LLVM GN Syncbot [Thu, 4 Jun 2020 17:56:20 +0000 (17:56 +0000)]
[gn build] Port
ba2a01645b5
LLVM GN Syncbot [Thu, 4 Jun 2020 17:56:20 +0000 (17:56 +0000)]
[gn build] Port
69fa84a6e95
LLVM GN Syncbot [Thu, 4 Jun 2020 17:56:19 +0000 (17:56 +0000)]
[gn build] Port
6756a2c9533
LLVM GN Syncbot [Thu, 4 Jun 2020 17:56:19 +0000 (17:56 +0000)]
[gn build] Port
49a4f3f7d88
Huihui Zhang [Thu, 4 Jun 2020 17:46:32 +0000 (10:46 -0700)]
[NFC] Temporarily disable check for 'uglygep' while investigating some buildbot failure.
The purpose of vscale-factor-out-constant.ll is to check we are crashing
with blind cast 'Factor' in a MulExpr to SCEVConstant.
Thomas Raoux [Thu, 4 Jun 2020 17:45:53 +0000 (10:45 -0700)]
[mlir][gpu] Add subgroup Id/Size/Num to GPU dialect
Add SubgroupId, SubgroupSize and NumSubgroups to GPU dialect ops and add the
lowering of those ops to SPIRV.
Differential Revision: https://reviews.llvm.org/D81042
Amara Emerson [Wed, 3 Jun 2020 18:42:09 +0000 (11:42 -0700)]
[AArch64][GlobalISel] Move GlobalISel source files to a dedicated subdir.
Differential Revision: https://reviews.llvm.org/D81116
Jim Ingham [Thu, 4 Jun 2020 17:49:26 +0000 (10:49 -0700)]
Disable this test for Windows.
The printf expression crashes with the message:
Attempted to dereference an invalid pointer
Someone who knows more about Windows should suggest how to fix this.
Hans Wennborg [Thu, 4 Jun 2020 17:44:36 +0000 (19:44 +0200)]
Make regcoal_remat_empty_subrange.ll test require asserts build.
The -stress-sched flag is only available when asserts are enabled.
Jan Kratochvil [Thu, 4 Jun 2020 17:41:24 +0000 (19:41 +0200)]
[lldb] Fix SLEB128 decoding
Bug 46181 shows SLEB128 0xED9A924C00011151 decoded as 0xffffffff80011151.
LLDB show a wrong value for function argument
https://bugs.llvm.org/show_bug.cgi?id=46181
Differential Revision: https://reviews.llvm.org/D81119
Layton Kifer [Thu, 4 Jun 2020 17:33:03 +0000 (10:33 -0700)]
[TRE] Allow accumulator elimination when base case returns non-constant
Remove the requirement, that when performing accumulator elimination,
all other cases must return the same dynamic constant. We can do this by
initializing the accumulator with the identity value of the accumulation
operation, and inserting an additional operation before any return.
Differential Revision: https://reviews.llvm.org/D80844
Huihui Zhang [Thu, 4 Jun 2020 17:32:36 +0000 (10:32 -0700)]
[LSR][SCEVExpander] Avoid blind cast 'Factor' to SCEVConstant in FactorOutConstant.
Summary:
In SCEVExpander FactorOutConstant(), when GEP indexing into/over scalable vector,
it is legal for the 'Factor' in a MulExpr to be the size of a scalable vector
instead of a compile-time constant.
Current upstream crash with the test attached.
Reviewers: efriedma, sdesmalen, sanjoy.google, mkazantsev
Reviewed By: efriedma
Subscribers: hiraditya, javed.absar, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80973
Christopher Tetreault [Thu, 4 Jun 2020 16:57:36 +0000 (09:57 -0700)]
[SVE] Eliminate calls to default-false VectorType::get() from SystemZ
Reviewers: efriedma, jnspaulsson, kmclaughlin, sdesmalen, samparker, uweigand
Reviewed By: uweigand
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80329
Nathan James [Thu, 4 Jun 2020 16:58:23 +0000 (17:58 +0100)]
[clang-tidy] ignore builtin varargs from pro-type-vararg-check
Disables the check from warning on some built in vararg functions, Address [[ https://bugs.llvm.org/show_bug.cgi?id=45860 | Clang-tidy should not consider __builtin_constant_p a variadic function. ]]
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D80887
Zinovy Nis [Tue, 26 May 2020 06:06:59 +0000 (09:06 +0300)]
[clang-tidy][modernize-loop-convert] Make loop var type human readable
Differential Revision: https://reviews.llvm.org/D80536
ZequanWu [Thu, 4 Jun 2020 16:45:04 +0000 (09:45 -0700)]
[Doc] update ReleaseNotes with new warning note.
Alexey Bataev [Mon, 1 Jun 2020 16:39:25 +0000 (12:39 -0400)]
[OPENMP]Fix PR46146: Do not consider globalized variables as NRVO candidates.
Summary:
If the variables must be globalized in OpenMP mode (local automatic
variable, GPU compilation mode, the variable may escape its declaration
context by the reference or by the pointer), it should not be considered
as the NRVO candidate. Otherwise, incorrect the return value of the
function might not be updated.
Reviewers: jdoerfert
Subscribers: yaxunl, guansong, sstefan1, cfe-commits, caomhin
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80936
Fangrui Song [Thu, 4 Jun 2020 16:22:44 +0000 (09:22 -0700)]
Louis Dionne [Thu, 4 Jun 2020 16:03:04 +0000 (12:03 -0400)]
[libc++] Disable LLVM benchmarks in the Apple build
Fangrui Song [Thu, 4 Jun 2020 15:56:17 +0000 (08:56 -0700)]
[llvm-dwarfdump] Add a table header for -debug-line -verbose output
Like non-verbose output, so that it is easy to recognize the `Line,Column,File,ISA,Discriminator` column values.
Reviewed By: JDevlieghere, jhenderson
Differential Revision: https://reviews.llvm.org/D80874
Dmitri Gribenko [Thu, 4 Jun 2020 15:40:38 +0000 (17:40 +0200)]
Use libClangTesting in the unittest for AST matchers
Summary:
The unittest for AST matchers has its own way to specify language
standards. I unified it with the shared infrastructure from
libClangTesting.
Reviewers: jdoerfert, hlopko
Reviewed By: hlopko
Subscribers: mgorny, sstefan1, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81150
Louis Dionne [Thu, 4 Jun 2020 14:32:16 +0000 (10:32 -0400)]
[libc++] Merge the Apple install-libcxx and libcxxabi scripts
Also, refactor the now-merged script to remove code duplication in the
creation of universal dylibs.
Matt Arsenault [Thu, 4 Jun 2020 14:27:45 +0000 (10:27 -0400)]
DAG: Change computeKnownBitsForFrameIndex to be usable by GISel
This wasn't getting much value from the DAG or depth arguments, since
it's only called on the frame index root nodes. FrameIndexes can also
only return a scalar value, so it also didn't need DemandedElts.
Jonathan Coe [Thu, 4 Jun 2020 14:32:48 +0000 (15:32 +0100)]
[clang-format] Update GoogleStyle for C# code to match Google's internal C# style guide
Summary: Google's C# style guide is at https://google.github.io/styleguide/csharp-style.html
Reviewers: krasimir, MyDeveloperDay, sammccall
Reviewed By: MyDeveloperDay
Subscribers: cfe-commits, klimek
Tags: #clang-format, #clang
Differential Revision: https://reviews.llvm.org/D79715
Louis Dionne [Thu, 4 Jun 2020 14:18:50 +0000 (10:18 -0400)]
[libc++] Move away from the standalone build for Apple libc++ and libc++abi
Eduardo Caldas [Thu, 4 Jun 2020 14:12:15 +0000 (16:12 +0200)]
Rename arrow -> arrowToken for unified naming
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81155
Balázs Kéri [Thu, 4 Jun 2020 13:24:08 +0000 (15:24 +0200)]
[Analyzer][StreamChecker] Updated initialization of BugType's.
Summary:
BugType objects are initialized in-class instead of by lazy initialization.
FuchsiaHandleChecker does this already.
Reviewers: Szelethus, baloghadamsoftware, martong
Reviewed By: Szelethus
Subscribers: rnkovacs, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, gamesh411, Charusso, martong, ASDenysPetrov, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80725
Russell Gallop [Thu, 4 Jun 2020 13:56:09 +0000 (14:56 +0100)]
Revert "Relands "[YAMLVFSWriter][Test][NFC] Add couple tests" vol. 2"
This reverts commit
30949926f98576fbff8d5ad0390be5124ffacd7e.
This was failing on bot here:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/32749
Matt Arsenault [Wed, 3 Jun 2020 21:14:54 +0000 (17:14 -0400)]
RegAllocFast: Remove dead code
Alexey Bataev [Wed, 22 Apr 2020 14:18:04 +0000 (10:18 -0400)]
[OPENMP]Fix PR45383: type dependent array subscripts are diagnosed erroneously.
Summary:
If the array subscript expression is type depent, its analysis must be
delayed before its instantiation.
Reviewers: jdoerfert
Subscribers: yaxunl, guansong, caomhin, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D78637
Sanjay Patel [Thu, 4 Jun 2020 12:50:42 +0000 (08:50 -0400)]
[x86] add test/code comment for chain value use (PR46195); NFC
Denis Antrushin [Wed, 3 Jun 2020 14:08:48 +0000 (17:08 +0300)]
[TableGen] Handle (outs variable_ops)
When `variable_ops` is specified in `InOperandList` of instruction,
it behaves as expected, i.e., does not count as operand.
So for `(ins variable_ops)` instruction description will have 0
operands. However when used in OutOperandList it is counted as
operand. So `(outs variable_ops)` results in instruction with
one def.
This patch makes behavior of `variable_ops` in `out` list to match
that of `in` list.
Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D81095
LLVM GN Syncbot [Thu, 4 Jun 2020 12:56:45 +0000 (12:56 +0000)]
[gn build] Port
48cd9d9dd86
Pavel Labath [Wed, 3 Jun 2020 10:08:45 +0000 (12:08 +0200)]
[Support] Use outs() in ToolOutputFile
Summary:
If the output filename was specified as "-", the ToolOutputFile class
would create a brand new raw_ostream object referring to the stdout.
This patch changes it to reuse the llvm::outs() singleton.
At the moment, this change should be "NFC", but it does enable other
enhancements, like the automatic stdout/stderr synchronization as
discussed on D80803.
I've checked the history, and I did not find any indication that this
class *has* to use a brand new stream object instead of outs() --
indeed, it is special-casing "-" in a number of places already, so this
change fits the pattern pretty well. I suspect the main reason for the
current state of affairs is that the class was originally introduced
(r111595, in 2010) as a raw_fd_ostream subclass, which made any other
solution impossible.
Another potential benefit of this patch is that it makes it possible to
move the raw_ostream class out of the business of special-casing "-" for
stdout handling. That state of affairs does not seem appropriate because
"-" is a valid filename (albeit hard to access with a lot of command
line tools) on most systems. Handling "-" in ToolOutputFile seems more
appropriate.
To make this possible, this patch changes the return type of
llvm::outs() and errs() to raw_fd_ostream&. Previously the functions
were constructing objects of that type, but returning a generic
raw_ostream reference. This makes it possible for new ToolOutputFile and
other code to use raw_fd_ostream methods like error() on the outs()
object. This does not seem like a bad thing (since stdout is a file
descriptor which can be redirected to anywhere, it makes sense to ask it
whether the writing was successful or if it supports seeking), and
indeed a lot of code was already depending on this fact via the
ToolOutputFile "back door".
Reviewers: dblaikie, JDevlieghere, MaskRay, jhenderson
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81078
AndreyChurbanov [Thu, 4 Jun 2020 12:39:45 +0000 (15:39 +0300)]
[openmp] Fixed nonmonotonic schedule implementation.
Differential Revision: https://reviews.llvm.org/D80942
Sanjay Patel [Thu, 4 Jun 2020 12:33:24 +0000 (08:33 -0400)]
[x86] add FileCheck / assertions to test; NFC
Anastasia Stulova [Thu, 4 Jun 2020 11:29:02 +0000 (12:29 +0100)]
[OpenCL] Add cl_khr_extended_subgroup extensions.
Added extensions and their function declarations into
the standard header.
Patch by Piotr Fusik!
Tags: #clang
Differential Revision: https://reviews.llvm.org/D79781
Vince Bridgers [Mon, 1 Jun 2020 00:03:16 +0000 (19:03 -0500)]
[analyzer] Ignore calculated indices of <= 0 in VLASizeChecker
Summary:
See https://bugs.llvm.org/show_bug.cgi?id=46128. The checker does not
yet comprehend constraints involving multiple symbols, so it's possible
to calculate a VLA size that's negative or 0. A LIT is added to catch
regressions, and this change simply bails if a VLA size of 0 or less is
calculated.
Reviewers: balazske, NoQ, martong, baloghadamsoftware, Szelethus, gamesh411
Reviewed By: balazske, NoQ, Szelethus
Subscribers: xazax.hun, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, Charusso, ASDenysPetrov, cfe-commits, dkrupp
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80903
Sanjay Patel [Thu, 4 Jun 2020 12:17:53 +0000 (08:17 -0400)]
[PhaseOrdering] add more tests for vector reductions; NFC
More coverage for D80867.
Simon Moll [Thu, 4 Jun 2020 09:09:48 +0000 (11:09 +0200)]
[VP][Fix] canIgnoreVectorLength for scalable types
This patch fixes VPIntrinsic::canIgnoreVectorLength when used on a
VPIntrinsic with scalable vector types. Also includes new unittest cases
for the '<vscale x 1 x whatever>' and '%evl == vscale' corner cases.
David Green [Thu, 4 Jun 2020 11:31:42 +0000 (12:31 +0100)]
[ARM] FP16 conversion tests. NFC
Nico Weber [Thu, 4 Jun 2020 12:10:16 +0000 (08:10 -0400)]
[gn build] port some -Wno flags for gcc from the cmake build.
Eduardo Caldas [Thu, 4 Jun 2020 12:03:04 +0000 (14:03 +0200)]
Add support for IntegerLiteral in SyntaxTree
Reviewers: gribozavr2
Reviewed By: gribozavr2
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D81135
Max Kazantsev [Thu, 4 Jun 2020 11:54:23 +0000 (18:54 +0700)]
[InstCombine][NFC] Factor out constant check
We plan to add more transforms here. Besides, this check should be
done in the beginning just from function's name.
Max Kazantsev [Thu, 4 Jun 2020 11:14:30 +0000 (18:14 +0700)]
[Test] Add test showing missing opportunity of folding ICmp(Phi(Consts...))
Georgii Rymar [Thu, 4 Jun 2020 11:22:06 +0000 (14:22 +0300)]
[ObjectYAML] - Remove unused function. NFC.
Was introduced in D81005 by mistake.
Catched by BB:
http://lab.llvm.org:8011/builders/clang-ppc64le-rhel/builds/4070/steps/build%20stage%201/logs/stdio
Paul Walker [Mon, 1 Jun 2020 10:09:58 +0000 (10:09 +0000)]
[FileCheck] Implement equality operators for ExpressionValue.
Subscribers: hiraditya, thopre, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D81094
Yvan Roux [Thu, 4 Jun 2020 11:12:26 +0000 (13:12 +0200)]
[ARM][MachineOutliner] Remove unneeded dynamic allocation.
Simon Pilgrim [Thu, 4 Jun 2020 10:49:28 +0000 (11:49 +0100)]
[DAG] scalarizeBinOpOfSplats - extract from the source of splat vector (PR46189)
D79003/rG9fa58d1bf2f8 exposed an issue with scalarizeBinOpOfSplats that we were extracting from the splatted vector result instead of the source, the splat index is only valid for the source vector not the result, which may contain undefs, including at the splat index.
Tim Northover [Thu, 4 Jun 2020 10:15:03 +0000 (11:15 +0100)]
Revert "[DAGCombiner] avoid unnecessary indirection from SDNode/SDValue; NFCI"
This reverts commit
21dadd774f56778ef68c1ce307205dfbdacc793a.
In at least PromoteIntBinOps, they wanted to know about users of *all* values
produced by the node not just the integer being promoted. For example not
replacing chain users if the operation was a load breaks the ordering of the
DAG.
Georgii Rymar [Mon, 1 Jun 2020 09:13:02 +0000 (12:13 +0300)]
[yaml2obj] - Add a way to exclude specified sections from the section header.
This implements a new "Excluded" key that can be used
to exclude entries from section header:
```
SectionHeaderTable:
Sections:
...
Excluded:
- Name: .foo
```
Differential revision: https://reviews.llvm.org/D81005
Djordje Todorovic [Thu, 4 Jun 2020 09:59:04 +0000 (11:59 +0200)]
[CSInfo][MIPS] Describe parameter value loaded by ADDiu
Describe parameter's value loaded by MIPS ADDiu instruction.
When parameter's value is loaded into a register by mips ADDiu/DADDiu
instruction, it could be described correctly and emitted as
DW_AT_GNU_call_site_value.
Patch by Nikola Tesic
Differential revision: https://reviews.llvm.org/D78108
Florian Hahn [Thu, 4 Jun 2020 10:15:01 +0000 (11:15 +0100)]
[Sema] Remove unused matrix_begin/end helpers (NFC).
The matrix_types() helper returning an iterator range is used instead.
Simon Pilgrim [Thu, 4 Jun 2020 09:43:19 +0000 (10:43 +0100)]
[X86] Add test case for PR46189
Georgii Rymar [Thu, 4 Jun 2020 10:10:43 +0000 (13:10 +0300)]
Revert "[yaml2obj] - Allocate the file space for SHT_NOBITS sections in some cases."
This reverts commit
aa3a85cdaa4432ca389bdbf48049eaa64dc6e266.
There are problems with it. See here: https://reviews.llvm.org/D80629
Esme-Yi [Thu, 4 Jun 2020 10:09:06 +0000 (10:09 +0000)]
[PowerPC][NFC] Testing ROTL of v1i128.
Summary: A bug is reported in bugzilla-45628, where the swap_with_shift case can’t be matched to a single HW instruction xxswapd as expected. In fact the case matches the idiom of rotate, but PPC doesn’t support ROTL v1i128.
This is a NFC patch for testing ROTL with v1i128 at master.
Reviewed By: steven.zhang
Differential Revision: https://reviews.llvm.org/D81073
Kadir Cetinkaya [Thu, 4 Jun 2020 10:02:49 +0000 (12:02 +0200)]
[clangd] Fix build for gcc 7.4