Commit Graph

369361 Commits

Author SHA1 Message Date
Mikhail Maltsev a3c16039b3 [clang] Use SourceLocation as key in std::map, NFCI
SourceLocation implements `operator<`, so `SourceLocation`-s can be used
as keys in `std::map` directly, there is no need to extract the internal
representation.

Since the `operator<` simply compares the internal representations of
its operands, this patch does not introduce any functional changes.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D89705
2020-10-19 18:31:05 +01:00
Florian Hahn 3cbdae22b9 [SCEV] Add tests where assumes can be used to improve tripe multiple.
This patch adds a set of tests where information from assumes can be
used to improve the trip multiple.

See PR47904.
2020-10-19 18:26:09 +01:00
Louis Dionne ec0dc70efc [libc++] Add more tests for operator<< on std::complex 2020-10-19 13:23:59 -04:00
Amy Kwan 6a946fd06f [DAGCombiner][PowerPC] Remove isMulhCheaperThanMulShift TLI hook, Use isOperationLegalOrCustom directly instead.
MULH is often expanded on targets.
This patch removes the isMulhCheaperThanMulShift hook and uses
isOperationLegalOrCustom instead.

Differential Revision: https://reviews.llvm.org/D80485
2020-10-19 12:23:04 -05:00
Jonas Devlieghere 97b8e2c1f0 [llvm] Make obj2yaml and yaml2obj LLVM utilities instead of tools
For testing purposes I need a way to build and install FileCheck and
yaml2obj. I had to choose between making FileCheck an LLVM tool and
making obj2yaml and yaml2obj utilities. I think the distinction is
rather arbitrary but my understanding is that tools are things meant for
the toolchain while utilities are more used for things like testing,
which is the case here.

The functional difference is that these tools now end up in the
${LLVM_UTILS_INSTALL_DIR}, which defaults to the ${LLVM_TOOLS_INSTALL_DIR}.
Unless you specified a different value or you added obj2yaml and
yaml2obj to ${LLVM_TOOLCHAIN_TOOLS}, this patch shouldn't change
anything.

Differential revision: https://reviews.llvm.org/D89357
2020-10-19 10:21:21 -07:00
Tony 151e297034 [AMDGPU] Simplify cumode handling in SIMemoryLegalizer
Differential Revision: https://reviews.llvm.org/D89663
2020-10-19 17:13:45 +00:00
Tony 89d71970cb [AMDGPU] Extend hip-toolchin-features.hip test
- Extend hip-toolchin-features.hip to also check the lld attributes
  are passed correctly.

- Add check for cumode attributes.

Differential Revision: https://reviews.llvm.org/D89636
2020-10-19 17:11:08 +00:00
Tony ceb9940b39 [AMDGPU] Correct hsa-diag-v3.s test
- Use file_check -LABEL markers to prevent false positives being
  reported due to messages from different tests causing success to be
  reported.

- Add checks for all the run commands for more robust testing.

- Add checks for the absence of errors.

- Name and order tests more sensibly.

Differential Revision: https://reviews.llvm.org/D89635
2020-10-19 17:08:13 +00:00
Mircea Trofin 225065b9a8 [NFC][MC] Type [MC]Register uses in MachineTraceMetrics
Differential Revision: https://reviews.llvm.org/D89710
2020-10-19 09:49:52 -07:00
Alex Richardson 8041f13e62 [libc++] Skip tests using constexpr destructors with older clang versions
It appears that the released version of clang that supports constexpr
destructors is clang 10 and the oldest one that accepts -std=c++2a is 5,
so mark these as UNSUPPORTED for clang-5 to clang-9.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D89704
2020-10-19 17:23:02 +01:00
sameeran joshi 4a51691a85 [Flang][OpenACC] Fix for branching out issue in OpenACC parallel construct.
From OpenACC 3.0 Standards document
	840 • A program may not branch into or out of an OpenACC parallel construct.
	Exits are allowed provided it does not cause an exit outside the parallel region.

	Test case exits out of the inner do loop, but it is still inside the parallel region.
	Patch tries to extract labels from block attached to a construct,
	If the exit is to a label not in the collected list then flags an error.

Reviewed By: tskeith

