Commit Graph

392019 Commits

Author SHA1 Message Date
Mark Leair a103402288 Change the flang reshape runtime routine interface to use a result
argument instead of a result result object.

Change the reshape flang unit test to use the new interface. Also, add an
order argument to exercise the order subscript code in the rehsape runtime
routine.

Differential Revision: https://reviews.llvm.org/D104586
2021-06-24 17:05:12 -07:00
Muhammad Omair Javaid d6a91f6c56 Revert "[Clang] XFAIL sanitize-coverage-old-pm.c on 32bit Armv8l"
This reverts commit c5028f3473.
2021-06-25 05:00:14 +05:00
Nemanja Ivanovic ef906573a1 [PowerPC] Fix vec_add for 64-bit on pre-Power7 subtargets
The shift of the carry was actually incorrect.
2021-06-24 18:42:44 -05:00
Geoffrey Martin-Noble f0dd6faaec Update Bazel build for 744146f60b
Updates Bazel build files to match
https://github.com/llvm/llvm-project/commit/744146f60b

Differential Revision: https://reviews.llvm.org/D104885
2021-06-24 16:38:16 -07:00
Nemanja Ivanovic dcccb2f594 [PowerPC] Fix bswap combine for big endian systems
Commit 0464586ac5 added a combine
for a 64-bit load feeding a bswap but the implementation is only
correct for little endian systems.
This fixes it for big endian systems.
2021-06-24 18:04:50 -05:00
Gus Smith 744146f60b [MLIR][Sparse] Refactor lattice code into its own file
Moves iteration lattice/merger code into new SparseTensor/Utils directory. A follow-up CL will add lattice/merger unit tests.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D104757
2021-06-24 23:03:44 +00:00
AndreyChurbanov b2787945f9 [OpenMP][NFC] libomp: fix wrong debug assertion.
Normalized bounds of chunk of iterations to steal from are inclusive,
so upper bound should not be decremented in expression to check.
Problem was in attempt to steal iterations 0:0, that caused assertion after
wrong decrement. Reported in comment to https://reviews.llvm.org/D103648.

Differential Revision: https://reviews.llvm.org/D104880
2021-06-25 02:02:14 +03:00
Tony Tye a1526af464 [AMDGPU] Reserve AMDGPU ELF e_flags machine 0x43
Reviewed By: kzhuravl, rampitec

Differential Revision: https://reviews.llvm.org/D104872
2021-06-24 22:51:47 +00:00
Muhammad Omair Javaid 975af861f3 Disable TestAArch64UnwindPAC.py for non PAC targets
TestAArch64UnwindPAC.py started failing on LLDB buildbot as underlying
hardware does not support PAC. This patch skips this test for targets
which do not support PAC feature.
2021-06-24 22:50:36 +00:00
thomasraoux 1a86559276 [mlir][VectorToGPU] Add conversion for scf::For op with Matrix operands
Differential Revision: https://reviews.llvm.org/D104134
2021-06-24 15:42:28 -07:00
thomasraoux 6413226dce [mlir][VectorToGPU] Add conversion for splat constant to MMA const matrix
Differential Revision: https://reviews.llvm.org/D104133
2021-06-24 15:38:12 -07:00
Muhammad Omair Javaid 473a3a773e Disable check_qmemtags unit tests
check_qmemtags tests are broken on Arm 32 bits. This patch disables
these tests.

Differential Revision: https://reviews.llvm.org/D95602
2021-06-24 22:36:31 +00:00
Fangrui Song c4ca39e0f5 [ELF] Fix .rela.llvm.call-graph-profile detection after D104080
A SHT_SYMTAB section's sh_info is the number of local symbols.
sh_info may coincide with the section header index of SHT_LLVM_CALL_GRAPH_PROFILE.
2021-06-24 15:21:28 -07:00
Muhammad Omair Javaid 3b4aad1186 Fix typo in TestMemoryTag.py
TestMemoryTag.py should fail if underlying target doesnt support MTE.

