Commit Graph

403924 Commits

Author SHA1 Message Date
Rahman Lavaee f533ec37eb Make the BBAddrMap struct binary-format-agnostic.
The only binary-format-related field in the BBAddrMap structure is the function address (`Addr`), which will use uint64_t in 64B format and uint32_t in 32B format. This patch changes it to use uint64_t in both formats.
This allows non-templated use of the struct, at the expense of a marginal additional size overhead for the 32-bit format. The size of the BB address map section does not change.

Differential Revision: https://reviews.llvm.org/D112679
2021-11-04 10:27:24 -07:00
Zakk Chen 0649dfebba [RISCV] Rename some assembler mnemonic and intrinsic functions for RVV 1.0.
Rename vpopc/vmandnot/vmornot to vcpop/vmandn/vmorn assembler mnemonic.

Reviewed By: frasercrmck, jrtc27, craig.topper

Differential Revision: https://reviews.llvm.org/D111062
2021-11-04 10:08:01 -07:00
Aart Bik 4aa9b39824 [mlir][sparse] reject sparsity annotation in "scalar" tensors
Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D113152
2021-11-04 09:49:05 -07:00
Jonas Devlieghere 3120cadac7 [debugserver] Fix typo in DNBArchImplARM64
rdar://85020754
2021-11-04 09:43:50 -07:00
Philip Reames ab4375e999 [docs] Update new builder instructions to default to building each change
We generally prefer build bots which build each change as they come in as long as they can keep up. This generates much higher quality feedback to a developer. However, the code structure is such that we currently default new builders to batching.

This change updates the getting started instruction for a builder to explicitly advocate for not collapsing requests.

Differential Revision: https://reviews.llvm.org/D112776
2021-11-04 09:36:53 -07:00
Tobias Gysi 29c31cb79b [mlir][linalg] Add support for transitive fusion.
Extend fusion on tensors to fuse producers greedily.

Reviewed By: nicolasvasilache, hanchung

Differential Revision: https://reviews.llvm.org/D110262
2021-11-04 16:25:06 +00:00
Geoffrey Martin-Noble c92de29f8d [NFC] Add size inference to to_vector
A default calculated size for SmallVector was added in
https://reviews.llvm.org/D92522 after discussion in
https://groups.google.com/g/llvm-dev/c/Z-VwNCTRGSg, but to_vector still
requires an explicit size. This patch adds the default size to to_vector
as well, so that this case doesn't unnecessarily force users to pick an
arbitrary size.

Reviewed By: silvas, dblaikie

Differential Revision: https://reviews.llvm.org/D112968
2021-11-04 09:24:02 -07:00
Alex Bradbury 26ec5da744 [RISCV][ELF] Remove internal binutils relocations
These relocations have been removed from the psABI doc in
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/199. This
patch simply updates llvm/include/llvm/BinaryFormat/ELFRelocs/RISCV.def
to match.

Differential Revision: https://reviews.llvm.org/D112999
2021-11-04 15:55:49 +00:00
Kazu Hirata 2887117d2c [Hexagon] Use make_early_inc_range (NFC) 2021-11-04 08:51:05 -07:00
Daniel Kiss 3255578ee1 [libcxxabi][ARM] Make CXX_end_cleanup compatible with Armv6-M
On Armv6-M the branch may not able to reach the _Unwind_Resume function because it's relocation(R_ARM_THM_JUMP11) is in -2048, 2047 range only.

Reviewed By: chill, stuij, lenary

Differential Revision: https://reviews.llvm.org/D113181
2021-11-04 16:29:39 +01:00
Clement Courbet d3dc7d077f [Sema][NFC] Improve test coverage of builtin operators.
In preparation for D112453.

Fix numbering of tests for [over.built]: 15->16, 16->17.
2021-11-04 15:43:32 +01:00
Jamie Schmeiser 8720149d9b Remove unused function from print-changed=dot-cfg code
Summary:
Remove unused function from print-changed=dot-cfg code to silence a
gcc compiler warning.

Author: Jamie Schmeiser <schmeise@ca.ibm.com>
Reviewed By: uabelho(Mikael Holmen)
Differential Revision: https://reviews.llvm.org/D113188
2021-11-04 10:40:50 -04:00
Sander de Smalen 1ea4296208 [NFC] Remove from UnivariateLinearPolyBase::getValue().
This interface should not have existed in the first place, let alone
be a public member.

