platform/upstream/llvm.git
19 months ago[Release] Produce mlir tarball
Nikita Popov [Tue, 17 Jan 2023 11:59:54 +0000 (12:59 +0100)]
[Release] Produce mlir tarball

MLIR supports standalone builds, so I think it makes sense to also
produce a release tarball for the MLIR subproject.

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

19 months ago[AsmParser] Remove typed pointer auto-detection
Nikita Popov [Wed, 14 Dec 2022 12:41:10 +0000 (13:41 +0100)]
[AsmParser] Remove typed pointer auto-detection

IR is now always parsed in opaque pointer mode, unless
-opaque-pointers=0 is explicitly given. There is no automatic
detection of typed pointers anymore.

The -opaque-pointers=0 option is added to any remaining IR tests
that haven't been migrated yet.

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

19 months agoRevert "[JITLink] Add an initial implementation of JITLink for ELF/LoongArch"
wanglei [Wed, 18 Jan 2023 08:50:32 +0000 (16:50 +0800)]
Revert "[JITLink] Add an initial implementation of JITLink for ELF/LoongArch"

This reverts commit 28b6f38d0a841451af7b4893368543382dd5e630.

This breaks on LoongArch64 bot.
https://lab.llvm.org/staging/#/builders/236/builds/896

19 months agoRevert "[BitcodeReader] Allow reading pointer types from old IR"
Nikita Popov [Wed, 18 Jan 2023 08:48:31 +0000 (09:48 +0100)]
Revert "[BitcodeReader] Allow reading pointer types from old IR"

This reverts commit b56df190b01335506ce30a4559d880da76d1a181.

The unit tests are implemented in a way that requires support for
writing typed pointer bitcode, which is going away soon. Please
rewrite it in a way that not have requirement, e.g. by shipping
pre-compiled bitcode, as we do for integration tests.

19 months ago[GVN][NFC] Add pre-commit tests for non-local load cases (D141680)
Sergey Kachkov [Mon, 16 Jan 2023 14:43:35 +0000 (17:43 +0300)]
[GVN][NFC] Add pre-commit tests for non-local load cases (D141680)

Add test cases when load is non-local for select dependency, but can be
found in extended BB (chain of blocks with single predecessor). Check
that type of found load is the same.

19 months ago[CodeGen] Prevent overlapping subregs in getCoveringSubRegIndexes
Pierre van Houtryve [Thu, 12 Jan 2023 08:52:33 +0000 (03:52 -0500)]
[CodeGen] Prevent overlapping subregs in getCoveringSubRegIndexes

If `getCoveringSubRegIndexes` returns a set of subregister indexes where some subregisters overlap others, it can create unsatisfiable copy bundles that eventually cause VirtRegRewriter to error out due to "cycles in copy bundle".

We can simply prevent this by making the algorithm skip over subregisters indexes that would cause an overlap with already-covered lanes.

Note that in the case of AMDGPU, this problem is caused by the lack of subregisters indexes for 13/14/15-register tuples. We have everything up until 12, then we have 16 and 32 but nothing between 12 and 16.
This means that the best candidate to do the least amount of copies when splitting a 29-register tuple was to copy (e.g.) 0-15 and 14-29, causing an overlap.
With this change, getCoveringSubRegIndexes will now prefer using something like 0-15, 16-28 and 1

Reviewed By: arsenm

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

19 months ago[AMDGPU] Precommit test for D141576
Pierre van Houtryve [Tue, 17 Jan 2023 08:50:29 +0000 (03:50 -0500)]
[AMDGPU] Precommit test for D141576

Reviewed By: arsenm

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

19 months ago[LowerIFunc] Remove typed pointer test (NFC)
Nikita Popov [Wed, 18 Jan 2023 08:45:25 +0000 (09:45 +0100)]
[LowerIFunc] Remove typed pointer test (NFC)

19 months ago[HWASAN] Add leak sanitizer flag support
Kirill Stoimenov [Wed, 18 Jan 2023 07:50:27 +0000 (23:50 -0800)]
[HWASAN] Add leak sanitizer flag support

Reviewed By: vitalybuka

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

19 months ago[HWASA] Restore LsanMetadata from D141642 Diff5
Vitaly Buka [Wed, 18 Jan 2023 07:40:30 +0000 (23:40 -0800)]
[HWASA] Restore LsanMetadata from D141642 Diff5

Unlike asan, we can't use pointer arithmetics to get from user ptr to
metadata. Asan does not use CombinedAllocator::GetMetadata and store
metadata next to the user data.

19 months ago[libc++][ranges] Mark completed Ranges papers and issues as done, bump version macro
Konstantin Varlamov [Wed, 18 Jan 2023 06:45:46 +0000 (22:45 -0800)]
[libc++][ranges] Mark completed Ranges papers and issues as done, bump version macro

All C++20 Ranges papers and LWG issues are done, with the exception of
https://wg21.link/P2210R2 ("Superior String Splitting"), and marked as
such.