Differential Revision: https://reviews.llvm.org/D97285
2021-06-24 22:19:51 +00:00
Fangrui Song f1e2d5851b [OptTable] Rename PrintHelp to printHelp
To be consistent with other member functions and match the coding standard.
2021-06-24 14:47:03 -07:00
Muhammad Omair Javaid 9ca0171a9f [LLDB] Fix broken LLDB build due MemoryTagManager.h
Commit e0f2744a11 broke LLDB build.
This patch fixes the build. Tested on Arm/AArch64 Linux.

Differential Revision: https://reviews.llvm.org/D97281
2021-06-25 02:37:55 +05:00
Martin Storsjö 2e4a2b8430 [ADT] Complete the StringRef case insensitive method renaming
Remove the old name for the methods. These were only left behind to
ease the transition for downstreams.

Differential Revision: https://reviews.llvm.org/D104820
2021-06-25 00:22:02 +03:00
Martin Storsjö 9264728450 [mlir] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
Martin Storsjö e50f9c419a [lldb] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
Martin Storsjö 3c6f8ca7c9 [lld] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
Martin Storsjö 86029e4c22 [clang-tools-extra] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
Martin Storsjö e5c7c171e5 [clang] Rename StringRef _lower() method calls to _insensitive()
This is mostly a mechanical change, but a testcase that contains
parts of the StringRef class (clang/test/Analysis/llvm-conventions.cpp)
isn't touched.
2021-06-25 00:22:01 +03:00
Martin Storsjö 42f74e8249 [llvm] Rename StringRef _lower() method calls to _insensitive()
This is a mechanical change. This actually also renames the
similarly named methods in the SmallString class, however these
methods don't seem to be used outside of the llvm subproject, so
this doesn't break building of the rest of the monorepo.
2021-06-25 00:22:01 +03:00
Martin Storsjö 3eed57e7ef [ADT] Rename StringRef case insensitive methods for clarity
Rename functions with the `xx_lower()` names to `xx_insensitive()`.
This was requested during the review of D104218.

Test names and variables in llvm/unittests/ADT/StringRefTest.cpp
that refer to "lower" are renamed to "insensitive" correspondingly.

Unused function aliases with the former method names are left
in place (without any deprecation attributes) for transition purposes.

All references within the monorepo will be changed (with essentially
mechanical changes), and then the old names will be removed in a
later commit.

Also remove the superfluous method names at the start of doxygen
comments, for the methods that are touched here. (There are more
occurrances of this left in other methods though.) Also remove
duplicate doxygen comments from the implementation file.

Differential Revision: https://reviews.llvm.org/D104819
2021-06-25 00:22:00 +03:00
Krzysztof Parzyszek d09218a82e [Hexagon] Opaquify pointer usage in GEP commoning 2021-06-24 16:06:36 -05:00
Bob Haarman 29774016d4 [LangRef] clarify the meaning of noimplicitfloat
Adds some more text to the documentation for the noimplicitfloat
function attribute. Hopefully, this makes it clearer what
qualifies an implicit vs. explicit float, without becoming overly
long or going into target-specific details.

Reviewed By: rnk, craig.topper

Differential Revision: https://reviews.llvm.org/D104061
2021-06-24 13:57:15 -07:00
Jez Ng 4a8503c8e0 [lld-macho] Align all cstrings to 16 bytes when deduplicating
We previously did this only for x86_64, but it turns out that
arm64 needs this too -- see PR50791.

Ultimately this is a hack, and we should avoid over-aligning strings
that don't need it. I'm just having a hard time figuring out how ld64 is
determining the right alignment.

No new test for this since we were already testing this behavior for
x86_64, and extending it to arm64 seems too trivial.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D104835
2021-06-24 16:53:29 -04:00
Michael Kruse e2d4b02404 [Polly][ScopInliner] Indicate if the IR has changed.
Return true to indicate that the IR has changed if the nested pass
manager has changed it.

Fixes the ScopInliner tests in the LLVM_ENABLE_EXPENSIVE_CHECKS=ON
configuration.