It allows calling `ElementCount::get(..)->getValue()`, which is ambiguous.
The interfaces to be used are either getFixedValue() or getKnownMinValue().
2021-11-04 14:32:08 +00:00
Raphael Isemann f6b7bcc64a [lldb][NFC] StringRef-ify name param in CreateClassTemplateDecl 2021-11-04 15:28:02 +01:00
Simon Pilgrim a763d0010c [ARM] Regenerate shift-combine.ll test checks 2021-11-04 14:27:31 +00:00
Simon Pilgrim 53becf5df2 [AMDGPU] Regenerate shift-and-i128-ubfe.ll test checks 2021-11-04 14:27:30 +00:00
Adam Czachorowski 97fbc975fa [clangd] Find definition of ClassTemplate without going through index.
I noticed that, while go-to-def works on cases like:

namespace ns {
  template<typename T> struct Foo {};
}
using ::ns::Fo^o;

it only works because of the FileIndex. We can get definition location
directly from AST too.

Differential Revision: https://reviews.llvm.org/D113029
2021-11-04 15:25:21 +01:00
Josh Mottley 2aec2549e8 [flang][flang-omp-report] Remove the loop workarounds for nowait clause
In a "Worksharing-loop construct", one can add a nowait clause at the end
of the loop (i.e. at the loop tail). This clause wasn't associated with
the corresponding loop when originally worked on in flang-omp-report.
Note that this refers to parsing and parse-tree generation. To work
around it, it was needed to track such clauses and the loops.
This should no longer be required (and in fact no longer works) and so
was removed. This results in 'curLoopLogRecord' and 'loopLogRecordStack' and
all references to them being removed. This also allows for
'constructClauses' to be swapped from std::deque to llvm::SmallVector.
Lastly a new test has been added testing the "nowait" clauses in a
variety of ways.

Reviewed By: awarzynski, kiranchandramohan

Differential Revision: https://reviews.llvm.org/D112217
2021-11-04 14:23:50 +00:00
Raphael Isemann 7323d07483 [lldb][NFC] Remove a bunch of unnecessary nullptr checks
Those nullptr checks are after we already accessed the pointer.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D113175
2021-11-04 15:21:03 +01:00
Kevin Petit b8b6a5bc86 [OpenCL] Fix parsing of opencl-c.h as CL 3.0 with device-scope atomics enabled
https://reviews.llvm.org/D108392

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
2021-11-04 14:17:45 +00:00
Sjoerd Meijer 3fd1902ad8 [FuncSpec] Enable it only with -O3
Function specialisation was running at all optimisation levels (if enabled on
the command line, it is not on by default). That was an oversight and not
something we want to do. Function specialisation duplicates functions when it
triggers, so the backend is processing more functions/instructions resulting in
compile-time increases, which seems more appropriate with -O3 and inline with
GCC. Please note that since function specialisation is not enabled by default,
this didn't require updating any pass manager tests.

Differential Revision: https://reviews.llvm.org/D112129
2021-11-04 13:59:00 +00:00
Raphael Isemann b738a69ab8 [lldb][NFC] StringRef-ify the name parameter in CreateEnumerationType
Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D113176
2021-11-04 14:49:16 +01:00
Guillaume Chatelet c02aa15438 [libc][NFC] Allow memset (and bzero) to be inlined
This allows shipping individual functions without also having to provide
memset or bzero at the expense of bigger functions.

Similar to D113097.

Differential Revision: https://reviews.llvm.org/D113108
2021-11-04 13:48:18 +00:00
Guillaume Chatelet 4f3511e28f [libc][NFC] Allow memcmp to be inlined
Similar to D113097 although not strictly necessary for now. It helps
keeping the same structure for all memory functions.

Differential Revision: https://reviews.llvm.org/D113103
2021-11-04 13:47:50 +00:00
Guillaume Chatelet c2ce8f02ed [libc][NFC] Allow memcpy to be inlined
This allows shipping individual functions without also having to provide
`memcpy` at the expense of bigger functions.
Next is to use this `inlined_memcpy` in:
 - loader/linux/x86_64/start.cpp
 - src/string/memmove.cpp
 - src/string/mempcpy.cpp
 - src/string/strcpy.cpp
 - src/string/strdup.cpp
 - src/string/strndup.cpp