All of these were already implemented prior to this patch except bumping
the feature test macro `__cpp_lib_ranges` as required by
https://wg21.link/P2325R3 ("Views should not be required to be default
constructible"). Note that, even though P2325R3 was voted into C++23, it
was voted with a recommendation for vendors to retroactively apply the
change to C++20 (see https://github.com/cplusplus/papers/issues/1007).

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

19 months ago[gn build] Port 28b6f38d0a84
LLVM GN Syncbot [Wed, 18 Jan 2023 06:35:55 +0000 (06:35 +0000)]
[gn build] Port 28b6f38d0a84

19 months agoRevert "Diagnose extensions in 'offsetof'"
Arthur Eubanks [Wed, 18 Jan 2023 06:31:56 +0000 (22:31 -0800)]
Revert "Diagnose extensions in 'offsetof'"

This reverts commit f1f0a0d8e8fdd2e534d9423b2e64c6b8aaa53aee.

Causes crashes on

$ echo 'typedef int a; void c() { __builtin_offsetof(struct {a b}, b); }' | bin/clang -cc1 -emit-llvm -o /dev/null - -x c

19 months agoRevert "nullptr returned from ActOnTag() is not a valid result"
Arthur Eubanks [Wed, 18 Jan 2023 06:31:25 +0000 (22:31 -0800)]
Revert "nullptr returned from ActOnTag() is not a valid result"

This reverts commit 3925fbc80019f72bf3f5174736f348acfb5768b0.

Dependent commit to be reverted.

19 months ago[RISCV][NFC] Use uncompressInst to relax instructions
wangpc [Wed, 18 Jan 2023 06:24:45 +0000 (14:24 +0800)]
[RISCV][NFC] Use uncompressInst to relax instructions

As the TODO said, we can just use generated uncompressInst to
relax instructions.

Reviewed By: craig.topper, kito-cheng

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

19 months ago[RISCV][NFC] Move compressInst/uncompressInst to RISCVBaseInfo
wangpc [Wed, 18 Jan 2023 06:24:23 +0000 (14:24 +0800)]
[RISCV][NFC] Move compressInst/uncompressInst to RISCVBaseInfo

We have several usages of compressInst/uncompressInst in different
files, which results in duplicated code. We move their implementations
to RISCVBaseInfo under namespace RISCVRVC to remove these duplications.

Reviewed By: craig.topper, asb

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

19 months ago[TableGen][NFC] Add postfix for validators of CompressPat
wangpc [Wed, 18 Jan 2023 06:24:03 +0000 (14:24 +0800)]
[TableGen][NFC] Add postfix for validators of CompressPat

So that we won't get redefinition errors if we use compressInst
and uncompressInst in the same file.

Reviewed By: asb

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

19 months ago[JITLink] Add an initial implementation of JITLink for ELF/LoongArch
wanglei [Tue, 17 Jan 2023 07:10:00 +0000 (15:10 +0800)]
[JITLink] Add an initial implementation of JITLink for ELF/LoongArch

This implementation supports basic relocation types and adds EHFrame,
Got/Plt handling passes.
This patch also enables JIT support for LoongArch64.

With this patch, I successfully run hello.ll and simple_throw.ll
(which is generated from test-suite/SingleSource/Regression/C++/EH/simple_throw.cpp)
using the `lli` command with options `--jit-kind=orc --jit-linker=jitlink`.

Note: `hasJIT` property of LoongArch32 remains false as there is no
validation environment.

Reviewed By: lhames

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

19 months ago[Serialization] Serialize the new added FunctionDeclBits: IsIneligibleOrNotSelected
Chuanqi Xu [Tue, 17 Jan 2023 09:05:52 +0000 (17:05 +0800)]
[Serialization] Serialize the new added FunctionDeclBits: IsIneligibleOrNotSelected

Close https://github.com/llvm/llvm-project/issues/59719.

The root cause of the problem is that we forgot to serialize a new
introduced bit to FunctionDeclBits. Maybe we need to find some methods
to work for detecting this.

19 months ago[NFC] Disable test on AIX due to different default output
Jake Egan [Wed, 18 Jan 2023 05:55:16 +0000 (00:55 -0500)]
[NFC] Disable test on AIX due to different default output

Previous attempt to stop this test from running on AIX didn't work,
so revert it and require not system-aix instead.

This reverts commit b1ac375e11c801be2a1e07e87be91ae54decf2eb.

19 months ago[gn build] Manually port e022ca8
Arthur Eubanks [Wed, 18 Jan 2023 06:13:29 +0000 (22:13 -0800)]
[gn build] Manually port e022ca8

19 months ago[perf-training] Check extension in findFilesWithExtension
Amir Ayupov [Tue, 10 Jan 2023 02:07:26 +0000 (18:07 -0800)]
[perf-training] Check extension in findFilesWithExtension

`findFilesWithExtension` helper checks for `endswith(extension)` instead of
exactly matching the file extension. This causes it to match unrelated files,
for example, `.profdata` files while matching `.fdata` files:

http://157.230.108.44:8011/#/builders/56/builds/247
```
Merging data from /worker/worker/bolt-x86_64-ubuntu-clang-bolt-gcc/build/tools/clang/prof.fdata.1124569.fdata...
Merging data from /worker/worker/bolt-x86_64-ubuntu-clang-bolt-gcc/build/tools/clang/test/Frontend/Output/optimization-remark-with-hotness-new-pm.c.tmp.profdata...
```

Reviewed By: phosek

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

19 months ago[mlir] Fixed memory leak after D141726.
Slava Zakharin [Wed, 18 Jan 2023 03:25:23 +0000 (19:25 -0800)]
[mlir] Fixed memory leak after D141726.

Reported in https://lab.llvm.org/buildbot/#/builders/5/builds/30788

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

19 months agollvm-reduce: Reduce ifuncs
Matt Arsenault [Tue, 22 Nov 2022 21:55:44 +0000 (16:55 -0500)]
llvm-reduce: Reduce ifuncs

Reduce by calling the resolver function at the use site, and inserting
an indirect call. Try to delete if there are no uses left over.

We should also probably try to do something about constantexpr uses;
perhaps treat them like aliases.

19 months agoUtils: Add utility pass to lower ifuncs
Matt Arsenault [Fri, 2 Dec 2022 00:02:18 +0000 (19:02 -0500)]
Utils: Add utility pass to lower ifuncs

Create a global constructor which will initialize a global table of
function pointers. For now, this is only used as a reduction technique
for llvm-reduce.

In the future this may be useful to support ifunc on systems where the
program loader doesn't natively support it.

19 months agollvm-reduce: Simplify async usage by avoiding lambda
Matt Arsenault [Wed, 18 Jan 2023 00:14:16 +0000 (19:14 -0500)]
llvm-reduce: Simplify async usage by avoiding lambda

Use the variadic template form to avoid naming all the
parameters twice.

19 months agollvm-reduce: Use StringRef/ArrayRef
Matt Arsenault [Sat, 14 Jan 2023 21:37:46 +0000 (16:37 -0500)]
llvm-reduce: Use StringRef/ArrayRef

19 months agollvm-reduce: Add missing consts
Matt Arsenault [Sat, 14 Jan 2023 20:15:44 +0000 (15:15 -0500)]
llvm-reduce: Add missing consts

19 months ago[hwasan] Fix LsanMetadata::LsanMetadata
Vitaly Buka [Wed, 18 Jan 2023 03:21:17 +0000 (19:21 -0800)]
[hwasan] Fix LsanMetadata::LsanMetadata

19 months ago[Flang] Fix parsing error on loop count compiler directive
Nadeem, Usman [Wed, 18 Jan 2023 02:53:51 +0000 (18:53 -0800)]
[Flang] Fix parsing error on loop count compiler directive

Fixes: https://github.com/llvm/llvm-project/issues/58731
Fixes: https://github.com/llvm/llvm-project/issues/56678

Only handles this form which was reported: `!DIR$ LOOP COUNT (n1[, n2]...)`

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

Change-Id: I768c8cb9f289c5fc4adee1ef8262c6d827574f27

19 months ago[AArch64][SVE] Add more intrinsics in 'isZeroingInactiveLanes'.
chendewen [Wed, 18 Jan 2023 03:02:46 +0000 (11:02 +0800)]
[AArch64][SVE] Add more intrinsics in 'isZeroingInactiveLanes'.

The REINTERPRET_CAST operation generates redundant and and ptrue instructions.
For some instructions, this is redundant, because its inactive lanes are zeroed by construction.
For example. Codegen before:
```
facgt p2.d, p0/z, z4.d, z1.d
ptrue p1.d
and p1.b, p2/z, p2.b, p1.b
```
After:
```
facgt p1.d, p0/z, z4.d, z1.d
```
ref: https://reviews.llvm.org/D129851

Reviewed By:sdesmalen,paulwalker-arm

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

19 months agoAdd NVGPUUtil bazel lib
Manish Gupta [Tue, 17 Jan 2023 23:22:30 +0000 (15:22 -0800)]
Add NVGPUUtil bazel lib

19 months ago[C++20] [Modules] Deprecate `-fmodules-ts` flag
Chuanqi Xu [Mon, 16 Jan 2023 07:51:29 +0000 (15:51 +0800)]
[C++20] [Modules] Deprecate `-fmodules-ts` flag

Close https://github.com/llvm/llvm-project/issues/60060

Reviewed By: aaron.ballman, erichkeane

Differential Revision: https://reviews.llvm.org/p/erichkeane/

19 months ago[RISCV] Eliminate the need to pass both RISCVSubtarget and MCSubtargetInfo to isCompr...
Craig Topper [Wed, 18 Jan 2023 02:04:55 +0000 (18:04 -0800)]
[RISCV] Eliminate the need to pass both RISCVSubtarget and MCSubtargetInfo to isCompressibleInst.

RISCVSubtarget should be a superclass of MCSubtargetInfo so should
have all the same information. Now we pass RISCVSubtarget by
reference and name it STI.

Confusingly, we seem to have been using an MCSubtargetInfo from
the TargetMachine rather than the one associated with the function
we are operating. I'm going to assume that was a mistake and not
intentional.

Reviewed By: kito-cheng

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

19 months ago[C++] [Coroutines] Deprecates the '-fcoroutines-ts' flag
Chuanqi Xu [Thu, 12 Jan 2023 08:23:46 +0000 (16:23 +0800)]
[C++] [Coroutines] Deprecates the '-fcoroutines-ts' flag

According to https://github.com/llvm/llvm-project/issues/59110, the
`-fcoroutines-ts` flag should be deprecated.

Reviewed By: aaron.ballman, philnik

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

19 months ago[-Wunsafe-buffer-usage][NFC] Refactor checkUnsafeBufferUsage
Jan Korous [Wed, 18 Jan 2023 01:51:37 +0000 (17:51 -0800)]
[-Wunsafe-buffer-usage][NFC] Refactor checkUnsafeBufferUsage

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

19 months ago[HWASAN] Implemented LSAN SetLsanTag and IgnoreObjectLocked
Kirill Stoimenov [Wed, 18 Jan 2023 00:50:48 +0000 (16:50 -0800)]
[HWASAN] Implemented LSAN SetLsanTag and IgnoreObjectLocked

Reviewed By: vitalybuka

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

19 months ago[NFC][bazel] Add export_files for utils/textmate/mlir.json
Jordan Rupprecht [Wed, 18 Jan 2023 01:16:36 +0000 (17:16 -0800)]
[NFC][bazel] Add export_files for utils/textmate/mlir.json

19 months ago[libc++][NFC] Split up ranges.transform.pass.cpp
Nikolas Klauser [Tue, 17 Jan 2023 21:48:00 +0000 (22:48 +0100)]
[libc++][NFC] Split up ranges.transform.pass.cpp

`ranges.transform.pass.cpp` takes ~42s to run on my machine, `ranges.transform.binary.pass.cpp` takes ~26s and `ranges.transform.unary.pass.cpp` takes ~2s.

Reviewed By: ldionne, #libc

Spies: libcxx-commits

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

19 months ago[NFC] [scudo] syntax-check DCHECK arguments if DCHECK is off
Florian Mayer [Fri, 13 Jan 2023 19:15:37 +0000 (11:15 -0800)]
[NFC] [scudo] syntax-check DCHECK arguments if DCHECK is off

This is a widespread technique, used in at least:

* ABSL: https://github.com/abseil/abseil-cpp/blob/master/absl/log/internal/check_op.h#L52
* Chromium: https://source.chromium.org/chromium/chromium/src/+/main:base/check.h;l=185?q=DCHECK%20f:base&ss=chromium
* Android: https://cs.android.com/android/platform/superproject/+/master:system/libbase/include/android-base/logging.h;drc=bda7f0a0cc945c860713a1dc497919f17fad1651;l=321

Reviewed By: Chia-hungDuan, vitalybuka

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

19 months ago[-Wunsafe-buffer-usage] Emit warnings about unsafe operations on arrays
Rashmi Mudduluru [Wed, 18 Jan 2023 00:28:23 +0000 (16:28 -0800)]
[-Wunsafe-buffer-usage] Emit warnings about unsafe operations on arrays

Differential Revision: https://reviews.llvm.org/D141725/new/

19 months ago[HWASan] link to doc in reports on Android
Florian Mayer [Tue, 17 Jan 2023 21:51:29 +0000 (13:51 -0800)]
[HWASan] link to doc in reports on Android

Reviewed By: eugenis

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

19 months ago[OpenMP] Support kernel record and replay
Giorgis Georgakoudis [Tue, 17 Jan 2023 23:35:44 +0000 (15:35 -0800)]
[OpenMP] Support kernel record and replay

This patch adds functionality for recording and replaying the execution of OpenMP offload kernels, based on an original implementation by Steve Rangel. The patch extends libomptarget to extract a json description of the kernel, the device image binary, and a device memory snapshot before and after the execution of a recorded kernel. Kernel recording/replaying in libomptarget is controlled through env vars (LIBOMPTARGET_RECORD, LIBOMPTARGET_REPLAY). It provides a tool, llvm-omp-kernel-replay, for replaying a kernel using the extracted information with the ability to verify replayed execution using the post-execution device memory snapshot, also supporting changing the number of teams/threads for replaying.

Reviewed By: jdoerfert

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

19 months ago[nfc][mlgo] Remove abstraction layers for training logger
Mircea Trofin [Tue, 17 Jan 2023 21:57:02 +0000 (13:57 -0800)]
[nfc][mlgo] Remove abstraction layers for training logger

This follows from D141720

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

19 months ago[MachineBasicBlock] Explicit FT branching param
Anshil Gandhi [Tue, 17 Jan 2023 21:34:27 +0000 (14:34 -0700)]
[MachineBasicBlock] Explicit FT branching param

Introduce a parameter in getFallThrough() to optionally
allow returning the fall through basic block in spite of
an explicit branch instruction to it. This parameter is
set to false by default.

Introduce getLogicalFallThrough() which calls
getFallThrough(false) to obtain the block while avoiding
insertion of a jump instruction to its immediate successor.

This patch also reverts the changes made by D134557 and
solves the case where a jump is inserted after another jump
(branch-relax-no-terminators.mir).

Reviewed By: arsenm

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

19 months agoRevert ""Reland "[pgo] Avoid introducing relocations by using private alias""
Arthur Eubanks [Tue, 17 Jan 2023 23:40:49 +0000 (15:40 -0800)]
Revert ""Reland "[pgo] Avoid introducing relocations by using private alias""

This reverts commit 6e5cbc097a5ac7fa95a8f425af8b03958151c763.

Causes link errors, see http://go/crb/1408161.

19 months agoFix OSX build break introduced by D141720
Mircea Trofin [Tue, 17 Jan 2023 23:14:30 +0000 (15:14 -0800)]
Fix OSX build break introduced by D141720

19 months ago[Propeller] Use Fixed MBB ID instead of volatile MachineBasicBlock::Number.
Rahman Lavaee [Wed, 7 Dec 2022 06:37:33 +0000 (22:37 -0800)]
[Propeller] Use Fixed MBB ID instead of volatile MachineBasicBlock::Number.

Let Propeller use specialized IDs for basic blocks, instead of MBB number.

This allows optimizations not just prior to asm-printer, but throughout the entire codegen.
This patch only implements the functionality under the new `LLVM_BB_ADDR_MAP` version, but the old version is still being used. A later patch will change the used version.

####Background
Today Propeller uses machine basic block (MBB) numbers, which already exist, to map native assembly to machine IR.  This is done as follows.
    - Basic block addresses are captured and dumped into the `LLVM_BB_ADDR_MAP` section just before the AsmPrinter pass which writes out object files. This ensures that we have a mapping that is close to assembly.
    - Profiling mapping works by taking a virtual address of an instruction and looking up the `LLVM_BB_ADDR_MAP` section to find the MBB number it corresponds to.
    - While this works well today, we need to do better when we scale Propeller to target other Machine IR optimizations like spill code optimization.  Register allocation happens earlier in the Machine IR pipeline and we need an annotation mechanism that is valid at that point.
    - The current scheme will not work in this scenario because the MBB number of a particular basic block is not fixed and changes over the course of codegen (via renumbering, adding, and removing the basic blocks).
    - In other words, the volatile MBB numbers do not provide a one-to-one correspondence throughout the lifetime of Machine IR.  Profile annotation using MBB numbers is restricted to a fixed point; only valid at the exact point where it was dumped.
    - Further, the object file can only be dumped before AsmPrinter and cannot be dumped at an arbitrary point in the Machine IR pass pipeline.  Hence, MBB numbers are not suitable and we need something else.
####Solution
We propose using fixed unique incremental MBB IDs for basic blocks instead of volatile MBB numbers. These IDs are assigned upon the creation of machine basic blocks. We modify `MachineFunction::CreateMachineBasicBlock` to assign the fixed ID to every newly created basic block.  It assigns `MachineFunction::NextMBBID` to the MBB ID and then increments it, which ensures having unique IDs.

 To ensure correct profile attribution, multiple equivalent compilations must generate the same Propeller IDs. This is guaranteed as long as the MachineFunction passes run in the same order. Since the `NextBBID` variable is scoped to `MachineFunction`, interleaving of codegen for different functions won't cause any inconsistencies.

The new encoding is generated under the new version number 2 and we keep backward-compatibility with older versions.

####Impact on Size of the `LLVM_BB_ADDR_MAP` Section
Emitting the Propeller ID results in a 23% increase in the size of the `LLVM_BB_ADDR_MAP` section for the clang binary.

Reviewed By: tmsriram

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

19 months ago[RISCV] Use zeroext instead of signext in mask reduction tests. NFC
Craig Topper [Tue, 17 Jan 2023 23:15:41 +0000 (15:15 -0800)]
[RISCV] Use zeroext instead of signext in mask reduction tests. NFC

This is more consistent with ABI and how bools on RISC-V are
represented.

Reviewed By: reames

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

19 months ago[libc++] Add ALLOW_RETRIES to a few flaky tests
Nikolas Klauser [Tue, 17 Jan 2023 02:54:32 +0000 (03:54 +0100)]
[libc++] Add ALLOW_RETRIES to a few flaky tests

Fixes #59464

Reviewed By: ldionne, Mordante, #libc

Spies: libcxx-commits

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

19 months ago[SystemZ][z/OS] Fix cityhash lit for EBCDIC
Zibi Sarbinowski [Tue, 17 Jan 2023 22:34:43 +0000 (16:34 -0600)]
[SystemZ][z/OS] Fix cityhash lit for EBCDIC

This will fix __murmur2_or_cityhash.pass.cpp in EBCDIC mode. The reason it fails is because of string literals are being used as input to CityHash algorithm so we need to adjust the EBCDIC expected results.

Reviewed By: #libc, philnik

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

19 months ago[CompilerRT] Remove sanitizer support for i386 iossim
usama hameed [Wed, 11 Jan 2023 01:54:46 +0000 (17:54 -0800)]
[CompilerRT] Remove sanitizer support for i386 iossim

Summary:
This patch removes building sanitizers for i386 iossim. This is to reduce the toolchain size.
Reviewers:

Subscribers:

19 months ago[CompilerRT] Remove ubsan static runtime on Apple
usama hameed [Wed, 11 Jan 2023 23:16:30 +0000 (15:16 -0800)]
[CompilerRT] Remove ubsan static runtime on Apple

This patch removes the static ubsan runtime on Apple devices. The motivation
is to reduce the toolchain size.

rdar://102061519

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

19 months ago[ORC-RT] Reapply ab59185fbfb (Add IntervalMap/Set), with missing files included.
Lang Hames [Tue, 17 Jan 2023 21:45:38 +0000 (13:45 -0800)]
[ORC-RT] Reapply ab59185fbfb (Add IntervalMap/Set), with missing files included.

The original commit was reverted in c151e8428a due missing files (thanks Kazu!).

19 months agoRevert "[ORC-RT] Add IntervalMap and IntervalSet collections."
Kazu Hirata [Tue, 17 Jan 2023 21:36:03 +0000 (13:36 -0800)]
Revert "[ORC-RT] Add IntervalMap and IntervalSet collections."

This reverts commit ab59185fbfb15c9ce5a64e3aacd3a8c7f6a97621.

It looks like this commit is missing interval_set_test.cpp.

19 months ago[Analysis] Fix a warning
Kazu Hirata [Tue, 17 Jan 2023 21:36:02 +0000 (13:36 -0800)]
[Analysis] Fix a warning

This patch fixes:

  llvm/include/llvm/Analysis/Utils/TrainingLogger.h:94:14: error:
  private field 'IncludeReward' is not used
  [-Werror,-Wunused-private-field]

19 months ago[RISCV][TableGen] Correct formatting in RISCVGenCompressInstEmitter.inc. NFC
Craig Topper [Tue, 17 Jan 2023 21:35:08 +0000 (13:35 -0800)]
[RISCV][TableGen] Correct formatting in RISCVGenCompressInstEmitter.inc. NFC

19 months ago[clang][sema][Matrix] Move code from try-cast to `TypeLocVisitor`. NFC intended.
Volodymyr Sapsai [Tue, 10 Jan 2023 20:24:07 +0000 (12:24 -0800)]
[clang][sema][Matrix] Move code from try-cast to `TypeLocVisitor`. NFC intended.

`MatrixTypeLoc` is not "sugar" `TypeLoc` and doesn't require to use the
underlying `TypeLoc` instead.

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

19 months ago[ORC-RT] Add IntervalMap and IntervalSet collections.
Lang Hames [Tue, 17 Jan 2023 01:22:28 +0000 (17:22 -0800)]
[ORC-RT] Add IntervalMap and IntervalSet collections.

IntervalMap is an optionally-coalescing map -- it uses half-open ranges as keys,
allows lookups based on elements of the ranges (returning an iterator to the
containing range) and optionally coalesces adjacent ranges that have the same
value.

IntervalSet is an optionally-coalescing set based on IntervalMap.

These collections will be used to store and lookup metadata section ranges,
e.g. unwind-info ranges.

19 months ago[mlir] Fix a deprecation warning
Kazu Hirata [Tue, 17 Jan 2023 21:12:40 +0000 (13:12 -0800)]
[mlir] Fix a deprecation warning

This patch fixes:

  mlir/include/mlir/Dialect/Affine/LoopUtils.h:332:25: error:
  'makeMutableArrayRef<mlir::scf::ForOp>' is deprecated: Use deduction
  guide instead [-Werror,-Wdeprecated-declarations]

19 months ago[mlgo] Remove the protobuf dependency
Mircea Trofin [Fri, 13 Jan 2023 20:22:20 +0000 (12:22 -0800)]
[mlgo] Remove the protobuf dependency

The dependency was due to the log format. This change switches to the
previously-introduced (D139370) "dependency-free" logger instead of the
protobuf-based one.

A subsequent change will clean out the unnecessary abstraction left
behind.

This change drops the logger unittest, we have sufficient test coverage
via lit tests, and a unit test would require adding, unnecesarily, a log
reader (the reader is expected to be python, for the ML side, and there
is a reader for that under Analysis/models, used for tests).

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

19 months ago[VPlan] Replace VPExpandSCEVRecipe::classof with VP_CLASSOF_IMPL. (NFC)
Florian Hahn [Tue, 17 Jan 2023 21:11:32 +0000 (21:11 +0000)]
[VPlan] Replace VPExpandSCEVRecipe::classof with VP_CLASSOF_IMPL. (NFC)

19 months ago[libc++] Mark std::pmr virtual functions as _LIBCPP_HIDE_FROM_ABI_VIRTUAL
Nikolas Klauser [Mon, 16 Jan 2023 18:26:53 +0000 (19:26 +0100)]
[libc++] Mark std::pmr virtual functions as _LIBCPP_HIDE_FROM_ABI_VIRTUAL

Reviewed By: ldionne, Mordante, #libc

Spies: libcxx-commits

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

19 months agonullptr returned from ActOnTag() is not a valid result
Aaron Ballman [Tue, 17 Jan 2023 21:00:46 +0000 (16:00 -0500)]
nullptr returned from ActOnTag() is not a valid result

DeclResult tracks two states: valid/invalid and usable/unusable.
Passing a null pointer to the constructor creates a valid but unusable
result and we wanted an invalid result instead. This changes some
functions to return a DeclResult rather than a Decl * to make it harder
to get this incorrect in callers.

Discovered when working on https://reviews.llvm.org/D141280.

Co-authored-by: Haojian Wu <hokein@google.com>
Co-authored-by: Aaron Ballman <aaron@aaronballman.com>
Differential Revision: https://reviews.llvm.org/D141580

19 months ago[mlir] Fix a warning
Kazu Hirata [Tue, 17 Jan 2023 21:01:22 +0000 (13:01 -0800)]
[mlir] Fix a warning

This patch fixes:

  mlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp:820:13:
  error: unused function 'hasAtMostOneResultFunctionOfDim'
  [-Werror,-Wunused-function]

19 months ago[RISCV] Add missing check prefixes to vreductions-mask.ll. NFC
Craig Topper [Tue, 17 Jan 2023 20:46:11 +0000 (12:46 -0800)]
[RISCV] Add missing check prefixes to vreductions-mask.ll. NFC

There's a conflict between the riscv32 and riscv64 output for some
tests which caused the script to drop the check lines.

Add specific check prefixes for these cases.

19 months ago[mlir][sparse] avoid using mutable descriptor when unnecessary (NFC)
Peiming Liu [Tue, 17 Jan 2023 19:25:40 +0000 (19:25 +0000)]
[mlir][sparse] avoid using mutable descriptor when unnecessary (NFC)

Use SparseTensorDescriptor whenever not calling setters, to avoid needing to create a temporal buffer for simple query purposes.

Reviewed By: bixia, wrengr

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

19 months ago[VPlan] Replace VPScalarIVStepsRecipe::classof with VP_CLASSOF_IMPL(NFC)
Florian Hahn [Tue, 17 Jan 2023 20:53:13 +0000 (20:53 +0000)]
[VPlan] Replace VPScalarIVStepsRecipe::classof with VP_CLASSOF_IMPL(NFC)

19 months ago[Clang] Reject in-class defaulting of previously declared comparison operators
Roy Jacobson [Sun, 15 Jan 2023 22:39:15 +0000 (00:39 +0200)]
[Clang] Reject in-class defaulting of previously declared comparison operators

Comparison operators are not allowed to be defaulted if they were previously declared outside the class.
Pretty low-impact, but it's nice to reject this without a linking error.
Fixes https://github.com/llvm/llvm-project/issues/51227.

Reviewed By: #clang-language-wg, ChuanqiXu

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

19 months ago[Libomptarget][NFC] Rename device environment variable
Joseph Huber [Tue, 17 Jan 2023 20:09:12 +0000 (14:09 -0600)]
[Libomptarget][NFC] Rename device environment variable

This variable is used by the runtime. Before kernel launch we set it to
indicate several configuration options from the host. This patch renames
it to be more in-line with the rest of the named exported from the
runtime. This is better because this is the only symbol visible to the
host from the runtime, so it should have a reserved name.

Reviewed By: tianshilei1992

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

19 months ago[Clang] Configure definitions for amdgpu/nvptx arch query tools
Joseph Huber [Tue, 17 Jan 2023 20:25:29 +0000 (14:25 -0600)]
[Clang] Configure definitions for amdgpu/nvptx arch query tools

Summary:
These tools are built unconditionally now. However, there seemed to be
problems where the headers would be found during cross compilation, but
no libraries present. To combat this we should elect to make the CMake
indicate whether or not we should use the dynamic library method or link
it directly rather than using `__has_include`.

19 months ago[llvm][ADT] Mark `makeMutableArrayRef` as deprecated
Joe Loser [Mon, 16 Jan 2023 21:52:16 +0000 (14:52 -0700)]
[llvm][ADT] Mark `makeMutableArrayRef` as deprecated

Now that all of the uses of `makeMutableArrayRef` are replaced in-tree with use
of deduction guides (see
https://github.com/llvm/llvm-project/commit/a288d7f937708cf67d960962bfa22ffae37ddbf4),
mark `makeMutableArrayRef` as deprecated.

Also remove the old tests for `makeMutableArrayRef` in favor of the ones
introduced with the deduction guides in
https://github.com/llvm/llvm-project/commit/38791259c1165cedfa313e06dc20e443f1e20634.

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

19 months ago[InstCombine] factor difference-of-squares to reduce multiplication
Sanjay Patel [Tue, 17 Jan 2023 19:37:18 +0000 (14:37 -0500)]
[InstCombine] factor difference-of-squares to reduce multiplication

(X * X) - (Y * Y) --> (X + Y) * (X - Y)
https://alive2.llvm.org/ce/z/BAuRCf

The no-wrap propagation could be relaxed in some cases,
but there does not seem to be an obvious rule for that.

19 months ago[InstCombine] add tests for difference-of-squares; NFC
Sanjay Patel [Tue, 17 Jan 2023 18:32:50 +0000 (13:32 -0500)]
[InstCombine] add tests for difference-of-squares; NFC

19 months ago[RISCV] Remove MCRegisterInfo dependency from compressInst/uncompresInst/isCompressib...
Craig Topper [Tue, 17 Jan 2023 19:50:54 +0000 (11:50 -0800)]
[RISCV] Remove MCRegisterInfo dependency from compressInst/uncompresInst/isCompressibleInst.

This was being used to lookup the register class for a register number,
but those live in a tablegened array. We can index that array directly
just like RISCVAsmParser does.

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

19 months ago[MC] Use MCRegister instead of unsigned in MCInstPrinter (NFC)
Sergei Barannikov [Sun, 15 Jan 2023 10:02:26 +0000 (13:02 +0300)]
[MC] Use MCRegister instead of unsigned in MCInstPrinter (NFC)

Reviewed By: craig.topper

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

19 months ago[RISCV] Use Zvl*b as a lower bound for VScaleRange.
Craig Topper [Tue, 17 Jan 2023 19:32:08 +0000 (11:32 -0800)]
[RISCV] Use Zvl*b as a lower bound for VScaleRange.

The backend has a fatal error in RISCVSubtarget::getMinRVVVectorSizeInBits
if RVVVectorBitsMin is less than the Zvl length from -march. Now
RVVVectorBitsMin is connected to VScaleRange in the backend, we
can trip this fatal error.

This patch adds the Zvl*b length as a lower bound to protect this.
The test is updated to test vscale-min with Zvl64b instead of V.

I'd like to do a proper diagnostic for this, but I don't think we
can do that from this function. Since -mvscale-min is an internal cc1
option, I'm not sure it's a big deal.

I'm planning to add a driver option -msve-vector-bits. I will
probably implement a diagnostic for that.

Reviewed By: kito-cheng

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

19 months agoDiagnose extensions in 'offsetof'
Aaron Ballman [Tue, 17 Jan 2023 19:26:29 +0000 (14:26 -0500)]
Diagnose extensions in 'offsetof'

https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm made very
clear that it is an UB having type definitions with in offsetof.
Clang supports defining a type as the first argument as a conforming
extension due to how many projects use the construct in C99 and earlier
to calculate the alignment of a type. GCC also supports defining a type
as the first argument.

This adds extension warnings and documentation for the functionality
Clang explicitly supports.

Fixes #57065

Co-authored-by: Yingchi Long <i@lyc.dev>
Co-authored-by: Aaron Ballman <aaron@aaronballman.com>
19 months ago[PS5] Handle visibility options same as PS4
Paul Robinson [Tue, 17 Jan 2023 19:26:51 +0000 (11:26 -0800)]
[PS5] Handle visibility options same as PS4

This update was missed in the initial rounds of upstreaming PS5.

19 months ago[PS4] NFC: rewrite a test to use lit's DEFINE feature
Paul Robinson [Tue, 17 Jan 2023 18:47:07 +0000 (10:47 -0800)]
[PS4] NFC: rewrite a test to use lit's DEFINE feature

Preparatory to running the same test for PS5.

19 months ago[MLIR] Add return type inference to scf.if builder
Frederik Gossen [Tue, 17 Jan 2023 19:07:33 +0000 (14:07 -0500)]
[MLIR] Add return type inference to scf.if builder

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

19 months agoAdd additional tests for ctlz{_zero_undef} to test folding with xor; NFC
Noah Goldstein [Tue, 17 Jan 2023 18:41:31 +0000 (10:41 -0800)]
Add additional tests for ctlz{_zero_undef} to test folding with xor; NFC

Reviewed By: pengfei

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

19 months ago[mlir] fix dereferencing of optional sym_name attribute
Ashay Rane [Tue, 17 Jan 2023 18:55:02 +0000 (10:55 -0800)]
[mlir] fix dereferencing of optional sym_name attribute

`sym_name` is an optional attribute of `ModuleOp`, so it is unsafe to
fetch the underlying value without checking whether it is non-empty.
Such unsafe dereferencing causes the lower-host-to-llvm-calls_fail.mlir
test to segfault.  Although this bug existed for four months, it wasn't
triggered, since previous tests executed a code path that used a default
value instead of one fetched from the module attribute.

This patch makes the code use a default value if the optional attribute
does not have a value.

Reviewed By: stella.stamenova

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

19 months ago[OpenMP] Make `-Xarch_host` and `-Xarch_device` work for OpenMP offloading
Joseph Huber [Tue, 17 Jan 2023 15:34:49 +0000 (09:34 -0600)]
[OpenMP] Make `-Xarch_host` and `-Xarch_device` work for OpenMP offloading

Clang currently supports the `-Xarch_host` and `-Xarch_device` variants
to handle passing arguments to only one part of the offloading
toolchain. This was previously only supported fully for HIP / CUDA This
patch simple updates the logic to make it work for any offloading kind.

Fixes #59799

Reviewed By: tianshilei1992

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

19 months ago[Libomptarget] Replace Nvidia arch lookup with 'nvptx-arch'
Joseph Huber [Tue, 17 Jan 2023 14:55:55 +0000 (08:55 -0600)]
[Libomptarget] Replace Nvidia arch lookup with 'nvptx-arch'

This method to look up the CUDA architecture is deprecated in newer
versions of CMake. We also have our own way to query this information
that we control now via the `nvptx-arch` program, which should always be
present in LLVM builds with clang going forward. This is currently only
used for testing so I think we should be okay with the dependency.

Reviewed By: tianshilei1992

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

19 months ago[lldb] Only allow SymbolFiles to construct Types
Augusto Noronha [Fri, 13 Jan 2023 21:30:41 +0000 (13:30 -0800)]
[lldb] Only allow SymbolFiles to construct Types

SymbolFiles should own Types by keeping them in their TypeList. This
patch privates the Type constructor to guarantee that every created Type
is kept in the SymbolFile's type list.

19 months agoReland: [GWP-ASan] Add recoverable mode.
Mitch Phillips [Fri, 13 Jan 2023 00:01:06 +0000 (16:01 -0800)]
Reland: [GWP-ASan] Add recoverable mode.

The GWP-ASan recoverable mode allows a process to continue to function
after a GWP-ASan error is detected. The error will continue to be
dumped, but GWP-ASan now has APIs that a signal handler (like the
example optional crash handler) can call in order to allow the
continuation of a process.

When an error occurs with an allocation, the slot used for that
allocation will be permanently disabled. This means that free() of that
pointer is a no-op, and use-after-frees will succeed (writing and
reading the data present in the page).

For heap-buffer-overflow/underflow, the guard page is marked as accessible
and buffer-overflows will succeed (writing and reading the data present
in the now-accessible guard page). This does impact adjacent
allocations, buffer-underflow and buffer-overflows from adjacent
allocations will no longer touch an inaccessible guard page. This could
be improved in future by having two guard pages between each adjacent
allocation, but that's out of scope of this patch.

Each allocation only ever has a single error report generated. It's
whatever came first between invalid-free, double-free, use-after-free or
heap-buffer-overflow, but only one.

Reviewed By: eugenis, fmayer

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

19 months ago[flang] Generate TBAA information.
Slava Zakharin [Tue, 17 Jan 2023 17:08:43 +0000 (09:08 -0800)]
[flang] Generate TBAA information.

This is initial version of TBAA information generation for Flang
generated IR. The desired behavior is that TBAA type descriptors
are generated for FIR types during FIR to LLVM types conversion,
and then TBAA access tags are attached to memory accessing operations
when they are converted to LLVM IR dialect.

In the initial version the type conversion is not producing
TBAA type descriptors, and all memory accesses are just partitioned
into two sets of box and non-box accesses, which can never alias.

The TBAA generation is enabled by default at >O0 optimization levels.
TBAA generation may also be enabled via `apply-tbaa` option of
`fir-to-llvm-ir` conversion pass. `-mllvm -disable-tbaa` engineering
option allows disabling TBAA generation to override Flang's default
(e.g. when -O1 is used).

SPEC CPU2006/437.leslie3d speeds up by more than 2x on Icelake.

Reviewed By: jeanPerier, clementval

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

19 months ago[InstCombine] Handle PHI nodes in PtrReplacer
Anshil Gandhi [Tue, 17 Jan 2023 17:36:05 +0000 (10:36 -0700)]
[InstCombine] Handle PHI nodes in PtrReplacer

This patch adds on to the functionality implemented
in rG42ab5dc5a5dd6c79476104bdc921afa2a18559cf,
where PHI nodes are supported in the use-def traversal
algorithm to determine if an alloca ever overwritten
in addition to a memmove/memcpy. This patch implements
the support needed by the PointerReplacer to collect
all (indirect) users of the alloca in cases where a PHI
is involved. Finally, a new PHI is defined in the replace
method which takes in replaced incoming values and
updates the WorkMap accordingly.

Reviewed By: nikic

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

19 months ago[MLIR][SCF] Fix comment in `TestTilingInterface.cpp` (NFC)
Lorenzo Chelini [Tue, 17 Jan 2023 17:47:36 +0000 (18:47 +0100)]
[MLIR][SCF] Fix comment in `TestTilingInterface.cpp` (NFC)

The method is called `tileConsumerAndFuseProducerGreedilyUsingSCFForOp`
and not `tileAndFuseGreedilyUsingSCFForOp`.

19 months agotsan: fix broken aarch64_39/42 mappings and expand them
Thurston Dang [Thu, 12 Jan 2023 23:18:17 +0000 (23:18 +0000)]
tsan: fix broken aarch64_39/42 mappings and expand them

The aarch64 39- and 42-bit mappings were broken: mappings to meta and shadow were not fully invertible. This CL introduces a working set of mappings, and also increases the size of some app regions:
* aarch64, 39-bit (2^39 == 512GB):
 - Low: (Old) 4GB -> (New) 20GB
 - Mid: 4GB -> 20GB
 - Heap: 4GB -> 12GB
 - High: 8GB -> 12GB
* aarch64, 42-bit (2^42 == 4TB):
 - Low: 64GB -> 128GB
 - Mid: 4GB -> 88GB
 - Heap: 64GB -> 192GB
 - High: 64GB

Additionally, this CL improves the code comments for all the linux aarch64 mappings.

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

19 months ago[mlir][vector] Fix extract op canonicalization for 0d vector
Thomas Raoux [Tue, 17 Jan 2023 17:25:51 +0000 (17:25 +0000)]
[mlir][vector] Fix extract op canonicalization for 0d vector

Fix ExtractOpFromBroadcast when the broadcast source is a 0d vector.

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

19 months ago[mlir][gpu] Improve foreach_thread distribution
Thomas Raoux [Fri, 13 Jan 2023 19:53:56 +0000 (19:53 +0000)]
[mlir][gpu] Improve foreach_thread distribution

Replace Ids with 0 when block dim is 1 when distributing foreach_thread.

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

19 months ago[mlir][vector] Add extra lowering for more transfer_write maps
Thomas Raoux [Tue, 17 Jan 2023 17:05:11 +0000 (17:05 +0000)]
[mlir][vector] Add extra lowering for more transfer_write maps

Add pattern to lower transfer_write with permutation map that are not
permutation of minor identity map.

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

19 months ago[mlir][EmitC] Remove Pure trait from `emitc.include`
Christopher Bate [Thu, 8 Dec 2022 00:28:27 +0000 (17:28 -0700)]
[mlir][EmitC] Remove Pure trait from `emitc.include`

The op `emitc.include` does not have results and thus will be elided
during canonicalization, which is not correct behavior. This change
removes the 'Pure' trait and adds a canonicalization test.

Reviewed By: jpienaar, marbre

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

19 months ago[mlir][vector] Fix lowering of permutation maps for transfer_write op
Thomas Raoux [Sun, 15 Jan 2023 07:25:00 +0000 (07:25 +0000)]
[mlir][vector] Fix lowering of permutation maps for transfer_write op

The lowering of transfer write permutation maps didn't match the op definition:
https://github.com/llvm/llvm-project/blob/93ccccb00d9717b58ba93f0942a243ba6dac4ef6/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td#L1476

Fix the lowering and add a case to the integration test in
order to enforce the correct semantic.

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

19 months ago[scudo] Fix -Wsign-compare warning
Alex Brachet [Tue, 17 Jan 2023 17:02:50 +0000 (17:02 +0000)]
[scudo] Fix -Wsign-compare warning

19 months agoFix crash in LLVM Dialect inliner interface: add support for llvm.return
Mehdi Amini [Tue, 17 Jan 2023 08:28:08 +0000 (08:28 +0000)]
Fix crash in LLVM Dialect inliner interface: add support for llvm.return

The LLVM inliner was missing the `handleTerminator` method in the
Dialect interface implementation.

Fixes #60093

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

19 months agoFix crash in scf.parallel verifier
Mehdi Amini [Tue, 17 Jan 2023 16:20:20 +0000 (16:20 +0000)]
Fix crash in scf.parallel verifier

Fixes #59989

Reviewed By: ftynse

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

19 months ago[clangd] Disable modernize-macro-to-enum tidy check
Kadir Cetinkaya [Tue, 17 Jan 2023 16:11:02 +0000 (17:11 +0100)]
[clangd] Disable modernize-macro-to-enum tidy check

Check relies on seeing PP-directives from preamble, hence it's unusable.
See https://github.com/clangd/clangd/issues/1464.