Thanks to Alexandre Ganea for reporting.
2021-06-24 15:44:39 -05:00
Emily Shi f26adaa28d [compiler-rt][test] fix zero_page_pc on arm64e
on arm64e, pointer auth would catch this access violation before asan.
sign the function pointer so pointer auth will ignore this violation and let asan catch it in this test case.

rdar://79652167

Reviewed By: delcypher

Differential Revision: https://reviews.llvm.org/D104828
2021-06-24 13:40:12 -07:00
Nikita Popov 5cb20ef8a2 [InstCombine] Make indexed compare fold opaque ptr compatible
Rather than relying on pointer type equality (which, for a change,
is silently incorrect with opaque pointers) check that the GEP
source element types match.
2021-06-24 22:33:01 +02:00
Arthur Eubanks 4c8174f54b [OpaquePtr] Introduce option to force all pointers to be opaque pointers
We don't want to start updating tests to use opaque pointers until we're
close to the opaque pointer transition. However, before the transition
we want to run tests as if pointers are opaque pointers to see if there
are any crashes.

At some point when we have a flag to only create opaque pointers in the
bitcode and textual IR readers, and when we have fixed all places that
try to read a pointee type, this flag will be useless. However, until
then, this can help us find issues more easily.

Since the cl::opt is read into LLVMContext, we need to make sure
LLVMContext is created after cl::ParseCommandLineOptions().

Previously ValueEnumerator would visit the value types of global values
via the pointer type, but with opaque pointers we have to manually visit
the value type.

Reviewed By: nikic, dexonsmith

Differential Revision: https://reviews.llvm.org/D103503
2021-06-24 13:32:31 -07:00
Arthur Eubanks 7110510eca [WPD] Don't optimize calls more than once
WPD currently assumes that there is a one to one correspondence between
type test assume sequences and virtual calls. However, with
-fstrict-vtable-pointers this may not be true. This ends up causing
crashes when we try to optimize a virtual call more than once (
applyUniformRetValOpt()/applyUniqueRetValOpt()/applyVirtualConstProp()/applySingleImplDevirt()).

applySingleImplDevirt() actually didn't previous crash because it would
replace the devirtualized call with the same direct call. Adding an
assert that the call is indirect causes the corresponding test to crash
with the rest of the patch.

This makes Chrome successfully build with -fstrict-vtable-pointers + WPD.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D104798
2021-06-24 13:28:09 -07:00
Seraphime Kirkovski a08fa8a508 [Clang-Format] Add ReferenceAlignment directive
This introduces ReferenceAlignment style option modeled around
PointerAlignment.
Style implementors can specify Left, Right, Middle or Pointer to
follow whatever the PointerAlignment option specifies.

Differential Revision: https://reviews.llvm.org/D104096
2021-06-24 22:27:45 +02:00
Nemanja Ivanovic 0464586ac5 [PowerPC] Combine 64-bit bswap(load) without LDBRX
When targeting CPUs that don't have LDBRX, we end up producing code that is
very inefficient and large for this common idiom. This patch just
optimizes it two 32-bit LWBRX instructions along with a merge.

This fixes https://bugs.llvm.org/show_bug.cgi?id=49610

Differential revision: https://reviews.llvm.org/D104836
2021-06-24 15:11:47 -05:00
Nikita Popov 8e0ff44bf8 [InstCombine] Make varargs cast transform compatible with opaque ptrs
The whole transform can be dropped once we have fully transitioned
to opaque pointers (as it's purpose is to remove no-op pointer
casts). For now, make sure that it handles opaque pointers correctly.
2021-06-24 21:57:05 +02:00
Jonas Paulsson 1eda5453f2 [BuildLibCalls/SimplifyLibCalls] Fix attributes on created CallInst instructions.
- When emitting libcalls, do not only pass the calling convention from the
  function prototype but also the attributes.

- Do not pass attributes from e.g. libc memcpy to llvm.memcpy.