Differential Revision: https://reviews.llvm.org/D87906
2020-10-19 21:46:47 +05:30
Louis Dionne b4bd194378 [libc++] Refactor the fuzzing tests
Define all the fuzzing tests in libcxx/test/libcxx/fuzzing, and get
rid of the ad-hoc libcxx/fuzzing directory, which wasn't properly
integrated with the build system or test suite.

As a fly-by change, this also reduces the dependencies of fuzzing tests
on large library components like <iostream>, to make them work on more
platforms.
2020-10-19 12:11:50 -04:00
Lang Hames c89447b659 [ORC] Fix unused variable warning. 2020-10-19 09:06:33 -07:00
Simon Pilgrim adb52e5f9e [InstCombine] foldOrOfICmps - only fold (icmp_eq B, 0) | (icmp_ult/gt A, B) for integer types
Fixes a number of stage2 buildbots that were failing when I generalized the m_ConstantInt() logic - that didn't match for pointer types but m_Zero() does......
2020-10-19 17:05:38 +01:00
Mircea Trofin d454328ea8 [ML] Add final reward logging facility.
Allow logging final rewards. A final reward is logged only once, and is
serialized as all-zero values, except for the last one.

Differential Revision: https://reviews.llvm.org/D89626
2020-10-19 08:44:50 -07:00
Nabeel Omer 7d8c19a4e9 [Dexter][NFC] Add Missing Commands to Commands.md Contents
NFC patch simply updates the commands.md documentation contents with missing
  links to the DexLimitSteps and DexLabel command documentation.

  Differential Revision: https://reviews.llvm.org/D89689

  Author:    Nabeel Omer <nabeel.omer@sony.com>
2020-10-19 16:38:49 +01:00
Louis Dionne 9b40ee8eb0 [libc++] Define new/delete in libc++abi only by default
Previously, we would define new/delete in both libc++ and libc++abi.
Not only does this cause code bloat, but also it's technically an ODR
violation since we don't know which operator will be selected. Furthermore,
since those are weak definitions, we should strive to have as few of them
as possible (to improve load times).

My preferred choice would have been to put the operators in libc++ only
by default, however that would create a circular dependency between
libc++ and libc++abi, which GNU linkers don't handle.

Folks who want to ship new/delete in libc++ instead of libc++abi are
free to do so by turning on LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS at
CMake configure time.

On Apple platforms, this shouldn't be an ABI break because we re-export
the new/delete symbols from libc++abi. This change actually makes libc++
behave closer to the system libc++ shipped on Apple platforms.

On other platforms, this is an ABI break for people linking against libc++
but not libc++abi. However, vendors have been consulted in D68269 and no
objection was raised. Furthermore, the definitions can be controlled to
appear in libc++ instead with the CMake option.

Differential Revision: https://reviews.llvm.org/D68269
2020-10-19 11:35:01 -04:00
Casey Carter b20918997a [libc++][test] Portably silence warnings
... in `<numbers>` tests with `[[maybe_unused]]`.
2020-10-19 08:33:58 -07:00
Alex Richardson 9a6ae91128 [lit] Avoid calling realpath() for every printed message
I did some profiling of lit while trying to optimize the libc++ test
startup for remote hosts and it turns out that there is a realpath() call
for every message printed and this shows up in the profile.
The inspect.getframeinfo() function calls realpath() internally and
moreover we don't need most of the other information returned from it.
This patch uses inspect.getsourcefile() and os.path.abspath() to remove
../ from the path instead. Not resolving symlinks reduces the startup time
for running a single test with lit by about 50ms for me.

Reviewed By: ldionne, yln
Differential Revision: https://reviews.llvm.org/D89186
2020-10-19 16:21:34 +01:00
Simon Pilgrim 482e6f0041 Revert rGa704d8238c86bac: "[InstCombine] Add or((icmp ult/ule (A + C1), C3), (icmp ult/ule (A + C2), C3)) uniform vector support"
This reverts commit a704d8238c.

Causing stage2 build failures on some bots.
2020-10-19 16:03:36 +01:00
Nathan James 86ef379800
[clang-tidy] Add scoped enum constants to identifier naming check
Added option `ScopedEnumConstant(Prefix|Case|Suffix)` to readability-identitied-naming.
This controls the style for constants in scoped enums, declared as enum (class|struct).
If this option is unspecified the EnumConstant style will be used instead.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D89407
2020-10-19 15:57:47 +01:00
Peter Steinfeld 0047f6aed3 [flang] Add name match checks for interface procedures
We had neglected to check for name mismatches for procedure definitions that
appear in interfaces.

