YunQiang Su [Wed, 15 Jul 2020 09:11:36 +0000 (12:11 +0300)]
[mips] Rename FeatureMadd4 to FeatureNoMadd4. NFC
`FeatureMadd4` is used to disable `madd4`, and the corresponding feature
option is `(+-)nomadd4`. Renaming to the `FeatureNoMadd4` makes its
purpose clear.
Patch by YunQiang Su.
Differential Revision: https://reviews.llvm.org/D83780
lewis-revill [Wed, 15 Jul 2020 10:59:47 +0000 (11:59 +0100)]
[RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbt asm instructions
This patch provides optimization of bit manipulation operations by
enabling the +experimental-b target feature.
It adds matching of single block patterns of instructions to specific
bit-manip instructions from the ternary subset (zbt subextension) of the
experimental B extension of RISC-V.
It adds also the correspondent codegen tests.
This patch is based on Claire Wolf's proposal for the bit manipulation
extension of RISCV:
https://github.com/riscv/riscv-bitmanip/blob/master/bitmanip-0.92.pdf
Differential Revision: https://reviews.llvm.org/D79875
lewis-revill [Wed, 15 Jul 2020 10:57:29 +0000 (11:57 +0100)]
[RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbs asm instructions
This patch provides optimization of bit manipulation operations by
enabling the +experimental-b target feature.
It adds matching of single block patterns of instructions to specific
bit-manip instructions from the single-bit subset (zbs subextension) of
the experimental B extension of RISC-V.
It adds also the correspondent codegen tests.
This patch is based on Claire Wolf's proposal for the bit manipulation
extension of RISCV:
https://github.com/riscv/riscv-bitmanip/blob/master/bitmanip-0.92.pdf
Differential Revision: https://reviews.llvm.org/D79874
lewis-revill [Wed, 15 Jul 2020 10:55:44 +0000 (11:55 +0100)]
[RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbbp asm instructions
This patch provides optimization of bit manipulation operations by
enabling the +experimental-b target feature.
It adds matching of single block patterns of instructions to specific
bit-manip instructions belonging to both the permutation and the base
subsets of the experimental B extension of RISC-V.
It adds also the correspondent codegen tests.
This patch is based on Claire Wolf's proposal for the bit manipulation
extension of RISCV:
https://github.com/riscv/riscv-bitmanip/blob/master/bitmanip-0.92.pdf
Differential Revision: https://reviews.llvm.org/D79873
lewis-revill [Wed, 15 Jul 2020 10:53:06 +0000 (11:53 +0100)]
[RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbp asm instructions
This patch provides optimization of bit manipulation operations by
enabling the +experimental-b target feature.
It adds matching of single block patterns of instructions to specific
bit-manip instructions from the permutation subset (zbp subextension) of
the experimental B extension of RISC-V.
It adds also the correspondent codegen tests.
This patch is based on Claire Wolf's proposal for the bit manipulation
extension of RISCV:
https://github.com/riscv/riscv-bitmanip/blob/master/bitmanip-0.92.pdf
Differential Revision: https://reviews.llvm.org/D79871
lewis-revill [Wed, 15 Jul 2020 10:50:03 +0000 (11:50 +0100)]
[RISCV] Add matching of codegen patterns to RISCV Bit Manipulation Zbb asm instructions
This patch provides optimization of bit manipulation operations by
enabling the +experimental-b target feature.
It adds matching of single block patterns of instructions to specific
bit-manip instructions from the base subset (zbb subextension) of the
experimental B extension of RISC-V.
It adds also the correspondent codegen tests.
This patch is based on Claire Wolf's proposal for the bit manipulation
extension of RISCV:
https://github.com/riscv/riscv-bitmanip/blob/master/bitmanip-0.92.pdf
Differential Revision: https://reviews.llvm.org/D79870
John Brawn [Wed, 15 Jul 2020 11:17:31 +0000 (12:17 +0100)]
[DSE,MSSA] Recognise init_trampoline in getLocForWriteEx
This fixes an instance where MemorySSA-using Dead Store Elimination is failing
to do a transformation that the non-MemorySSA-using version does.
Differential Revision: https://reviews.llvm.org/D83783
Xing GUO [Wed, 15 Jul 2020 10:53:55 +0000 (18:53 +0800)]
[DWARFYAML] Remove useless conditional statement. NFC.
The conditional statement is useless after
3a48a632d00ef1c98042140f402337fe13cdff52.
Florian Hahn [Wed, 15 Jul 2020 10:49:24 +0000 (11:49 +0100)]
[LoopRotate] Remove unnecessary verifyMemorySSA calls.
The actual rotation happens in processLoop, so the second removed
call to verifyMemorySSA was unnecessary.
In fact, processLoop/rotateLoop already verify MemorySSA before
and after transforming each loop. Hence, both calls can be removed.
Pointed out by @lebedev.ri post-commit D51718.
Frederik Gossen [Wed, 15 Jul 2020 10:28:29 +0000 (10:28 +0000)]
[MLIR][Shape] Add `shape.shape_eq` operation
Add `shape.shape_eq` operation to the shape dialect.
The operation allows to test shapes and extent tensors for equality.
Differential Revision: https://reviews.llvm.org/D82528
Sam McCall [Tue, 14 Jul 2020 18:24:32 +0000 (20:24 +0200)]
[clangd] Config: also propagate in sync (testing) mode
Summary:
I hit this while trying to add a config-over-LSP lit test, which I think
is an appropriate way to test this feature.
That needs a few more changes though...
Reviewers: kadircet
Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D83802
Balázs Kéri [Wed, 15 Jul 2020 09:05:22 +0000 (11:05 +0200)]
[Analyzer] Report every bug if only uniqueing location differs.
Summary:
Two CSA bug reports where only the uniqueing location is different
should be treated as different problems. The role of uniqueing location
is to differentiate bug reports.
Reviewers: Szelethus, baloghadamsoftware, NoQ, vsavchenko, xazax.hun, martong
Reviewed By: NoQ
Subscribers: NoQ, 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/D83115
Hans Wennborg [Wed, 15 Jul 2020 09:40:53 +0000 (11:40 +0200)]
Bump the trunk major version to 12
and clear the release notes.
Georgii Rymar [Wed, 15 Jul 2020 10:00:02 +0000 (13:00 +0300)]
[LLD][ELF] - Update test after yaml2obj change. NFC.
Names of YAML keys changed in rG7a587ca93200c49e47fe205ce037895c81c5a542
Jessica Clarke [Wed, 15 Jul 2020 09:52:42 +0000 (10:52 +0100)]
[RISCV] Duplicate pseudo expansion comment to RISCVMCCodeEmitter
Follow-on from D77443. Although we're not fixing any of these
pseudo-instructions, the potential for them to be out of sync still
exists.
Jessica Clarke [Wed, 15 Jul 2020 09:48:41 +0000 (10:48 +0100)]
[RISCV] Fix RISCVInstrInfo::getInstSizeInBytes for atomics pseudos
Summary:
Without these, the generic branch relaxation pass will underestimate the
range required for branches spanning these and we can end up with
"fixup value out of range" errors rather than relaxing the branches.
Some of the instructions in the expansion may end up being compressed
but exactly determining that is awkward, and these conservative values
should be safe, if slightly suboptimal in rare cases.
Reviewers: asb, lenary, luismarques, lewis-revill
Reviewed By: asb, luismarques
Subscribers: hiraditya, rbar, johnrusso, simoncook, sabuasal, niosHD, kito-cheng, shiva0217, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, jfb, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, sameer.abuasal, apazos, evandro, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77443
Georgii Rymar [Tue, 14 Jul 2020 12:48:03 +0000 (15:48 +0300)]
[yaml2obj] - Rename FileHeader::SH* fields.
In D83482 we agreed to name e_* fields that are used for overriding
values (like e_phoff) as EPh* (e.g. EPhOff).
Currently we have a set of e_sh* fields that are named inconsistently
with this rule. This patch renames all of them.
Differential revision: https://reviews.llvm.org/D83766
Florian Hahn [Wed, 15 Jul 2020 09:30:48 +0000 (10:30 +0100)]
[Matrix] Only pass vector arg as overloaded type in MatrixBuilder.
In 2b3c505, the pointer arguments for the matrix load and store
intrinsics was changed to always be the element type of the vector
argument.
This patch updates the MatrixBuilder to not add the pointer type to the
overloaded types and adjusts the clang/mlir tests.
This should fix a few build failures on GreenDragon, including
http://green.lab.llvm.org/green/job/test-suite-verify-machineinstrs-x86_64-O0-g/7891/
Georgii Rymar [Tue, 14 Jul 2020 14:14:06 +0000 (17:14 +0300)]
[llvm-readobj] - Verify the location of program headers better.
This improves condition in the ELFFile::program_headers().
Previously if was possible to read the headers from the wrong place when
the value of e_phoff was so large that computation overflowed.
Differential revision: https://reviews.llvm.org/D83774
Andrew Ng [Mon, 13 Jul 2020 12:36:33 +0000 (13:36 +0100)]
[Support] Fix Windows directory_iterator_construct out of bounds
Fix incorrect use of the size of Path when accessing PathUTF16, as the
UTF-16 path can be shorter. Added unit test for coverage of this test
case.
Thanks to Ding Fei (danix800) for the code fix, see
https://reviews.llvm.org/D83321.
Differential Revision: https://reviews.llvm.org/D83689
Sam McCall [Wed, 15 Jul 2020 09:03:11 +0000 (11:03 +0200)]
[clangd] Fix use-after-free in ArgStripper
Tim Northover [Wed, 15 Jul 2020 08:57:53 +0000 (09:57 +0100)]
Fix typo in identifier in assert.
Tim Northover [Wed, 15 Jul 2020 08:11:36 +0000 (09:11 +0100)]
AArch64+ARM: make LLVM consider system registers volatile.
Some of the system registers readable on AArch64 and ARM platforms
return different values with each read (for example a timer counter),
these shouldn't be hoisted outside loops or otherwise interfered with,
but the normal @llvm.read_register intrinsic is only considered to read
memory.
This introduces a separate @llvm.read_volatile_register intrinsic and
maps all system-registers on ARM platforms to use it for the
__builtin_arm_rsr calls. Registers declared with asm("r9") or similar
are unaffected.
David Spickett [Thu, 2 Jul 2020 15:04:06 +0000 (16:04 +0100)]
[clang][Driver] Fix tool path priority test failures
Summary:
Failure type 1:
This test can fail when the path of the build includes the strings
we're checking for. E.g "/gcc" is found in ".../gcc_7.3.0/..."
To correct this look for '"' on the end of all matches. So that we
only match the end of paths printed by clang -###.
(which would be ".../gcc_7.3.0/.../gcc" for the example)
Also look for other gcc names like gcc-x.y.z in the first check.
This confirms that the copy of clang we made is isolated as expected.
Failure type 2:
If you use a triple like "powerpc64le-linux-gnu" clang actually reports
"powerpc64le-unknown-linux-gnu". Then it searches for the
former.
That combined with Mac OS adding a version number to cmake's triple
means we can't trust cmake or clang to give us the one default triple.
To fix the test, write to both names. As they don't overlap with our
fake triple, we're still showing that the lookup works.
Reviewers: MaskRay, stevewan
Reviewed By: stevewan
Subscribers: miyuki, JDevlieghere, steven.zhang, stevewan, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D83055
Raphael Isemann [Tue, 14 Jul 2020 12:26:59 +0000 (14:26 +0200)]
[lldb][formatters] Add support for printing NSConstantDate and fix distantPast value
Summary:
Certain `NSDate` constructors return a special `NSConstantDate` class which
currently ends up being unformatted as it's not in the list of supported classes
for the NSDate formatter. This patch adds that class to the supported class list
so LLDB produces a summary for it.
One of these special constructors is `[NSDate distantPast]` which returns the
date for `0001-01-01 00:00:00 UTC`. LLDB has a special case for formatting this
date but for some reason we did hardcode the wrong summary string in that
special case. Maybe the summary string was correct back when the code was
written but it isn't correct anymore (`distantPast` isn't actually defined to be
a special date but just some 'a guaranteed temporal boundary.' so maybe someone
changed the value in the last 10 years).
If someone else is wondering why we even have this special case for
`distantPast` but not for the future. The reason seems to be that our date
formatting for really old dates is off by 24 hours. So for example, adding one
second to `distantPast` will cause LLDB to print `0000-12-30 00:00:01 UTC`
(which is 24 hours behind the expected result). So to make our code appear to be
correct it seems we just hardcoded the most common NSDate result from that time
span. I'll replace that logic with a generic solution in a probably more
invasive follow up patch.
I also took the freedom to replace the magic value `-
63114076800` with some
constant + documentation. I heard there are some people that don't know from the
top of their head that there are
63114076800 seconds between 1. Jan 0001 and 1.
January 2001 in whatever calendar system NSDate is using.
Reviewers: mib, davide
Reviewed By: mib
Subscribers: JDevlieghere
Differential Revision: https://reviews.llvm.org/D83217
Simon Cook [Wed, 15 Jul 2020 08:23:35 +0000 (09:23 +0100)]
[RISCV] Add error checking for extensions missing separating underscores
Currently if two multi-letter extensions are provided in a -march=
string, the verification code checks the version of the first and
consumes the second, resulting in that part of the architecture
string being ignored. This adds a test that when a version number has
been parsed for an extension, there are no subsequent characters.
Differential Revision: https://reviews.llvm.org/D83819
Roger Ferrer Ibanez [Wed, 7 Aug 2019 15:31:29 +0000 (15:31 +0000)]
[DAGCombiner] Rebuild (setcc x, y, ==) from (xor (xor x, y), 1)
The existing code already considered this case. Unfortunately a typo in
the condition prevents it from triggering. Also the existing code, had
it run, forgot to do the folding.
This fixes PR42876.
Differential Revision: https://reviews.llvm.org/D65802
Roger Ferrer Ibanez [Wed, 7 Aug 2019 12:43:07 +0000 (12:43 +0000)]
[NFC] Add tests for boolean comparisons
They currently show that the not equal case may be improved.
See PR42876
Differential Revision: https://reviews.llvm.org/D65801
George Mitenkov [Wed, 15 Jul 2020 07:02:01 +0000 (10:02 +0300)]
[MLIR][SPIRVToLLVM] SPIRV function fix and nits
This patch addresses the comments from https://reviews.llvm.org/D83030 and
https://reviews.llvm.org/D82639. `this->` is removed when not inside the
template. Also, type conversion for `spv.func` takes `convertRegionTypes()`
in order to apply type conversion on all blocks within the function.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D83786
Stephan Herhut [Tue, 14 Jul 2020 14:23:19 +0000 (16:23 +0200)]
Make linalg::ReshapeOp implement ViewLikeOpInterface
Summary: A reshape aliases its input memref, so it acts like a view.
Differential Revision: https://reviews.llvm.org/D83773
Chen Zheng [Wed, 15 Jul 2020 06:44:17 +0000 (02:44 -0400)]
[IndVarSimplify] Uniformly use emplace_back for DeadInsts, nfc
Giorgis Georgakoudis [Wed, 15 Jul 2020 06:15:59 +0000 (23:15 -0700)]
[OpenMPOpt][NFC] Update checks for parallel_deletion test
Nicolas Vasilache [Tue, 14 Jul 2020 15:45:59 +0000 (11:45 -0400)]
[mlir][Vector] Degrade masking information when forwarding linalg.copy to vector.transfer
Summary:
linalg.copy + linalg.fill can be used to create a padded local buffer.
The `masked` attribute is only valid on this padded buffer.
When forwarding to vector.transfer ops, the attribute must be reset
conservatively.
Differential Revision: https://reviews.llvm.org/D83782
Giorgis Georgakoudis [Wed, 15 Jul 2020 00:01:15 +0000 (17:01 -0700)]
[OpenMPOpt] Fix preserved analyses return
Martin Storsjö [Mon, 13 Jul 2020 21:12:13 +0000 (00:12 +0300)]
[LLD] [MinGW] Implement the --file-alignment and --section-alignment options
Differential Revision: https://reviews.llvm.org/D83720
Mircea Trofin [Wed, 15 Jul 2020 02:32:37 +0000 (19:32 -0700)]
[llvm][NFC] Hide the tensorflow dependency from headers.
Summary:
This change avoids exposing tensorflow types when including TFUtils.h.
They are just an implementation detail, and don't need to be used
directly when implementing an analysis requiring ML model evaluation.
The TFUtils APIs, while generically typed, are still not exposed unless
the tensorflow C library is present, as they currently have no use
otherwise.
Reviewers: mehdi_amini, davidxl
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83843
Alex Bradbury [Wed, 15 Jul 2020 04:04:09 +0000 (05:04 +0100)]
[Attributor] Fix build of unittest with DBUILD_SHARED_LIBS=True
The dependencies in llvm/unittests/Transforms/IPO/CMakeLists.txt
introduced in revision
0750757e were incomplete, leading to link errors
for a DBUILD_SHARED_LIBS=True build.
Johannes Doerfert [Wed, 15 Jul 2020 03:46:38 +0000 (22:46 -0500)]
[OpenMP][FIX] Check only for deterministic part of a generated function name
Luofan Chen [Wed, 15 Jul 2020 03:48:08 +0000 (11:48 +0800)]
Revert "[Attributor] Track AA dependency using dependency graph"
This reverts commit
8df7af560aebce3f3de3541d039e17331c479831.
Johannes Doerfert [Sun, 28 Jun 2020 18:41:33 +0000 (13:41 -0500)]
[OpenMP][IRBuilder] Support nested parallel regions
During code generation we might change/add basic blocks so keeping a
list of them is fairly easy to break. Nested parallel regions were
enough. The new scheme does recompute the list of blocks to be outlined
once it is needed.
Reviewed By: anchu-rajendran
Differential Revision: https://reviews.llvm.org/D82722
Johannes Doerfert [Tue, 14 Jul 2020 02:35:03 +0000 (21:35 -0500)]
[CallGraph] Update callback call sites in RefreshCallGraph
Since D82572, we keep "reference" edges for callback call sites. While
not strictly necessary they can improve the traversal order. However, we
did not update them properly in case a pass removed the callback call
site which caused a verification error (PR46687). With this patch we
update these reference edges properly during the invocation of
`CallGraphSCCPass::RefreshCallGraph` in non-checking mode.
Reviewed By: sdmitriev
Differential Revision: https://reviews.llvm.org/D83718
Johannes Doerfert [Wed, 15 Jul 2020 00:11:30 +0000 (19:11 -0500)]
[OpenMP] Emit remarks during GPU state machine optimization
Since D83271 we can optimize the GPU state machine to avoid spurious
call edges that increase the register usage of kernels. With this patch
we inform the user why and if this optimization is happening and when it
is not.
Reviewed By: ye-luo
Differential Revision: https://reviews.llvm.org/D83707
Petr Hosek [Wed, 15 Jul 2020 02:56:10 +0000 (19:56 -0700)]
Revert "[CMake] Simplify CMake handling for zlib"
This reverts commit
8c1a79dc12f3cc600e16153961cd8cc50ba2c33b because
it fails when zlib isn't installed.
Luofan Chen [Wed, 15 Jul 2020 02:38:21 +0000 (10:38 +0800)]
[Attributor] Track AA dependency using dependency graph
Summary: This patch added dependency graph to the attributor so that we can dump the dependencies between AAs more easily. We can also apply general graph algorithms to the graph, making it easier for us to create deep wrappers.
Reviewers: jdoerfert, sstefan1, uenoku, homerdin, baziotis
Reviewed By: jdoerfert
Subscribers: jfb, okura, mgrang, kuter, lebedev.ri, hiraditya, uenoku, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78861
Luofan Chen [Wed, 15 Jul 2020 02:33:55 +0000 (10:33 +0800)]
Revert "[Attributor] [WIP] Track AA dependency using dependency graph"
This reverts commit
6b78ed60708b56d85c6d028e9a06ce24ec3c1ae5.
Petr Hosek [Thu, 30 Apr 2020 20:07:13 +0000 (13:07 -0700)]
[CMake] Simplify CMake handling for zlib
Rather than handling zlib handling manually, use find_package from CMake
to find zlib properly. Use this to normalize the LLVM_ENABLE_ZLIB,
HAVE_ZLIB, HAVE_ZLIB_H. Furthermore, require zlib if LLVM_ENABLE_ZLIB is
set to YES, which requires the distributor to explicitly select whether
zlib is enabled or not. This simplifies the CMake handling and usage in
the rest of the tooling.
This is a reland of abb0075 with all followup changes and fixes that
should address issues that were reported in PR44780.
Differential Revision: https://reviews.llvm.org/D79219
Luofan Chen [Wed, 15 Jul 2020 02:19:37 +0000 (10:19 +0800)]
[Attributor] [WIP] Track AA dependency using dependency graph
Summary: This patch added dependency graph to the attributor so that we can dump the dependencies between AAs more easily. We can also apply general graph algorithms to the graph, making it easier for us to create deep wrappers.
Reviewers: jdoerfert, sstefan1, uenoku, homerdin, baziotis
Reviewed By: jdoerfert
Subscribers: jfb, okura, mgrang, kuter, lebedev.ri, hiraditya, uenoku, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D78861
LLVM GN Syncbot [Wed, 15 Jul 2020 02:13:43 +0000 (02:13 +0000)]
[gn build] Port
0750757e80c
Luofan Chen [Wed, 15 Jul 2020 02:09:11 +0000 (10:09 +0800)]
[Attributor] Unittest for Attributor
Summary: This patch introduces basic unittest interface for the Attributor and a simple test case for casting.
Reviewers: jdoerfert, sstefan1, uenoku, homerdin, baziotis
Reviewed By: jdoerfert
Subscribers: mgorny, uenoku, kuter, okura, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83754
Carl Ritson [Wed, 15 Jul 2020 01:22:42 +0000 (10:22 +0900)]
[AMDGPU] Apply pre-emit s_cbranch_vcc optimation to more patterns
Add handling of s_andn2 and mask of 0.
This eliminates redundant instructions from uniform control flow.
Reviewed By: rampitec
Differential Revision: https://reviews.llvm.org/D83641
Luofan Chen [Wed, 15 Jul 2020 01:31:00 +0000 (09:31 +0800)]
[Attributor] Create getter function for the ID of the abstract attribute
Summary: The `getIdAddr()` function returns the address of the ID of the abstract attribute
Reviewers: jdoerfert, sstefan1, uenoku, homerdin, baziotis
Reviewed By: jdoerfert
Subscribers: okura, hiraditya, uenoku, kuter, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83172
Davide Italiano [Wed, 15 Jul 2020 01:51:56 +0000 (18:51 -0700)]
[ObjectFilePECOFF] Try to avoid unaligned access.
Fixes an UBSAN error.
Craig Topper [Wed, 15 Jul 2020 01:47:14 +0000 (18:47 -0700)]
[IR] Add a few asserts to provide a better failure signature if you try to create a load/store/alloca with no alignment or insertion position
If no alignment is specified we try to find the datalayout by using the insert position to get the module so we can get the datalayout. But if those are null, then we deference a null pointer.
This patch adds asserts to make the failure a little more obvious than just seg faulting.
Differential Revision: https://reviews.llvm.org/D83829
Richard Smith [Wed, 15 Jul 2020 01:19:46 +0000 (18:19 -0700)]
Make LazyCallThroughManager destructor virtual rather than arranging for
all clients to delete it via the correct dynamic type.
Adrian Prantl [Wed, 15 Jul 2020 01:12:19 +0000 (18:12 -0700)]
Fix the skipIfRosetta decorator
the form that takes func as an argument isn't compatible with the
optional bugnumber argument. This means that only correct for to use it is now
@skipIfRosetta(bugnumber='url')
Valentin Clement [Wed, 15 Jul 2020 00:50:10 +0000 (20:50 -0400)]
[flang] Fix out-of-tree build with missing acc_gen target
This pacth fix out-of-tree build of Flang after the introduction of acc_gen.
Reviewed By: sscalpone
Differential Revision: https://reviews.llvm.org/D83835
Valentin Clement [Wed, 15 Jul 2020 00:43:40 +0000 (20:43 -0400)]
[flang][openacc] Semantic checks for OpenACC 3.0 clauses validity
Summary: This patch adds semantic checking for the OpenACC 3.0 clauses validity.
Reviewers: sscalpone, tskeith, klausler, ichoyjx, DavidTruby, jdoerfert
Reviewed By: tskeith, klausler
Subscribers: mgorny, llvm-commits
Tags: #llvm, #flang
Differential Revision: https://reviews.llvm.org/D83807
Nico Weber [Wed, 15 Jul 2020 00:43:59 +0000 (20:43 -0400)]
[gn build] (manually) merge
c1e2f73c
Richard Smith [Wed, 15 Jul 2020 00:12:46 +0000 (17:12 -0700)]
Fix undefined behavior due to deleting an object with a non-virtual
destructor via a pointer of the wrong static type.
This caused crashes during deallocation in C++14 builds when using a
deallocator whose sized delete requires the size argument to be correct.
Also make the LazyCallThroughManager destructor protected to catch this
sort of bug in the future.
Richard Smith [Wed, 15 Jul 2020 00:06:27 +0000 (17:06 -0700)]
Fix test that was accidentally adding the llvm-as binary into an
IR archive.
peter klausler [Tue, 14 Jul 2020 19:31:16 +0000 (12:31 -0700)]
[flang] Fix list-directed input (repeated nulls and LOGICAL)
Allow repeated nulls in list-directed input (e.g., "4*,") and
ignore excess characters in list-directed LOGICAL input after the
T or F.
Fixes FCVS test fm923.f.
Reviewed By: sscalpone
Differential Revision: https://reviews.llvm.org/D83810
Jonas Devlieghere [Tue, 14 Jul 2020 23:17:10 +0000 (16:17 -0700)]
[lldb/Test] Create reproducer dir if necessary
Create the reproducer directory under the build root if it doesn't
exists. The reproducer will only create the top level directory.
peter klausler [Tue, 14 Jul 2020 18:28:03 +0000 (11:28 -0700)]
[flang] Implement anonymous units in the runtime
I/O from/to an unopened unit number needs to open &/or create
a "fort.$UNIT" file.
Fixes FCVS test fm401.f.
Reviewed By: tskeith
Differential Revision: https://reviews.llvm.org/D83809
Matt Arsenault [Tue, 14 Jul 2020 21:06:32 +0000 (17:06 -0400)]
AMDGPU: Add @LINE to assembler error test checks
It was basically impossible to figure out where the failure point was
Dokyung Song [Tue, 14 Jul 2020 22:25:51 +0000 (22:25 +0000)]
[libFuzzer] Fix compilation error by including missing platform macro definitions.
Summary: This patch fixes sanitizer-windows build errors.
Reviewers: morehouse, hctim
Reviewed By: morehouse, hctim
Subscribers: #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D83823
Pete Steinfeld [Tue, 14 Jul 2020 17:08:34 +0000 (10:08 -0700)]
[flang] Fix a crash when an array constructor contains an unlimited polymorphic value
Summary:
C7113 States that "An ac-value shall not be unlimited polymorphic." We failed
to detect this situation which resulted in a crash when trying to get the
underlying derived type specification of the unlimited polymorphic value.
I added code to avoid the crash, code to emit an error message, and a test.
Reviewers: klausler, tskeith, DavidTruby
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83793
Arthur Eubanks [Tue, 14 Jul 2020 22:04:30 +0000 (15:04 -0700)]
Revert "[compiler-rt][Android] Stop using detect_target_arch"
This reverts commit
9b7e24c2a5b32e25b773bc8b4ca84dbda995d959.
See comments in https://reviews.llvm.org/D82148.
Steven Wu [Tue, 14 Jul 2020 21:39:51 +0000 (14:39 -0700)]
[clang] Teach -fembed-bitcode option not to embed W_value Group
Summary:
-fembed-bitcode options doesn't embed warning options since they are
useless to code generation. Make sure it handles the W_value group and
not embed those options in the output.
Reviewers: zixuw, arphaman
Reviewed By: zixuw
Subscribers: jkorous, dexonsmith, ributzka, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D83813
Dokyung Song [Tue, 14 Jul 2020 21:02:32 +0000 (21:02 +0000)]
[libFuzzer] Separate platform related macros out from FuzzerDefs.h into FuzzerPlatform.h, and adjust includes in other files.
Summary: This patch separates platform related macros in lib/fuzzer/FuzzerDefs.h into lib/fuzzer/FuzzerPlatform.h, and use FuzzerPlatform.h where necessary. This separation helps when compiling libFuzzer's interceptor module (under review); an unnecessary include of standard headers (such as string.h) may produce conflicts/ambiguation with the interceptor's declarations/definitions of library functions, which complicates interceptor implementation.
Reviewers: morehouse, hctim
Reviewed By: morehouse
Subscribers: krytarowski, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D83805
Christopher Tetreault [Tue, 14 Jul 2020 20:36:33 +0000 (13:36 -0700)]
[SVE] Make cstfp_pred_ty and cst_pred_ty work with scalable splats
Reviewers: efriedma, lebedev.ri, fhahn, c-rhodes, david-arm
Reviewed By: efriedma, david-arm
Subscribers: tschuett, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83001
Nathan James [Tue, 14 Jul 2020 21:19:36 +0000 (22:19 +0100)]
[clang-tidy] OptionsView::store specialized on bool
Following on
fcf7cc268fe and
672207c319a which granted checks the ability to read boolean configuration arguments as `true` or `false`.
This enables storing the options back to the configuration file using `true` and `false`.
This is in line with how clang-format dumps boolean options in its style config.
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D83053
Luboš Luňák [Sat, 11 Jul 2020 13:07:27 +0000 (15:07 +0200)]
document -fpch-instantiate-templates in release notes
This should have been included in D69585.
Differential Revision: https://reviews.llvm.org/D83622
peter klausler [Tue, 14 Jul 2020 17:16:30 +0000 (10:16 -0700)]
[flang] Refine CR handling
We need to retain carriage return characters in source files
that are not parts of multi-byte line endings; they are
significant in CHARACTER literal constants.
Reviewed By: tskeith
Differential Revision: https://reviews.llvm.org/D83808
Mircea Trofin [Tue, 14 Jul 2020 05:30:25 +0000 (22:30 -0700)]
[llvm][NFC] expose LLVM_HAVE_TF_API through llvm-config.h
Summary:
This allows users of the llvm library discover whether llvm was built
with the tensorflow c API dependency, which helps if using the TFUtils
wrapper, for example.
We don't do the same for the LLVM_HAVE_TF_AOT flag, because that does
not expose any API.
Reviewers: mehdi_amini, davidxl
Subscribers: mgorny, aaron.ballman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83746
Jonas Devlieghere [Tue, 14 Jul 2020 21:07:06 +0000 (14:07 -0700)]
[lldb/Test] Skip TestProcessConnect.py on Windows
Remote connections are not supported on Windows.
Jonas Devlieghere [Tue, 14 Jul 2020 19:12:05 +0000 (12:12 -0700)]
[lldb/Test] Always set the cleanupSubprocesses tear down hook
Always clean up subprocesses on tear down instead of relying on the
caller to do so. This is not only less error prone but also means the
tests can be more concise.
Differential revision: https://reviews.llvm.org/D83787
Tyker [Tue, 14 Jul 2020 20:52:12 +0000 (22:52 +0200)]
Louis Dionne [Tue, 14 Jul 2020 20:28:41 +0000 (16:28 -0400)]
[libc++] Automatically detect whether RTTI is enabled
Instead of detecting it automatically but also allowing for the setting
to be specified explicitly, always detect whether exceptions are enabled
based on whether -fno-rtti (or equivalent) is used. It's less confusing
to have a single way of tweaking that knob.
This change follows the lead of
71d88cebfb42.
Fangrui Song [Tue, 14 Jul 2020 20:44:00 +0000 (13:44 -0700)]
[MC] Support .reloc sym+constant, *, *
For `.reloc offset, *, *`, currently offset can be a constant or symbol.
This patch makes it support any expression which can be folded to sym+constant.
Reviewed By: stefanp
Differential Revision: https://reviews.llvm.org/D83751
peter klausler [Tue, 14 Jul 2020 19:38:03 +0000 (12:38 -0700)]
[flang] Tuning up binary->decimal conversion
Use short division of big-radix values by powers of two when
converting values with negative unbiased exponents rather than
multiplication by smaller powers of five; this reduces the overall
outer iteration count. This change is a win across the entire range
of inputs.
Reviewed By: tskeith
Differential Revision: https://reviews.llvm.org/D83806
River Riddle [Tue, 14 Jul 2020 20:14:14 +0000 (13:14 -0700)]
[mlir] Add support for parsing optional Attribute values.
This adds a `parseOptionalAttribute` method to the OpAsmParser that allows for parsing optional attributes, in a similar fashion to how optional types are parsed. This also enables the use of attribute values as the first element of an assembly format optional group.
Differential Revision: https://reviews.llvm.org/D83712
Giorgis Georgakoudis [Wed, 8 Jul 2020 05:43:24 +0000 (22:43 -0700)]
[CallGraph] Ignore callback uses
Summary:
Ignore callback uses when adding a callback function
in the CallGraph. Callback functions are typically
created when outlining, e.g. for OpenMP, so they have
internal scope and linkage. They should not be added
to the ExternalCallingNode since they are only callable
by the specified caller function at creation time.
A CGSCC pass, such as OpenMPOpt, may need to update
the CallGraph by adding a new outlined callback function.
Without ignoring callback uses, adding breaks CGSCC
pass restrictions and results to a broken CallGraph.
Reviewers: jdoerfert
Subscribers: hiraditya, sstefan1, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83370
River Riddle [Tue, 14 Jul 2020 19:55:58 +0000 (12:55 -0700)]
[mlir][DialectConversion] Emit an error if an operation marked as erased has live users after conversion
Up until now, there has been an implicit agreement that when an operation is marked as
"erased" all uses of that operation's results are guaranteed to be removed during conversion. How this works in practice is that there is either an assert/crash/asan failure/etc. This revision adds support for properly detecting when an erased operation has dangling users, emits and error and fails the conversion.
Differential Revision: https://reviews.llvm.org/D82830
Krzysztof Pszeniczny [Tue, 14 Jul 2020 18:55:41 +0000 (11:55 -0700)]
Call Frame Information (CFI) Handling for Basic Block Sections
This patch handles CFI with basic block sections, which unlike DebugInfo does
not support ranges. The DWARF standard explicitly requires emitting separate
CFI Frame Descriptor Entries for each contiguous fragment of a function. Thus,
the CFI information for all callee-saved registers (possibly including the
frame pointer, if necessary) have to be emitted along with redefining the
Call Frame Address (CFA), viz. where the current frame starts.
CFI directives are emitted in FDE’s in the object file with a low_pc, high_pc
specification. So, a single FDE must point to a contiguous code region unlike
debug info which has the support for ranges. This is what complicates CFI for
basic block sections.
Now, what happens when we start placing individual basic blocks in unique
sections:
* Basic block sections allow the linker to randomly reorder basic blocks in the
address space such that a given basic block can become non-contiguous with the
original function.
* The different basic block sections can no longer share the cfi_startproc and
cfi_endproc directives. So, each basic block section should emit this
independently.
* Each (cfi_startproc, cfi_endproc) directive will result in a new FDE that
caters to that basic block section.
* Now, this basic block section needs to duplicate the information from the
entry block to compute the CFA as it is an independent entity. It cannot refer
to the FDE of the original function and hence must duplicate all the stuff that
is needed to compute the CFA on its own.
* We are working on a de-duplication patch that can share common information in
FDEs in a CIE (Common Information Entry) and we will present this as a follow up
patch. This can significantly reduce the duplication overhead and is
particularly useful when several basic block sections are created.
* The CFI directives are emitted similarly for registers that are pushed onto
the stack, like callee saved registers in the prologue. There are cfi
directives that emit how to retrieve the value of the register at that point
when the push happened. This has to be duplicated too in a basic block that is
floated as a separate section.
Differential Revision: https://reviews.llvm.org/D79978
Tyker [Tue, 14 Jul 2020 19:41:45 +0000 (21:41 +0200)]
[NFC] Add debug and stat counters to assume queries and assume builder
Summary:
Add debug counter and stats counter to assume queries and assume builder
here is the collected stats on a build of check-llvm + check-clang.
"assume-builder.NumAssumeBuilt": 2720879,
"assume-builder.NumAssumesMerged": 761396,
"assume-builder.NumAssumesRemoved": 1576212,
"assume-builder.NumBundlesInAssumes": 6518809,
"assume-queries.NumAssumeQueries":
85566380,
"assume-queries.NumUsefullAssumeQueries": 2727360,
the NumUsefullAssumeQueries stat is actually pessimistic because in a few places queries
ask to keep providing information to try to get better information. and this isn't counted
as a usefull query evem tho it can be usefull
Reviewers: jdoerfert
Reviewed By: jdoerfert
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D83506
Sam McCall [Tue, 14 Jul 2020 17:04:55 +0000 (19:04 +0200)]
[clangd] Config: on by default
Summary: (Possible to flip back on the branch if this breaks things)
Reviewers: kadircet
Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D83790
Eric Christopher [Tue, 14 Jul 2020 19:33:50 +0000 (12:33 -0700)]
Fix a -Wunused-variable warning.
Jan Sjodin [Mon, 22 Jun 2020 17:04:12 +0000 (13:04 -0400)]
llvm-link: Add support for archive files as inputs
This patch adds support for archive files as inputs to llvm-link. One
of the use-cases is for OpenMP, where device specific libraries need
to be extracted from libraries containing bundled object files. The
clang-offload-bundler will support extracting these archives, which
will be passed into llvm-link, see https://reviews.llvm.org/D80816.
Reviewed By: jdoerfert
Differential Revision: https://reviews.llvm.org/D81109
Teresa Johnson [Tue, 17 Mar 2020 18:08:35 +0000 (11:08 -0700)]
Restore "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP"
This restores commit
80d0a137a5aba6998fadb764f1e11cb901aae233, and the
follow on fix in
873c0d0786dcf22f4af39f65df824917f70f2170, with a new
fix for test failures after a 2-stage clang bootstrap, and a more robust
fix for the Chromium build failure that an earlier version partially
fixed. See also discussion on D75201.
Reviewers: evgeny777
Subscribers: mehdi_amini, Prazek, hiraditya, steven_wu, dexonsmith, arphaman, davidxl, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D73242
AlexisPerry [Mon, 13 Jul 2020 16:15:00 +0000 (10:15 -0600)]
[flang] Change the default F18_FC to gfortran
Summary: Changed default F18_FC from pgf90 to gfortran. Removed unnecessary references to pgf90 in favor of more generic naming.
Reviewers: sscalpone, richard.barton.arm, DavidTruby, jdoerfert, clementval
Reviewed By: sscalpone, richard.barton.arm, clementval
Subscribers: sstefan1, tskeith, klausler, clementval, flang-commits, llvm-commits
Tags: #llvm, #flang
Differential Revision: https://reviews.llvm.org/D83488
Sjoerd Meijer [Tue, 14 Jul 2020 10:01:05 +0000 (11:01 +0100)]
[Matrix] Intrinsic descriptions
This changes the matrix load/store intrinsic definitions to load/store from/to
a pointer, and not from/to a pointer to a vector, as discussed in D83477.
This also includes the recommit of "[Matrix] Tighten LangRef definitions and
Verifier checks" which adds improved language reference descriptions of the
matrix intrinsics and verifier checks.
Differential Revision: https://reviews.llvm.org/D83785
George Mitenkov [Tue, 14 Jul 2020 17:02:51 +0000 (20:02 +0300)]
[MLIR][StdToSPIRV] Fixed a typo in ops conversion tests
Fixed a typo in `std-ops-to-spitv.mlir` test.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D83791
Sam McCall [Tue, 14 Jul 2020 18:44:59 +0000 (20:44 +0200)]
[clangd] Make config::Provider::combine non-owning. NFC
This is a prerequisite for having ClangdLSPServer inject its own.
Sterling Augustine [Tue, 14 Jul 2020 00:19:01 +0000 (17:19 -0700)]
Desugar class type for iterator lookup.
Summary:
Without this, printing sets and maps hidden behind
using declarations fail.
Reviewers: #libc!
Subscribers: libcxx-commits
Tags: #libc
Differential Revision: https://reviews.llvm.org/D83732
Valentin Clement [Tue, 14 Jul 2020 18:28:34 +0000 (14:28 -0400)]
[flang][openacc] OpenACC 3.0 parser
Summary:
This patch introduce the parser for OpenACC 3.0 in Flang. It uses the same TableGen mechanism
than OpenMP.
Reviewers: nvdatian, sscalpone, tskeith, klausler, ichoyjx, jdoerfert, DavidTruby
Reviewed By: klausler
Subscribers: MaskRay, SouraVX, mgorny, hiraditya, jfb, sstefan1, llvm-commits
Tags: #llvm, #flang
Differential Revision: https://reviews.llvm.org/D83649
Matt Arsenault [Sun, 21 Jun 2020 01:38:43 +0000 (21:38 -0400)]
TableGen/GlobalISel: Partially fix nontrivial, custom predicates
Currently custom code predicates can only really be used for
contextless checks tied to a single instruction (e.g. check the def
for hasOneUse). If you do want to inspect the input instructions in
the source pattern, you cannot without re-verifying the opcode and
type checks implied by the patterns, since this check was emitted
before any operand constraints. Really, these are pattern level
predicates that implicitly depend on the instruction and operand
checks.
Introduce a filtering function so the custom predicate is emitted
last. I'm not sure this is the most elegant solution. It seems like
this is really a different thing from the InstructionMatcher/IPM_
predicate kinds. I initially tried keeping this in a separate
predicate list, but that also seemed awkward.
This only half fixes the problem I'm trying to solve. The AMDGPU
pattern I'm attempting to port also uses the PredicateCodeUsesOperands
feature to allow checks on the source operands when the input pattern
is commuted. Really the emitter should reject the pattern since it
doesn't handle this case, but at this point it would be more
productive to just implement this.
Davide Italiano [Tue, 14 Jul 2020 18:25:32 +0000 (11:25 -0700)]
[ObjC] Wrap namespace-global structs in an anonymous namespace to avoid ODR violations
<rdar://problem/
65537147>
Differential Revision: https://reviews.llvm.org/D83796
Uday Bondhugula [Tue, 14 Jul 2020 17:53:11 +0000 (23:23 +0530)]
[MLIR] [NFC] Buffer placement pass - clang tidy warnings
Add missing const - addresses clang tidy warnings.
Differential Revision: https://reviews.llvm.org/D83794
Vedant Kumar [Tue, 14 Jul 2020 18:16:09 +0000 (11:16 -0700)]
Update ubsan_interface.inc for D71491 (second try)
I mistyped the ubsan objc_cast handler names on the first try.
Testing:
./bin/llvm-lit projects/compiler-rt/test/asan/X86_64HDarwinConfig/TestCases/Darwin/interface_symbols_darwin.cpp
Lang Hames [Tue, 14 Jul 2020 16:31:14 +0000 (09:31 -0700)]
[ORC] Don't take ownership of the trampoline pool in LazyReexportsManager.
LazyReexportsManager instances use the trampoline pool, but they don't need to
own it. Keeping TrampolinePool ownership separate allows re-use of the
trampoline pool by other clients.