Review: Reid Kleckner, Eli Friedman, Arthur Eubanks

Differential Revision: https://reviews.llvm.org/D103992
2021-06-24 14:47:24 -05:00
Björn Schäpers b3ccf4fc02 [clang-format][NFC] Fix documentation
This amends 64cf5eba06.
2021-06-24 21:19:14 +02:00
Akira Hatanaka 8db0dbbe2c [CodeGen] Don't create fake FunctionDecls when generating block/byref
copy/dispose helper functions

We found out that these fake functions would cause clang to crash if the
changes proposed in https://reviews.llvm.org/D98799 were made.

The original patch was reverted in f681fd927e
because debug locations were missing in the body of the block byref
helper functions. This patch fixes the bug by calling CreateArtificial
after the calls to StartFunction.

Differential Revision: https://reviews.llvm.org/D104082
2021-06-24 11:45:52 -07:00
Roman Lebedev 4867641f30
[NFC][Codegen] Autogenerate Thumb2/setjmp_longjmp.ll test 2021-06-24 21:35:05 +03:00
Aakanksha Patil 3453f3dd46 [AMDGPU] Add gfx1035 target
Differential Revision: https://reviews.llvm.org/D104804
2021-06-24 14:32:41 -04:00
Roman Lebedev d064182612
[SimplifyCFG] Tail-merging all blocks with `resume` terminator
Similar to what we already do for `ret` terminators.
As noted by @rnk, clang seems to already generate a single `ret`/`resume`,
so this isn't likely to cause widespread changes.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D104849
2021-06-24 21:25:06 +03:00
zoecarver 46afddec41 [libcxx][nfc] Update the synopsis comment in <ranges> to include drop_view. 2021-06-24 11:09:25 -07:00
zoecarver ba032a614a [libcxx][ranges] Enable borrowed range for drop view when T has borrowing enabled. 2021-06-24 11:09:25 -07:00
LLVM GN Syncbot 6ca730e7cb [gn build] Port 6adbc83ee9 2021-06-24 18:02:44 +00:00
Christopher Di Bella 6adbc83ee9 [libcxx][modularisation] moves <utility> content out of <type_traits>
Moves:

* `std::move`, `std::forward`, `std::declval`, and `std::swap` into
  `__utility/${FUNCTION_NAME}`.
* `std::swap_ranges` and `std::iter_swap` into
  `__algorithm/${FUNCTION_NAME}`

Differential Revision: https://reviews.llvm.org/D103734
2021-06-24 17:57:29 +00:00
Christopher Di Bella d87f159ab6 [libcxx][NFC] removes `swap`'s dependency on `swap_ranges`
Under the as-if rule, we can directly implement the array overload for
`std::swap`. By removing this circular dependency where `swap` is
implemented in terms of `swap_ranges` and `swap_ranges` is defined in
terms of `swap`, we can split them into their own headers. This will:

* limit the surface area in which Hyrum's law can bite us;
* force users to include the correct headers;
* make finding the definitions trivial (`swap` is a utility;
  `swap_ranges` is an algorithm).

Differential Revision: https://reviews.llvm.org/D104760
2021-06-24 17:57:29 +00:00
Mehdi Amini 652f4b5140 Attempt to disable MLIR JIT tests on PowerPC to unbreak the bot
This is until we figure how to turn on the large code size model.
2021-06-24 17:48:46 +00:00
zoecarver 9824f86760 [libcxx][nfc] Add one more test case for contiguous_range.
If the `data` member function is different enough, `ranges::data` won't pick it, so the range remains a contiguous_range.
2021-06-24 10:45:25 -07:00
zoecarver 3450398738 [libcxx][ranges] Add contiguous_range.
Differential Revision: https://reviews.llvm.org/D104262
2021-06-24 10:40:05 -07:00
Roman Lebedev 507df686af
[NFC][SimplifyCFG] Revisit tail-merge-resume.ll test
Add an already somewhat-common resume block
2021-06-24 20:31:49 +03:00