I also changed label11.f90 to an error test since I think they're better than
"FileCheck" tests.

Differential Revision: https://reviews.llvm.org/D89611
2020-10-19 07:51:17 -07:00
Sam McCall cf814fcd39 [clangd] Add test for structured-binding completion. NFC 2020-10-19 16:45:51 +02:00
George Mitenkov 87a2321032 [MLIR][SPIRVToLLVM] Updated documentation for composite ops
Added a section on composite ops (`spv.CompositeExtract` and
`spv.CompositeInsert`) conversion.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D89658
2020-10-19 17:43:22 +03:00
Simon Pilgrim de885f1b2a [InstCombine] Add (icmp ne A, 0) | (icmp ne B, 0) --> (icmp ne (A|B), 0) vector support
Scalar cases were already being handled by foldLogOpOfMaskedICmps (so this was dead code), but refactoring to support non-uniform vectors will take some time, so tweak this fold in the meantime.
2020-10-19 15:41:21 +01:00
Aaron Ballman b91a236ee1 Revert "Extend tests of run-clang-tidy"
This reverts commit 627c01bee0.

Some failing build bots:
http://lab.llvm.org:8011/#/builders/109/builds/690
http://lab.llvm.org:8011/#/builders/14/builds/476
2020-10-19 10:37:22 -04:00
Paul C. Anagnostopoulos 2871c6c93f [Aarch64] [TableGen] Clean up !if(!eq(boolean, 1) and related booleans.
Differential Revision: https://reviews.llvm.org/D89551
2020-10-19 10:33:55 -04:00
Alexander Lanin 627c01bee0 Extend tests of run-clang-tidy
new test: parsing and using compile_commands
new test: export fixes to yaml file
old test extended with CHECK-MESSAGES in order to ensure that they "fail as intended"
2020-10-19 10:29:08 -04:00
Simon Pilgrim ecd25086d1 [InstCombine] Add (icmp eq B, 0) | (icmp ult/gt A, B) -> (icmp ule A, B-1) vector support 2020-10-19 15:23:48 +01:00
Nathan James 866dc09784
[clang-tidy] Better support for Override function in RenamerClangTidy based checks
Methods that override virtual methods will now get renamed if the initial virtual method has a name violation.
Addresses https://bugs.llvm.org/show_bug.cgi?id=34879

Reviewed By: alexfh

Differential Revision: https://reviews.llvm.org/D79674
2020-10-19 15:21:06 +01:00
Kadir Cetinkaya 4074914103
[clangd] Rename edge name for filesymbols to slabs in memorytree
This was causing duplicate `symbols` components on the path as both the
edge from an index to filesymbols and filesymbols to symbolslabs were named
symbols.

Differential Revision: https://reviews.llvm.org/D89685
2020-10-19 16:09:46 +02:00
Simon Pilgrim a704d8238c [InstCombine] Add or((icmp ult/ule (A + C1), C3), (icmp ult/ule (A + C2), C3)) uniform vector support 2020-10-19 14:55:18 +01:00
Simon Pilgrim 1d90e53044 [InstCombine] foldOrOfICmps - pull out repeated getOperand() calls. NFCI. 2020-10-19 14:28:08 +01:00
Simon Pilgrim 3ad9361254 [InstCombine] Add or((icmp ult/ule (A + C1), C3), (icmp ult/ule (A + C2), C3)) vector tests 2020-10-19 14:28:08 +01:00
Paul C. Anagnostopoulos dc5d6632b0 [TableGen] Enhance !empty and !size to handle strings and DAGs.
Fix bug in the type checking for !empty, !head, !size, !tail.
2020-10-19 09:22:20 -04:00
David Carlier 13e22961f8 [clang] update of the DragonFlyBSD's driver for the 5.8.x releases
Reviewers: sepavloff, jyknight

Reviewed By: sepavloff

Differential Revision: https://reviews.llvm.org/D89690
2020-10-19 14:04:49 +01:00
Sam McCall 375f7a4160 [ADT] Avoid use of result_of_t in function_ref
It has bugs on some old libc++ versions and we don't need the power.
See https://reviews.llvm.org/D88977
2020-10-19 14:59:45 +02:00
Piotr Sobczak c872faf6e0 [AMDGPU] Do not generate S_CMP_LG_U64 on gfx7
S_CMP_LG_U64 was added in gfx8 and is guarded by hasScalarCompareEq64().

Rewrite S_CMP_LG_U64 to S_OR_B32 + S_CMP_LG_U32 for targets that
do not support 64-bit scalar compare.

Differential Revision: https://reviews.llvm.org/D89536
2020-10-19 14:44:31 +02:00
Simon Pilgrim aba7275bb3 [InstCombine] Add (icmp ne A, 0) | (icmp ne B, 0) --> (icmp ne (A|B), 0) tests 2020-10-19 13:42:53 +01:00
Luís Marques 7ddd354d47 [RISCV][ASAN] Fix TLS offsets
Fix a RISC-V ASan test failure: `TestCases/Linux/static_tls.cpp`.

Differential Revision: https://reviews.llvm.org/D89244
2020-10-19 13:41:50 +01:00
Hans Wennborg a7acee89d6 Fix compiler-rt build on Windows after D89640
It moved the cmake code from the else-branch to the if-branch
but forgot to flip the condition.
2020-10-19 14:39:37 +02:00
Kazushi (Jam) Marukawa 6bb60d3e26 [VE] Add setcc for fp128
Add setcc for fp128 and clean existing ISel patterns.  Also add
a regression test.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D89683
2020-10-19 21:36:57 +09:00
Kazushi (Jam) Marukawa fb2bb6fad4 [VE] Add cast to/from fp128 patterns
Add cast to/from fp128 patterns.  Clean other cast patterns too.
Update a regression test by adding missing tests.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D89682
2020-10-19 21:35:27 +09:00
Georgii Rymar 5a8ac3cc63 [yaml2obj] - Fix comments. NFC.
This addressed post commit comments for D89391.
2020-10-19 15:13:01 +03:00
Georgii Rymar 6a5f950364 [llvm-readobj/elf] - Change the behavior of handing DT_SONAME.
The current situation/behavior is:
1) llvm-readelf doesn't need a string that is specified by `DT_SONAME`.
2) llvm-readobj/elf always tries to read it, even when there is no `DT_SONAME` tag.
3) Because of that both tools reports a warning for many our test cases.