Differential Revision: https://reviews.llvm.org/D113097
2021-11-04 13:47:19 +00:00
Josh Mottley 0a95abb7dc [flang][flang-omp-report] Removed unnecessary comments in flang-omp-report plugin tests
This patch removes unnecessary comments in the flang-omp-report
plugin tests which can be implied from the file name and run command.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D112817
2021-11-04 13:46:19 +00:00
Chen Zheng f6db18fd4a [PowerPC][NFC] make option ppc-formprep-max-vars can be set more than one time. 2021-11-04 13:44:58 +00:00
Aaron Ballman c524f1a076 No longer crash when a consteval function returns a structure
Ensure that the destination slot exists in this case. This addresses PR51484.
2021-11-04 09:41:10 -04:00
Simon Pilgrim 61d6f4e60a [InstCombine] Add reference to PR52397 to help with triage
rG1e5f814302f8 added the test case, I've added PR52397 to the comment to help keep track of the source of the bug
2021-11-04 13:00:42 +00:00
Simon Pilgrim 87d5bb66eb [X86][SSE] Improve PMADDWD SimplifyDemandedVectorElts handling
Check both operands for zero elements to remove unnecessary demanded elts.

Try to help reduce some minor regressions noticed in D110995
2021-11-04 12:56:31 +00:00
Muhammad Omair Javaid b595137fe1 [LLDB] Fix Cpsr size for WoA64 target
CPSR on Arm64 is 4 bytes in size but windows on Arm implementation is trying to read/write 8 bytes against a byte register causing LLDB unit tests failures.

Ref: https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-arm64_nt_context

Reviewed By: mstorsjo

Differential Revision: https://reviews.llvm.org/D112471
2021-11-04 17:43:31 +05:00
Muhammad Omair Javaid cbd215dfe5 [LIT] Add win32 PLATFORM env var to test config
LIT skips various system environment variables while building test
config. It turns out that we require PLATFORM environment variable for
detection of x86 vs Arm windows platform.

This patch adds system environment variable PLATFORM into LIT test
config for detection of win32 Arm platform.

Reviewed By: mstorsjo

Differential Revision: https://reviews.llvm.org/D113165
2021-11-04 17:42:43 +05:00
Florian Hahn b4992dbb21
[LV] Clarify uniform worklist contains instrs demanding lane 0. 2021-11-04 13:11:50 +01:00
gbreynoo ced9287c2d [llvm-objdump] Fix the Assertion failure when providing invalid --debug-vars or --dwarf values
As seen in https://bugs.llvm.org/show_bug.cgi?id=52213 llvm-objdump
asserts if either the --debug-vars or the --dwarf options are provided
with invalid values. As suggested, this fix adds use of a default value
to these options and errors when given bad input.

Differential Revision: https://reviews.llvm.org/D112183
2021-11-04 11:01:32 +00:00
Tim Northover 3d39612b3d Coroutines: don't infer function attrs before lowering
Coroutines have weird semantics that don't quite match normal LLVM functions,
so trying to infer even simple attributes based on thier contents can go wrong.
2021-11-04 10:24:28 +00:00
Markus Böck 5f32a851fb [mlir] Fix typos in comments 2021-11-04 10:59:44 +01:00
Valentin Clement 3ae8e44215
[fir] Add fir.insert_on_range conversion
Convert fir.insert_on_range operation to corresponding
llvm.insertvalue operations.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D112896
2021-11-04 10:36:20 +01:00
David Green 1e5f814302 [InstCombine] Fix infinite recursion in ashr/xor vector fold.
The added test has poison lanes due to the vector shuffle. This can
cause an infinite loop of combines in instcombine where it folds
xor(ashr, -1) -> select (icmp slt 0), -1, 0 -> sext (icmp slt 0) -> xor(ashr, -1).
We usually prevent this by checking that the xor constant is not -1,
but with vectors some of the lanes may be -1, some may be poison. So
this changes the way we detect that from "!C1->isAllOnesValue()" to
"!match(C1, m_AllOnes())", which is more able to detect that some of the
lanes are poison.

Fixes PR52397
2021-11-04 09:24:27 +00:00
Martin Storsjö 341cc1b411 [libcxx] Remove nonstandard _FilesystemClock::{to,from}_time_t
These are not standard methods, neither libstdc++ nor MSVC STL provide
them.

In practice, one of them was untested and the other one was only used in
one single test.

Differential Revision: https://reviews.llvm.org/D113027
2021-11-04 10:24:47 +02:00
Lawrence D'Anna 531d877ee6 [lldb] Fix TestEchoCommands.test again
In 7f01f78593 [lldb] update TestEchoCommands -- I fixed this test,
but not on windows, becuase I used  some unix shell syntax that
doesn't work with cmd.exe.   Fixed it so it will work in both.
Test logic is the same.

