Dmitry Vyukov [Thu, 2 Dec 2021 17:42:11 +0000 (18:42 +0100)]
tsan: disable munmap_invalid.cpp test on darwin
It failed on bots:
https://green.lab.llvm.org/green//job/clang-stage1-RA/25954/consoleFull#-
1417328700a1ca8a51-895e-46c6-af87-
ce24fa4cd561
and it doesn't provide the test output.
Reviewed By: melver
Differential Revision: https://reviews.llvm.org/D114972
Matthias Springer [Fri, 3 Dec 2021 07:25:08 +0000 (16:25 +0900)]
[mlir][linalg][bufferize] Op interface implementation for Bufferization dialect ops
This change provides `BufferizableOpInterface` implementations for ops from the Bufferization dialects. These ops are needed at the bufferization boundaries for partial bufferization.
Differential Revision: https://reviews.llvm.org/D114618
Jean Perier [Fri, 3 Dec 2021 07:23:16 +0000 (08:23 +0100)]
[flang] Return arrays in Transfer runtime with SIZE argument
In TRANSFER runtime the result was an array only if the MOLD was an array.
This is not in line with TRANSFER definition in 16.9.193 that rules that it
must also be an array if MOLD is scalar and SIZE if provided.
Differential Revision: https://reviews.llvm.org/D114943
Jessica Clarke [Thu, 2 Dec 2021 16:23:09 +0000 (16:23 +0000)]
[TableGen][SelectionDAG] Use ComplexPattern type for non-leaf nodes
When used as a non-leaf node, TableGen does not currently use the type
of a ComplexPattern for type inference, which also means it does not
check it doesn't conflict with the use. This differs from when used as a
leaf value, where the type is used for inference. This addresses that
discrepancy. The test case is not representative of most real-world uses
but is sufficient to demonstrate inference is working.
Some of these uses also make use of ValueTypeByHwMode rather than
SimpleValueType and so the existing type inference is extended to
support that alongside the new type inference.
There are also currently various cases of using ComplexPatterns with an
untyped type, but only for non-leaf nodes. For compatibility this is
permitted, and uses the old behaviour of not inferring for non-leaf
nodes, but the existing logic is still used for leaf values. This
remaining discrepancy should eventually be eliminated, either by
removing all such uses of untyped so the special case goes away (I
imagine Any, or a more specific type in certain cases, would be
perfectly sufficient), or by copying it to the leaf value case so
they're consistent with one another if this is something that does need
to keep being supported.
All non-experimental targets have been verified to produce bit-for-bit
identical TableGen output with this change applied.
Reviewed By: kparzysz
Differential Revision: https://reviews.llvm.org/D109035
Jessica Clarke [Thu, 2 Dec 2021 15:21:28 +0000 (15:21 +0000)]
[AArch64][NFC] Alter ComplexPattern types to be consistent with their uses
When used as a non-leaf node, TableGen does not currently use the type
of a ComplexPattern for type inference, which also means it does not
check it doesn't conflict with the use. This differs from when used as a
leaf value, where the type is used for inference. Fixing that
discrepancy is something I intend to upstream as a subsequent review.
AArch64 currently has several ComplexPatterns that are used in contexts
where they're expected to be an iPTR. The cases that lead to type
contradictions are separated out in D108759, but there are additional
differences to the TableGen output when using my locally-patched
TableGen. None of these appear to matter, at least for passing all the
CodeGen tests, but it's safer to avoid such changes (and similar changes
were causing issues on some AMDGPU tests, causing failures to select).
Changing these additional ComplexPatterns to use iPTR rather than i64
ensures that the TableGen output remains bit-for-bit identical (compared
to without having this patch and my TableGen patch, as well as the
intermediate state of having this patch but not my TableGen patch), and
more accurately captures the higher-level meaning of these patterns.
Reviewed By: david-arm
Differential Revision: https://reviews.llvm.org/D109034
Jessica Clarke [Thu, 2 Dec 2021 15:21:12 +0000 (15:21 +0000)]
[AMDGPU][NFC] Alter ComplexPattern types to be consistent with their uses
When used as a non-leaf node, TableGen does not currently use the type
of a ComplexPattern for type inference, which also means it does not
check it doesn't conflict with the use. This differs from when used as a
leaf value, where the type is used for inference. Fixing that
discrepancy is something I intend to upstream as a subsequent review.
AMDGPU currently has several ComplexPatterns that are used in contexts
where they're expected to be an iPTR, and where using an iPTR instead of
a fixed-width integer type matters. With my locally-patched TableGen,
none of these mismatches result in type contradictions, but do change
the patterns and cause various failures to select. These changes to the
ComplexPatterns' types reflect how they are actually used, result in
bit-for-bit identical TableGen output (without my local TableGen patch),
and ensure that with improved type inference AMDGPU's backend will
continue to work.
Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D109032
Jessica Clarke [Thu, 2 Dec 2021 15:21:01 +0000 (15:21 +0000)]
[AArch64][NFC] Fix ComplexPattern types conflicting with uses
When used as a non-leaf node, TableGen does not currently use the type
of a ComplexPattern for type inference, which also means it does not
check it doesn't conflict with the use. This differs from when used as a
leaf value, where the type is used for inference. Fixing that
discrepancy is something I intend to upstream as a subsequent review,
but these are all the type conflicts found (all legitimate) by my
locally-patched TableGen.
Reviewed By: paulwalker-arm
Differential Revision: https://reviews.llvm.org/D108759
Esme-Yi [Fri, 3 Dec 2021 06:33:56 +0000 (06:33 +0000)]
[NFC] move GNUELFDumper::printEnum() into a common header for reuse.
Summary:
This is a NFC patch moving the GNUELFDumper<ELFT>::printEnum()
function from ELFDumper into ScopedPrinter.h for reuse.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D114840
Chuanqi Xu [Fri, 3 Dec 2021 05:46:52 +0000 (13:46 +0800)]
[Coroutines] Handle InvokeInst in SalvageDebugInfo
Since coroutine would be splitted into pieces, compiler would move the
dbg.declare intrinsic after the Storage is created to make sure the
corresponding dbg instruction is still available aftet splitted.
However, it would be problematic if the storage instruction is an
InvokeInst, which is a terminator. We couldn't move instruction after an
InvokeInst. This patch tries to move the dbg.declare intrinsic in the
normal destination of the InvokeInst. It should make sense due to the
Storage should be invalid in exception path.
lh123 [Fri, 3 Dec 2021 04:32:11 +0000 (12:32 +0800)]
[clangd] Show parameters for construct.
Show parameters for construct.
Reviewed By: kadircet
Differential Revision: https://reviews.llvm.org/D114621
Lawrence D'Anna [Fri, 3 Dec 2021 05:13:09 +0000 (21:13 -0800)]
[lldb] add fallback for LLDB_PYTHON_RELATIVE_PATH
Some pythons are configured to set platlib somewhere outside of their
sys.prefix. It's important that we at least use some reasonable
default for LLDB_PYTHON_RELATIVE_PATH even in that case, because
even if the user overrides it on the cmake invocation, cmake will
still be called without the override in order to build tablegen.
Reviewed By: JDevlieghere, clayborg
Differential Revision: https://reviews.llvm.org/D114973
Kirill Stoimenov [Thu, 2 Dec 2021 22:15:01 +0000 (22:15 +0000)]
[ASan] Changed intrisic implemenation to use PLT safe registers.
Changed registers to R10 and R11 because PLT resolution clobbers them. Also changed the implementation to use R11 instead of RCX, which saves a push/pop.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D115002
Liqiang Tao [Fri, 3 Dec 2021 03:13:07 +0000 (12:13 +0900)]
[llvm][Inline] Add FunctionSimplificationPipeline to module inliner pipeline
The FunctionSimplificationPipeline could effectively reduce the size of .text section when module inliner is enabled.
Reviewed By: kazu
Differential Revision: https://reviews.llvm.org/D114704
LLVM GN Syncbot [Fri, 3 Dec 2021 02:16:17 +0000 (02:16 +0000)]
[gn build] Port
aba8f320cc13
LLVM GN Syncbot [Fri, 3 Dec 2021 02:16:16 +0000 (02:16 +0000)]
[gn build] Port
2d9efcfeec24
Jason Molenda [Fri, 3 Dec 2021 02:08:54 +0000 (18:08 -0800)]
Simplify logic to identify dyld_sim in Simulator debugging on macos
When debugging a Simulator process on macOS (e.g. the iPhone simulator),
the process will have both a dyld, and a dyld_sim present. The dyld_sim
is an iOS Simulator binary. The dyld is a macOS binary. Both are
MH_DYLINKER filetypes. lldb needs to identify & set a breakpoint in
dyld, so it has to distinguish between these two.
Previously lldb was checking if the inferior target was x86 (indicating
macOS) and the OS of the MH_DYLINKER binary was iOS/watchOS/etc -- if
so, then this is dyld_sim and we should ignore it. Now with arm64
macOS systems, this check was invalid, and we would set our breakpoint
for new binaries being loaded in dyld_sim, causing binary loading to
be missed by lldb.
This patch uses the Target's ArchSpec triple environment, to see if
this process is a simulator process. If this is a Simulator process,
then we only recognize a MH_DYLINKER binary with OS type macOS as
being dyld.
This patch also removes some code that handled pre-2016 era debugservers
which didn't give us the OS type for each binary. This was only being
used on macOS, where we don't need to handle the presence of very old
debugservers.
Differential Revision: https://reviews.llvm.org/D115001
rdar://
85907839
Nico Weber [Fri, 3 Dec 2021 02:11:36 +0000 (21:11 -0500)]
[gn build] (manually) port
9c4d194f44c4 better
Vitaly Buka [Fri, 3 Dec 2021 01:29:39 +0000 (17:29 -0800)]
[lsan] Deflake fork_and_leak test
Nico Weber [Fri, 3 Dec 2021 02:03:38 +0000 (21:03 -0500)]
[gn build] (manually) port
9c4d194f44c4
Konstantin Varlamov [Fri, 3 Dec 2021 01:57:55 +0000 (17:57 -0800)]
[libc++][ranges] Implement [special.mem.concepts].
Implement the exposition-only concepts specified in
`[special.mem.concepts]`. These are all thin wrappers over other
concepts.
Reviewed By: #libc, Quuxplusone, ldionne
Differential Revision: https://reviews.llvm.org/D114761
Hongtao Yu [Tue, 15 Sep 2020 23:12:12 +0000 (16:12 -0700)]
[CSSPGO] Turn on Profi by default
As titled.
Reviewed By: wenlei, wlei
Differential Revision: https://reviews.llvm.org/D115011
Mehdi Amini [Thu, 2 Dec 2021 17:06:18 +0000 (17:06 +0000)]
Using make_unique instead of `new` (NFC)
Fix a clang-tidy warning.
Geoffrey Martin-Noble [Fri, 3 Dec 2021 01:33:19 +0000 (17:33 -0800)]
[Bazel] Set the right default for LLVM_WINDOWS_PREFER_FORWARD_SLASH on Windows
This cmake configure option was added in
df0ba47c36f6bd0865e3286853b76d37e037c2d7, and was ported to
Bazel in
7d323dc7738e3152c4bd54a23ac27554bfbbf583.
However, the setting chosen in Bazel seems accidental, not necessarily
intentional.
LLVM_WINDOWS_PREFER_FORWARD_SLASH has no effect on Unix, and on
Windows, setting it to 0 is the default, which gets the same behaviour
as before. Setting it to 1 enables new experimental behaviours
(which is enabled by default on MinGW targets only).
As I don't see any explicit intent to opt in to the new experimental
behaviour, I believe the current configuration in bazel was a
mistake.
Differential Revision: https://reviews.llvm.org/D114065
Keith Smiley [Thu, 2 Dec 2021 19:10:41 +0000 (11:10 -0800)]
[clang][Darwin] Remove old lld implementation handling
This now assumes that for the darwin driver any lld is the "new" macho
lld implementation.
Differential Revision: https://reviews.llvm.org/D114974
Reid Kleckner [Fri, 3 Dec 2021 00:25:28 +0000 (16:25 -0800)]
[bazel] Update static analyzer unit test deps for clangTesting
Mingming Liu [Fri, 3 Dec 2021 00:21:11 +0000 (00:21 +0000)]
Run update_test_checks.py on test cases.
In this way, each instruction has a line, and diffs will be more clear.
Differential Revision: https://reviews.llvm.org/D115006
Reid Kleckner [Fri, 3 Dec 2021 00:15:38 +0000 (16:15 -0800)]
[Bazel] Add LLVM_ENABLE_CURL to Bazel llvm-config.h.cmake for
e0b259f2
Daniil Fukalov [Fri, 29 Oct 2021 15:29:57 +0000 (18:29 +0300)]
[CostModel][AMDGPU] Fix instructions costs estimation for vector types.
1. Fixed vector instructions costs estimations incosistency - removed different
logic for "not simple types" since it biases costs for these types.
2. Fixed legalization penalty for vectors too big for the target: changed from
overwrite default legalization cost value estimation to added penalty.
3. Fixed few typos in tests.
Reviewed By: rampitec
Differential Revision: https://reviews.llvm.org/D114893
Greg Clayton [Thu, 2 Dec 2021 23:47:15 +0000 (15:47 -0800)]
Include extra input contents on this test so we can see why lldb-arm-ubuntu buildbot is failing.
Only lldb-arm-ubuntu is failing after https://reviews.llvm.org/D114288 and there isn't enough input context to see why this is failing. It works on x86_64 linux just fine.
Mogball [Thu, 2 Dec 2021 23:42:47 +0000 (23:42 +0000)]
[mlir][ods] update attr/type def format docs
Vy Nguyen [Thu, 2 Dec 2021 20:22:43 +0000 (15:22 -0500)]
[clang-tidy][objc] Finds and fixes improper usages of XCTAssertEquals and XCTAssertNotEquals.
Using XCTAssertEqual on NSString* objects is almost always wrong.
Unfortunately, we have seen a lot of tests doing this and reyling on pointer equality for strings with the same values (which happens to work sometimes - depending on the linker, but this assumption is not guaranteed by the language)
These fixes would make tests less brittle.
Differential Revision: https://reviews.llvm.org/D114975
Steven Wan [Thu, 2 Dec 2021 23:29:43 +0000 (18:29 -0500)]
[analyzer]Skip unstable CSA tests failing on several platforms
Clang static analyzer uses bitwidth to infer the integer value type, that is, any 32-bit integer is considered of type `int`, and any 64-bit integer is considered of type `long`. This isn't always true, for instance, in ILP32 (e.g., 32-bit AIX), 32-bit could be `long`, and in LP64 (e.g., 64-bit wasm64), 64-bit could be `long long`.
Reviewed By: steakhal
Differential Revision: https://reviews.llvm.org/D114454
George Koehler [Thu, 2 Dec 2021 23:28:37 +0000 (15:28 -0800)]
[ELF][PPC32] Make R_PPC32_PLTREL retain .got
PLT usage needs the first 12 bytes of the .got section. We need to keep .got and
DT_GOT_PPC even if .got/_GLOBAL_OFFSET_TABLE_ are not referenced (large PIC code
may only reference .got2), which is the case in OpenBSD's ld.so, leading
to a misleading error, "unsupported insecure BSS PLT object".
Fix this by adding R_PPC32_PLTREL to the list of hasGotOffRel.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D114982
Matt Arsenault [Thu, 2 Dec 2021 21:31:56 +0000 (16:31 -0500)]
AMDGPU: Sanitized functions require implicit arguments
Do not infer no-amdgpu-implicitarg-ptr for sanitized functions. If a
function is explicitly marked amdgpu-no-implicitarg-ptr and
sanitize_address, infer that it is required.
Ulysse Beaugnon [Thu, 2 Dec 2021 22:49:02 +0000 (23:49 +0100)]
[MLIR] Use a shared uniquer for affine maps and integer sets.
Affine maps and integer sets previously relied on a single lock for creating unique instances. In a multi-threaded setting, this lock becomes a contention point. This commit updates AffineMap and IntegerSet to use StorageUniquer instead. StorageUniquer internally uses sharded locks and thread-local caches to reduce contention. It is already used for affine expressions, types and attributes. On my local machine, this gives me a 5X speedup for an application that manipulates a lot of affine maps and integer sets.
This commit also removes the integer set uniquer threshold. The threshold was used to avoid adding integer sets with a lot of constraints to the hash_map containing unique instances, but the constraints and the integer set were still allocated in the same allocator and never freed, thus not saving any space expect for the hash-map entry.
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D114942
Vitaly Buka [Thu, 2 Dec 2021 20:44:38 +0000 (12:44 -0800)]
[NFC][sanitizer] Remove SetSoftRssLimitExceededCallback
According comments on D44404, something like that was the goal.
Reviewed By: morehouse, kstoimenov
Differential Revision: https://reviews.llvm.org/D114991
Vitaly Buka [Thu, 2 Dec 2021 21:27:11 +0000 (13:27 -0800)]
[NFC][sanitizer] Reorder functions in cpp file
David Blaikie [Thu, 2 Dec 2021 20:16:10 +0000 (12:16 -0800)]
libcxx pretty printers: remove non-lazy_string fallback
This has been supported on gdb for something like ~10 years, so doesn't
seem necessary to carry a fallback.
Differential Revision: https://reviews.llvm.org/D114986
Paul Robinson [Thu, 2 Dec 2021 22:28:07 +0000 (14:28 -0800)]
[TLI checker] Follow good practice with -COUNT directives
FileCheck's -COUNT suffix doesn't fail if there are more matches
than you asked for, so it's good practice to put a -NOT after.
Yitzhak Mandelbaum [Thu, 2 Dec 2021 19:52:47 +0000 (19:52 +0000)]
[clang-tidy] Allow disabling support for NOLINTBEGIN/NOLINTEND blocks.
This patch parameterizes the clang-tidy diagnostic consumer with a boolean that
controls whether to honor NOLINTBEGIN/NOLINTEND blocks. The current support for
scanning these blocks is very costly -- O(n*m) in the size of files (n) and
number of diagnostics found (m), with a large constant factor. So, the patch
allows clients to disable it.
Future patches should make the feature more efficient, but this will mitigate in
the interim.
Differential Revision: https://reviews.llvm.org/D114981
Groverkss [Thu, 2 Dec 2021 22:14:36 +0000 (03:44 +0530)]
[MLIR][FlatAffineConstraints] Remove duplicate divisions while merging local ids
This patch implements detecting duplicate local identifiers by extracting their
division representation while merging local identifiers.
For example, given the FACs A, B:
```
A: (x, y)[s0] : (exists d0 = [x / 4], d1 = [y / 4]: d0 <= s0, d1 <= s0, x + y >= 2)
B: (x, y)[s0] : (exists d0 = [x / 4], d1 = [y / 4]: d0 <= s0, d1 <= s0, x + y >= 5)
```
The intersection of A and B without this patch would lead to the following FAC:
```
(x, y)[s0] : (exists d0 = [x / 4], d1 = [y / 4], d2 = [x / 4], d3 = [x / 4]: d0 <= s0, d1 <= s0, d2 <= s0, d3 <= s0, x + y >= 2, x + y >= 5)
```
after this patch, merging of local ids will detect that `d0 = d2` and `d1 = d3`,
and the intersection of these two FACs will be (after removing duplicate constraints):
```
(x, y)[s0] : (exists d0 = [x / 4], d1 = [y / 4] : d0 <= s0, d1 <= s0, x + y >= 2, x + y >= 5)
```
This reduces the number of constraints by 2 (constraints) + 4 (2 constraints for each extra division) for this case.
This is used to reduce the output size representation of operations like
PresburgerSet::subtract, PresburgerSet::intersect which require merging local
variables.
Reviewed By: arjunp, bondhugula
Differential Revision: https://reviews.llvm.org/D112867
Groverkss [Thu, 2 Dec 2021 22:08:00 +0000 (03:38 +0530)]
Revert changes that should have been sent as a patch
Revert changes that were meant to be sent as a single commit with
summary for the differential review, but were accidently sent directly.
This reverts commit
3bc5353fc6f291d6ac12c256600b5b05d7de8f74.
Alexey Bataev [Tue, 29 Jun 2021 20:56:00 +0000 (13:56 -0700)]
[OPENMP]Fix PR50733: unexpected final value of list-item in linear clause in loop construct.
Currently the last value of linear is calculated as var = init + num_iters * step.
Replaced it with var = var_priv, i.e. original variable gets the value
of the last private copy.
Differential Revision: https://reviews.llvm.org/D105151
Amy Kwan [Thu, 2 Dec 2021 21:24:06 +0000 (15:24 -0600)]
[PowerPC] Fix load/store selection infrastructure when load/store intrinsics are used on P10.
The load/store infrastructure previously made an incorrect assumption that
whenever it is used with a load/store intrinsic on Power10 - those intrinsics
would automatically be the lxvp/stxvp intrinsics introduced in Power10.
However, this is obviously not the case as there are multiple instances of
pre-P10 intrinsics that use the refactored load/store implementation.
This patch corrects this assumption, and produces the expected intrinsic on pre-P10.
Differential Revision: https://reviews.llvm.org/D114978
Groverkss [Thu, 2 Dec 2021 21:39:19 +0000 (03:09 +0530)]
Address bondhugula's comments
Groverkss [Thu, 18 Nov 2021 17:04:36 +0000 (22:34 +0530)]
Addressed comments
Groverkss [Thu, 18 Nov 2021 15:34:00 +0000 (21:04 +0530)]
Fix doc comment for mergeLocalIds.
Groverkss [Thu, 18 Nov 2021 14:51:46 +0000 (20:21 +0530)]
Address more comments.
Groverkss [Fri, 12 Nov 2021 22:57:37 +0000 (04:27 +0530)]
Addressed more comments
Groverkss [Thu, 11 Nov 2021 17:12:04 +0000 (22:42 +0530)]
Fix asserts as suggested by Arjun
Groverkss [Wed, 10 Nov 2021 10:18:48 +0000 (15:48 +0530)]
Fix clang-format errors
Groverkss [Mon, 8 Nov 2021 22:02:40 +0000 (03:32 +0530)]
Update docs
Groverkss [Mon, 8 Nov 2021 21:43:43 +0000 (03:13 +0530)]
Update tests for mergeLocalIds
Groverkss [Mon, 8 Nov 2021 21:43:25 +0000 (03:13 +0530)]
Address arjun's comments
Groverkss [Sun, 7 Nov 2021 05:15:20 +0000 (10:45 +0530)]
Move division representation to a common function
Groverkss [Sat, 6 Nov 2021 10:45:51 +0000 (16:15 +0530)]
Update mergeLocalIds docs
Groverkss [Sun, 31 Oct 2021 21:34:08 +0000 (03:04 +0530)]
Update docs for mergeLocalIds
Groverkss [Sat, 30 Oct 2021 12:12:47 +0000 (17:42 +0530)]
Implement division merging
Jake Egan [Thu, 2 Dec 2021 21:39:52 +0000 (16:39 -0500)]
[LTO] Specify triple to address unknown binary format assertion
On AIX, this test generates an XCOFF file and hits "unknown binary format" assertion in llvm-nm. This patch specifies the triple to mitigate this issue.
Reviewed By: steven_wu
Differential Revision: https://reviews.llvm.org/D114683
Alexey Bataev [Wed, 24 Nov 2021 19:21:10 +0000 (11:21 -0800)]
[OPENMP]Fix PR51327: Range based for loop not working if range's type is a template.
Need to postpone anlysis of the ranged for loops till the actual
instantiation to avoid erroneous emission of error messages.
Differential Revision: https://reviews.llvm.org/D114560
Mogball [Thu, 2 Dec 2021 21:25:04 +0000 (21:25 +0000)]
[mlir][ods] fix defgen on empty files
Philip Reames [Thu, 2 Dec 2021 20:56:09 +0000 (12:56 -0800)]
[funcattrs] Infer writeonly argument attribute
This change extends the current logic for inferring readonly and readnone argument attributes to also infer writeonly.
This change is deliberately minimal; there's a couple of areas for follow up.
* I left out all call handling and thus any benefit from the SCC walk. When examining the test changes, I realized the existing code is imprecise, and am going to fix that in it's own revision before adding in the writeonly handling. (Mostly because updating the tests is hard when I, the human, can't figure out whether the result is correct.)
* I left out handling for storing a value (as opposed to storing to a pointer). This should benefit readonly/readnone as well, and applies to a bunch of other instructions. Seemed worth having as a separate review.
Differential Revision: https://reviews.llvm.org/D114963
Alexey Bataev [Fri, 26 Nov 2021 15:36:25 +0000 (07:36 -0800)]
[OPENMP]Fix error emission for dependent expressions in iterators for depend clauses.
Need to postpone analysis for addressable lvalue in a depend clause with
iterators, otherwise the incorrect error message is emitted.
Differential Revision: https://reviews.llvm.org/D114653
Ron Lieberman [Thu, 2 Dec 2021 20:58:19 +0000 (20:58 +0000)]
Restric xfail on openmp/libomptarget/test/mapping/reduction_implicit_map.cpp to amdgcn-amd-amdhsa
Vitaly Buka [Thu, 2 Dec 2021 20:47:47 +0000 (12:47 -0800)]
[NFC][sanitizer] Rename RssLimitExceeded -> IsRssLimitExceeded
Nico Weber [Thu, 2 Dec 2021 20:50:56 +0000 (15:50 -0500)]
[gn build] (manually) port
e0b259f22c003ffe9
Ron Lieberman [Thu, 2 Dec 2021 20:32:06 +0000 (20:32 +0000)]
xfail: libomptarget reduction_implicit_map.cpp after reapply of Start calling setTargetAttributes
Noah Shutty [Thu, 2 Dec 2021 19:33:04 +0000 (19:33 +0000)]
[llvm] [Support] Add CURL HTTP Client.
Provides an implementation of `HTTPClient` that wraps libcurl.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D112753
Ron Lieberman [Thu, 2 Dec 2021 20:29:30 +0000 (20:29 +0000)]
Revert "xfail: reduction_implicit_map.cpp after reapply of Start calling setTargetAttributes"
This reverts commit
8b646f212e9ccc8e0fbf1a84603d0a40bfca1338.
Kirill Stoimenov [Thu, 2 Dec 2021 20:19:29 +0000 (20:19 +0000)]
[ASan] Fixed asan_mapping.h format.
Reviewed By: kstoimenov
Differential Revision: https://reviews.llvm.org/D114987
Ron Lieberman [Thu, 2 Dec 2021 20:22:11 +0000 (20:22 +0000)]
xfail: reduction_implicit_map.cpp after reapply of Start calling setTargetAttributes
Nikolas Klauser [Thu, 2 Dec 2021 13:12:51 +0000 (14:12 +0100)]
[libc++][NFC] Update namespace comments in include/
update the namspace comments in include/
Reviewed By: ldionne, #libc
Spies: smeenai, libcxx-commits
Differential Revision: https://reviews.llvm.org/D114947
spupyrev [Thu, 2 Dec 2021 19:59:33 +0000 (11:59 -0800)]
profi - a flow-based profile inference algorithm: Part III (out of 3)
This is a continuation of D109860 and D109903.
An important challenge for profile inference is caused by the fact that the
sample profile is collected on a fully optimized binary, while the block and
edge frequencies are consumed on an early stage of the compilation that operates
with a non-optimized IR. As a result, some of the basic blocks may not have
associated sample counts, and it is up to the algorithm to deduce missing
frequencies. The problem is illustrated in the figure where three basic
blocks are not present in the optimized binary and hence, receive no samples
during profiling.
We found that it is beneficial to treat all such blocks equally. Otherwise the
compiler may decide that some blocks are “cold” and apply undesirable
optimizations (e.g., hot-cold splitting) regressing the performance. Therefore,
we want to distribute the counts evenly along the blocks with missing samples.
This is achieved by a post-processing step that identifies "dangling" subgraphs
consisting of basic blocks with no sampled counts; once the subgraphs are
found, we rebalance the flow so as every branch probability is 50:50 within the
subgraphs.
Our experiments indicate up to 1% performance win using the optimization on
some binaries and a significant improvement in the quality of profile counts
(when compared to ground-truth instrumentation-based counts)
{
F19093045}
Reviewed By: hoy
Differential Revision: https://reviews.llvm.org/D109980
Nico Weber [Thu, 2 Dec 2021 20:00:40 +0000 (15:00 -0500)]
[gn build] (manually) port
9e3552523ebd (no more old mach-o lld)
Fangrui Song [Thu, 2 Dec 2021 19:58:25 +0000 (11:58 -0800)]
[ELF] Hint -z nostart-stop-gc for __start_ undefined references
Make users aware what to do with ld.lld 13.0.0 / GNU ld<2015-10 --gc-sections
behavior.
Differential Revision: https://reviews.llvm.org/D114830
Matt Arsenault [Mon, 29 Nov 2021 20:47:42 +0000 (15:47 -0500)]
Reapply "OpenMP: Start calling setTargetAttributes for generated kernels"
This reverts commit
25eb7fa01d7ebbe67648ea03841cda55b4239ab2.
Previous buildbot failures appear to have been a fluke from a dirty
build.
Vitaly Buka [Thu, 2 Dec 2021 02:41:54 +0000 (18:41 -0800)]
[NFC][sanitizer] Use more bytes of sanitizer_stack_store_test pointers
Leonard Chan [Thu, 2 Dec 2021 19:45:41 +0000 (11:45 -0800)]
[compiler-rt] Fix incorrect variable names used
Vitaly Buka [Thu, 2 Dec 2021 08:41:41 +0000 (00:41 -0800)]
[sanitizer] Start background thread once
Reviewed By: morehouse
Differential Revision: https://reviews.llvm.org/D114933
Keith Smiley [Thu, 2 Dec 2021 19:24:08 +0000 (11:24 -0800)]
[Bazel] Remove old macho lld port
This code and cmake was removed in https://reviews.llvm.org/D114842
Differential Revision: https://reviews.llvm.org/D114976
Vitaly Buka [Thu, 2 Dec 2021 08:53:02 +0000 (00:53 -0800)]
[asan] Remove confusing workaround
The goal is to identify the bot and try to fix it.
SetSoftRssLimitExceededCallback is AsanInitInternal as I assume
that only MaybeStartBackgroudThread needs to be delayed to constructors.
Later I want to move MaybeStartBackgroudThread call into sanitizer_common.
If it needs to be reverted please provide to more info, like bot, or details about setup.
Reviewed By: kstoimenov
Differential Revision: https://reviews.llvm.org/D114934
David Blaikie [Fri, 5 Nov 2021 05:45:55 +0000 (22:45 -0700)]
Simplify the libcxx std::string_view gdb pretty printer
Seems better to rely on the existing formatting, makes the output
smaller/simpler - this is consistent with libstdc++'s std::string_view
pretty printing too.
Differential Revision: https://reviews.llvm.org/D113244
Reid Kleckner [Thu, 2 Dec 2021 19:30:26 +0000 (11:30 -0800)]
[Bazel] Remove old MachO LLD from the Bazel build
Updates Bazel files for
9e3552523ebd3385487e01e3e7af37b8c0efaf57
Keith Smiley [Wed, 1 Dec 2021 06:01:07 +0000 (22:01 -0800)]
[lld-macho] Remove old macho darwin lld
During the llvm round table it was generally agreed that the newer macho
lld implementation is feature complete enough to replace the old
implementation entirely. This will reduce confusion for new users who
aren't aware of the history.
Differential Revision: https://reviews.llvm.org/D114842
spupyrev [Thu, 2 Dec 2021 18:19:32 +0000 (10:19 -0800)]
profi - a flow-based profile inference algorithm: Part II (out of 3)
This is a continuation of D109860.
Traditional flow-based algorithms cannot guarantee that the resulting edge
frequencies correspond to a *connected* flow in the control-flow graph. For
example, for an instance in the attached figure, a flow-based (or any other)
inference algorithm may produce an output in which the hot loop is disconnected
from the entry block (refer to the rightmost graph in the figure). Furthermore,
creating a connected minimum-cost maximum flow is a computationally NP-hard
problem. Hence, we apply a post-processing adjustments to the computed flow
by connecting all isolated flow components ("islands").
This feature helps to keep all blocks with sample counts connected and results
in significant performance wins for some binaries.
{
F19077343}
Reviewed By: hoy
Differential Revision: https://reviews.llvm.org/D109903
Aart Bik [Tue, 30 Nov 2021 23:34:23 +0000 (15:34 -0800)]
[mlir][bufferization] fixed typo in to_memref doc
Reviewed By: pifon2a
Differential Revision: https://reviews.llvm.org/D114824
Alexey Bataev [Thu, 2 Dec 2021 12:22:55 +0000 (04:22 -0800)]
[SLP]Fix reused extracts cost.
If the extractelement instruction is used multiple times in the
different tree entries (either vectorized, or gathered), need to
compensate the scalar cost of such instructions. They are completely
removed if all users are part of the tree but we need to compensate the
cost only once for each instruction.
Differential Revision: https://reviews.llvm.org/D114958
Vitaly Buka [Mon, 22 Nov 2021 05:54:08 +0000 (21:54 -0800)]
[sanitizer] Add delta compression stack depot
Compress by factor 4x, takes about 10ms per 8 MiB block.
Depends on D114498.
Reviewed By: morehouse
Differential Revision: https://reviews.llvm.org/D114503
Vitaly Buka [Wed, 24 Nov 2021 00:31:26 +0000 (16:31 -0800)]
[sanitizer] Add compress_stack_depot flag
Depends on D114494.
Reviewed By: morehouse
Differential Revision: https://reviews.llvm.org/D114495
Reid Kleckner [Thu, 2 Dec 2021 18:19:54 +0000 (10:19 -0800)]
[ELF] Fix driver.test after
8c3641d0 when cwd is readonly
Vitaly Buka [Thu, 2 Dec 2021 07:52:31 +0000 (23:52 -0800)]
[sanitizer] DEFINE_REAL_PTHREAD_FUNCTIONS for hwasan, lsan, msan
It should be NFC, as they already intercept pthread_create.
This will let us to fix BackgroundThread for these sanitizerts.
In in followup patches I will fix MaybeStartBackgroudThread for them
and corresponding tests.
Reviewed By: kstoimenov
Differential Revision: https://reviews.llvm.org/D114935
Stella Stamenova [Thu, 2 Dec 2021 17:53:28 +0000 (09:53 -0800)]
[lldb] Skip two lldb tests on Windows because they are flaky
These tests work fine with VS2017, but become more flaky with VS2019 and the buildbot is about to get upgraded.
Differential Revision: https://reviews.llvm.org/D114907
Mircea Trofin [Thu, 2 Dec 2021 17:50:09 +0000 (09:50 -0800)]
[bazel][mlgo] Remove the mlgo-related build excludes
They aren't needed anymore, we handle conditional compilation in those
files.
Reviewed By: GMNGeoffrey
Differential Revision: https://reviews.llvm.org/D114970
Florian Hahn [Thu, 2 Dec 2021 17:38:07 +0000 (17:38 +0000)]
[BasicAA] Add tests for strcat/strncat/strcpy.
Florian Hahn [Thu, 2 Dec 2021 17:37:59 +0000 (17:37 +0000)]
[DSE] Read after strcpy test.
Joseph Huber [Thu, 2 Dec 2021 17:28:21 +0000 (12:28 -0500)]
[OpenMP] Remove the new runtime default for AMDGPU
The new runtime is currently broken for AMD offloading. This patch makes
the default the old runtime only for the AMD target.
Reviewed By: ronlieb
Differential Revision: https://reviews.llvm.org/D114965
Kazu Hirata [Thu, 2 Dec 2021 17:27:47 +0000 (09:27 -0800)]
[llvm] Use range-based for loops (NFC)
Kazu Hirata [Thu, 2 Dec 2021 17:20:17 +0000 (09:20 -0800)]
[llvm] Fix "unused variable" warnings
Alexey Bataev [Wed, 1 Dec 2021 18:01:56 +0000 (10:01 -0800)]
[SLP]Outline and fix code for finding common insertelement vectors.
Need to outline the code for finding common vectors in insertelement
instructions into a separate function for future patches. It also
improves the process by adding some extra checks for early exit and
fixes a bug where it always finds the match because of erroneous compare
of the same values.
Differential Revision: https://reviews.llvm.org/D114909
David Green [Thu, 2 Dec 2021 17:10:26 +0000 (17:10 +0000)]
[ARM] Introduce i8neg and i8pos addressing modes
Some instructions with i8 immediate ranges can only hold negative values
(like t2LDRHi8), only hold positive values (like t2STRT) or hold +/-
depending on the U bit (like the pre/post inc instructions. e.g
t2LDRH_POST). This patch splits the AddrModeT2_i8 into AddrModeT2_i8,
AddrModeT2_i8pos and AddrModeT2_i8neg to make this clear.
This allows us to get the offset ranges of t2LDRHi8 correct in the
load/store optimizer, fixing issues where we could end up creating
instructions with positive offsets (which may then be encoded as ldrht).
Differential Revision: https://reviews.llvm.org/D114638