This patch delays getting a SOName string and changes the behavior (llvm-readobj) to
only report a warning when there is a `DT_SONAME` and a string cab't be read.
Warning is not reported for llvm-readelf, as it never tries to dump it.

Differential revision: https://reviews.llvm.org/D89384
2020-10-19 15:02:09 +03:00
Sam Parker 03f3ef221b [LangRef] Correct return type llvm.test.set.loop.iterations.*
The langref description for llvm.test.set.loop.iterations.* were
missing the i1 return type.

Differential Revision: https://reviews.llvm.org/D89564

Patch by: Janek van Oirschot
2020-10-19 12:56:38 +01:00
Nathan James accda625b8
[nfc][clang-change-namespace] Remove unnecessary isScoped EnumDecl Matcher 2020-10-19 12:53:51 +01:00
Alexander Belyaev 1e1dd13034 [mlir][nfc] Move BaseOpWithOffsetSizesAndStrides to the beginning of Ops.td.
Move the class to where all base classes are defined.
Also remove all the builders since they are definted in subclasses anyway.

Differential Revision: https://reviews.llvm.org/D89620
2020-10-19 13:36:03 +02:00
Marcel Koester 1b1c61ff47 [mlir] Refactored BufferPlacement transformation.
The current BufferPlacement transformation contains several concepts for
hoisting allocations. However, more advanced hoisting techniques should not be
integrated into the BufferPlacement transformation. Hence, this CL refactors the
current BufferPlacement pass into three separate pieces: BufferDeallocation and
BufferAllocation(Loop)Hoisting. Moreover, it extends the hoisting functionality
by allowing to move allocations out of loops.

Differential Revision: https://reviews.llvm.org/D87756
2020-10-19 12:52:16 +02:00
Simon Pilgrim 3dd2f02bb0 [InstCombine] Add (icmp eq B, 0) | (icmp ult A, B) -> (icmp ule A, B-1) vector tests 2020-10-19 11:48:32 +01:00