This is a trivial fix, so bypassing review to get the build clean again
ASAP.
2021-11-04 01:24:25 -07:00
Valentin Clement c86b4503a9
[fir] Restrict array type on fir.insert_on_range
Sequence type had no restriction on the insert_on_range operation.
This patch adds a restriction for the type to have constant shape
and size.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D113092
2021-11-04 08:54:09 +01:00
Martin Liska 629b40dafa Fix -Wformat warnings reported by GCC.
Differential Revision: https://reviews.llvm.org/D113099
2021-11-04 08:51:43 +01:00
Keith Smiley e7fdff403e [lld-macho] Silently ignore the -objc_abi_version
This undocumented ld64 flag, based on the most recent ld64 source dump
from Xcode 12, only applies to i386. It seems like on all newer
architectures this behavior is the default.

Reviewed By: #lld-macho, int3

Differential Revision: https://reviews.llvm.org/D113070
2021-11-03 22:16:09 -07:00
Keith Smiley d49e7244cc [lld-macho] Cache readFile results
In one of our links lld was reading 760k files, but the unique number of
files was only 1500. This takes that link from 30 seconds to 8.

This seems like a heavy hammer, especially since some things don't need
to be cached, like the filelist arguments and the passed static
archives (the latter is already cached as a one off), but it seems ld64
does something similar here to short circuit these duplicate reads:

82e429e186/src/ld/InputFiles.cpp (L644-L665)

Of the types of files being read for our iOS app, the biggest problem
was constantly re-reading small tbd files:

```
% wc -l /tmp/read.txt
761414 /tmp/read.txt
% cat /tmp/read.txt | sort -u | wc -l
1503

% cat /tmp/read.txt | grep "\.a$" | wc -l
43721
% cat /tmp/read.txt | grep "\.tbd$" | wc -l
717656
```

We could likely hoist this logic up to not cache at this level, but it
would be a more invasive change to make sure all callers that needed it
cached the results.

I could see this being an issue with OOMs, and I'm not a linker expert so
maybe there's another way we should solve this problem? Feedback welcome!

Reviewed By: int3, #lld-macho

Differential Revision: https://reviews.llvm.org/D113153
2021-11-03 22:12:21 -07:00
Keith Smiley 6629ec3ecc [lld-macho] Implement -arch_errors_fatal
By default with ld64, architecture mismatches are just warnings, then
this flag can be passed to make these fail. This matches that behavior.

Reviewed By: int3, #lld-macho

Differential Revision: https://reviews.llvm.org/D113082
2021-11-03 22:01:53 -07:00
Matthias Springer bb83520dce [mlir][linalg][bufferize] Generalize InitTensorOp elimination
This allows for external users of Comprehensive Bufferize to specify their own InitTensorOp elimination procedures.

Differential Revision: https://reviews.llvm.org/D112686
2021-11-04 13:53:12 +09:00
Jez Ng 4ae8c83104 [lld-macho][nfc] Remove unnecessary -pie flags in tests
D101513 means that we no longer need to specify `-pie` in most of our
test RUN commands. Let's clean up the unused flags so as not to confuse
future test writers.

Reviewed By: #lld-macho, oontvoo, MaskRay

Differential Revision: https://reviews.llvm.org/D113114
2021-11-04 00:02:03 -04:00
Chuanqi Xu ec117158a3 [Coroutines] [Frontend] Lookup in std namespace first
Now in libcxx and clang, all the coroutine components are defined in
std::experimental namespace.
And now the coroutine TS is merged into C++20. So in the working draft
like N4892, we could find the coroutine components is defined in std
namespace instead of std::experimental namespace.
And the coroutine support in clang seems to be relatively stable. So I
think it may be suitable to move the coroutine component into the
experiment namespace now.

This patch would make clang lookup coroutine_traits in std namespace
first. For the compatibility consideration, clang would lookup in
std::experimental namespace if it can't find definitions in std
namespace. So the existing codes wouldn't be break after update
compiler.

And in case the compiler found std::coroutine_traits and
std::experimental::coroutine_traits at the same time, it would emit an
error for it.

The support for looking up std::experimental::coroutine_traits would be
removed in Clang16.

Reviewed By: lxfind, Quuxplusone

Differential Revision: https://reviews.llvm.org/D108696
2021-11-04 11:53:47 +08:00
Muhammad Omair Javaid 553a872465 [LLDB] Adjust DumpDataExtractorTest.Formats for Windows
Floating point results mismtach between Visual stdio 2019 and previous
versions. This adjusts macro accordingly.
2021-11-04 08:48:26 +05:00
Qiu Chaofan a84118756c [PowerPC] Enforce side effects to FPSCR read/set intrinsics
Currently, FPSCR is not modeled, so in some early passes (such as
early-cse), the read/set intrinsics to FPSCR may get incorrect
simplification.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D112380
2021-11-04 11:45:32 +08:00