platform/upstream/llvm.git
2 years ago[mlir] Update BUILD rule for AffineUtils
Chia-hung Duan [Fri, 10 Dec 2021 23:50:27 +0000 (23:50 +0000)]
[mlir] Update BUILD rule for AffineUtils

bc657b2eef82f604e5bfb8da421cbdfc80156739 adds the dependency to
MemRefDialect.

Reviewed By: GMNGeoffrey, mehdi_amini

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

2 years ago[llvm-readobj] Add JSONScopedPrinter to llvm-readelf
Jayson Yan [Fri, 10 Dec 2021 23:27:06 +0000 (23:27 +0000)]
[llvm-readobj] Add JSONScopedPrinter to llvm-readelf

Adds JSONScopedPrinter to llvm-readelf. It includes an empty
JSONELFDumper class which will be used to override any LLVMELFDumper
methods which utilize startLine() which JSONScopedPrinter cannot
provide.

This introduces a change where calls to llvm-readelf with non-ELF object
files that specify --elf-output-style=GNU will now print file summary
information where it previously didn't.

Fixes previous Windows test failure which occured due to JSON escaping
of '\' by not relying on LIT substitution.

Reviewed By: jhenderson

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

2 years agoRevert "[mlir][tensor] Fix insert_slice + tensor cast overflow"
Nicolas Vasilache [Fri, 10 Dec 2021 22:47:49 +0000 (22:47 +0000)]
Revert "[mlir][tensor] Fix insert_slice + tensor cast overflow"

This reverts commit 5601821daec72b221631cfd6175760557281d602.

The prefix + canonical complete behavior is actually obsolete and should not be reintroduced.
Reverting.

2 years agoRevert "[asan] Add support for disable_sanitizer_instrumentation attribute"
Andrew Browne [Fri, 10 Dec 2021 22:28:36 +0000 (14:28 -0800)]
Revert "[asan] Add support for disable_sanitizer_instrumentation attribute"

This reverts commit 2b554920f11c8b763cd9ed9003f4e19b919b8e1f.

This change causes tsan test timeout on x86_64-linux-autoconf.

The timeout can be reproduced by:
  git clone https://github.com/llvm/llvm-zorg.git
  BUILDBOT_CLOBBER= BUILDBOT_REVISION=eef8f3f85679c5b1ae725bade1c23ab7bb6b924f llvm-zorg/zorg/buildbot/builders/sanitizers/buildbot_standard.sh

2 years agoMove x86-specific test into the DebugInfo/X86 directory
David Blaikie [Fri, 10 Dec 2021 22:26:04 +0000 (14:26 -0800)]
Move x86-specific test into the DebugInfo/X86 directory

2 years ago[sanitizers] include build ids in stacks on linux.
Florian Mayer [Fri, 10 Dec 2021 22:21:09 +0000 (14:21 -0800)]
[sanitizers] include build ids in stacks on linux.

Reviewed By: eugenis

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

2 years ago[Docs][ORCv2] GetForCurrentProcess now returns an Expected<std::unique_ptr>. NFC
Jon Roelofs [Tue, 5 Oct 2021 15:00:03 +0000 (08:00 -0700)]
[Docs][ORCv2] GetForCurrentProcess now returns an Expected<std::unique_ptr>. NFC

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

2 years ago[MLIR] FlatAffineConstraints::isIntegerEmpty: fix bug in computation of duals
Arjun P [Fri, 10 Dec 2021 22:15:59 +0000 (03:45 +0530)]
[MLIR] FlatAffineConstraints::isIntegerEmpty: fix bug in computation of duals

The method that was previously used for computing dual variables was incorrect.
This was used in the integer emptiness check algorithm, where this bug could lead to much longer running times. (Due to the way it is used, this never results in an incorrect emptiness check result.)

This patch fixes the dual computation and adds some additional asserts that catch this bug, along with regression test cases that trigger the asserts when the incorrect dual computation is used.

Reviewed By: Groverkss

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

2 years ago[MLIR] IntegerPolyhedron: introduce getNumIdKind to replace calls to assertAtMostNumI...
Arjun P [Fri, 10 Dec 2021 21:48:04 +0000 (03:18 +0530)]
[MLIR] IntegerPolyhedron: introduce getNumIdKind to replace calls to assertAtMostNumIdKind

Introduce a function `getNumIdKind` that returns the number of ids of the
specified kind. Remove the function `assertAtMostNumIdKind` and instead just
directly assert the inequality with a call to `getNumIdKind`.

2 years agoRevert "X86InstrInfo: Support immediates that are +1/-1 different in optimizeCompareI...
Bogdan Graur [Fri, 10 Dec 2021 15:44:36 +0000 (16:44 +0100)]
Revert "X86InstrInfo: Support immediates that are +1/-1 different in optimizeCompareInstr"

This reverts commit 847a6807332b13f43704327c2d30103ec0347c77.

The reverted revision was causing miscompiles that manifest on AMD
machines.

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

2 years ago[mlir][vector] NFC move vector unroll/distribute patterns to their own file
Thomas Raoux [Fri, 10 Dec 2021 20:18:34 +0000 (12:18 -0800)]
[mlir][vector] NFC move vector unroll/distribute patterns to their own file

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

2 years ago[MLIR][NFC] Move out affine scalar replacement utility to affine utils
Uday Bondhugula [Fri, 10 Dec 2021 08:35:52 +0000 (14:05 +0530)]
[MLIR][NFC] Move out affine scalar replacement utility to affine utils

NFC. Move out and expose affine scalar replacement utility through
affine utils. Renaming misleading forwardStoreToLoad ->
affineScalarReplace. Update a stale doc comment.

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

2 years ago[ASan] Added NO_EXEC_STACK_DIRECTIVE to assembly callback file.
Kirill Stoimenov [Fri, 10 Dec 2021 21:44:14 +0000 (21:44 +0000)]
[ASan] Added NO_EXEC_STACK_DIRECTIVE to assembly callback file.

This is present in our assembly files. It should fix decorate_proc_maps.cpp failures because of shadow memory being allocated as executable.

Reviewed By: vitalybuka

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

2 years ago[mlir][tensor] Fix insert_slice + tensor cast overflow
Nicolas Vasilache [Fri, 10 Dec 2021 21:27:20 +0000 (21:27 +0000)]
[mlir][tensor] Fix insert_slice + tensor cast overflow

InsertSliceOp may have subprefix semantics where missing trailing dimensions
are automatically inferred directly from the operand shape.
This revision fixes an overflow that occurs in such cases when the impl is based on the op rank.

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

2 years ago[gn build] (manually) port 492de35df44
Nico Weber [Fri, 10 Dec 2021 21:33:55 +0000 (16:33 -0500)]
[gn build] (manually) port 492de35df44

2 years agoRevert "[llvm-readobj] Add JSONScopedPrinter to llvm-readelf"
Jayson Yan [Fri, 10 Dec 2021 20:58:07 +0000 (20:58 +0000)]
Revert "[llvm-readobj] Add JSONScopedPrinter to llvm-readelf"

This reverts commit 824eef231a853d7054d55010c16654f6f20e0394.
file-summary-json.test and pretty-print.test fails on Windows.

2 years agoRevert "Revert "Use `GNUInstallDirs` to support custom installation dirs. -- LLVM""
John Ericson [Thu, 4 Nov 2021 02:09:30 +0000 (02:09 +0000)]
Revert "Revert "Use `GNUInstallDirs` to support custom installation dirs. -- LLVM""

This reverts commit 797b50d4be873b4662983413a06806fca544c276.

See the original D99484. @mib who noticed the original problem could not longer
reproduce it, after I tried and also failed. We are threfore hoping it went
away on its own!

Reviewed By: mib

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

2 years agoRevert "[OpenMP] Avoid costly shadow map traversals whenever possible"
Joseph Huber [Fri, 10 Dec 2021 20:56:55 +0000 (15:56 -0500)]
Revert "[OpenMP] Avoid costly shadow map traversals whenever possible"

This reverts commit 7c8f4e7b85ed98497f37571d72609f39a8eed447.
Fails a few OpenMP tests, causes a few updates to segfault.

2 years ago[OpenMP][libomp] Add core attributes to KMP_HW_SUBSET
Jonathan Peyton [Tue, 30 Nov 2021 22:43:47 +0000 (16:43 -0600)]
[OpenMP][libomp] Add core attributes to KMP_HW_SUBSET

Allow filtering of resources based on core attributes. There are two new
attributes added:
1) Core Type (intel_atom, intel_core)
2) Core Efficiency (integer) where the higher the efficiency, the more
   performant the core
On hybrid architectures , e.g., Alder Lake, users can specify
KMP_HW_SUBSET=4c:intel_atom,4c:intel_core to select the first four Atom
and first four Big cores. The can also use the efficiency syntax. e.g.,
KMP_HW_SUBSET=2c:eff0,2c:eff1

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

2 years agoFix shared build of unittests.
Michael Liao [Fri, 10 Dec 2021 19:21:30 +0000 (14:21 -0500)]
Fix shared build of unittests.

2 years ago[ThinLTO][MC] Use conditional assignments for promotion aliases
Sami Tolvanen [Fri, 10 Dec 2021 19:11:28 +0000 (11:11 -0800)]
[ThinLTO][MC] Use conditional assignments for promotion aliases

Inline assembly refererences to static functions with ThinLTO+CFI were
fixed in D104058 by creating aliases for promoted functions. Creating
the aliases unconditionally resulted in an unexpected size increase in
a Chrome helper binary:

https://bugs.chromium.org/p/chromium/issues/detail?id=1261715

This is caused by the compiler being unable to drop unused code now
referenced by the alias in module-level inline assembly. This change
adds a .set_conditional assembly extension, which emits an assignment
only if the target symbol is also emitted, avoiding phantom references
to functions that could have otherwise been dropped.

This is an alternative to the solution proposed in D112761.

Reviewed By: pcc, nickdesaulniers, MaskRay

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

2 years agoVerifier: accept enums as scopes
Augie Fackler [Fri, 10 Dec 2021 20:17:18 +0000 (12:17 -0800)]
Verifier: accept enums as scopes

Rust allows enums to be scopes, as shown by the previous change. Sadly,
D111770 disallowed enums-as-scopes in the LLVM Verifier, which means
that LLVM HEAD stopped working for Rust compiles.  As a result, we back
out the verifier part of D111770 with a modification to the testcase so
we don't break this in the future.

The testcase is now actual IR from rustc at commit 8f8092cc3, which is
the nightly as of 2021-09-28. I would expect rustc 1.57 to produce
similar or identical IR if someone wants to reproduce this IR in the
future with minimal changes. A recipe for reproducing the IR using rustc
is included in the test file.

Reviewed By: dblaikie

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

2 years ago[gn build] Port 04f2712ef4e4
LLVM GN Syncbot [Fri, 10 Dec 2021 19:52:50 +0000 (19:52 +0000)]
[gn build] Port 04f2712ef4e4

2 years agoRevert "[sanitizers] include build ids in stacks on linux."
Florian Mayer [Fri, 10 Dec 2021 19:52:26 +0000 (11:52 -0800)]
Revert "[sanitizers] include build ids in stacks on linux."

This reverts commit 2a31b240df1ce1724960fd7cf98f673064b44206.

2 years ago[mlir:PDL] Allow non-bound pdl.attribute/pdl.type operations that create constants
River Riddle [Fri, 10 Dec 2021 19:36:21 +0000 (19:36 +0000)]
[mlir:PDL] Allow non-bound pdl.attribute/pdl.type operations that create constants

This allows for passing in these attributes/types to constraints/rewrites as arguments.

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

2 years ago[mlir:PDL] Fix bugs in PDLPatternModule merging
River Riddle [Fri, 10 Dec 2021 19:36:07 +0000 (19:36 +0000)]
[mlir:PDL] Fix bugs in PDLPatternModule merging

* Constraints/Rewrites registered before a pattern was added were dropped
* Constraints/Rewrites may be registered multiple times (if different pattern sets depend on them)
* ModuleOp no longer has a terminator, so we shouldn't be removing the terminator from it

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

2 years ago[mlir:PDL] Adjust the assembly format for AttributeOp to avoid conflicts with Diction...
River Riddle [Fri, 10 Dec 2021 19:35:55 +0000 (19:35 +0000)]
[mlir:PDL] Adjust the assembly format for AttributeOp to avoid conflicts with DictionaryAttr

Switch the attribute creation operations to use attr-dict-with-
keyword to avoid conflicts (in the case of pdl.attribute) and
confusion(in the case of pdl_interp.create_attribute) with
having a DictionaryAttr as a value and specifying the
attributes of the operation itself (as a dictionary).

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

2 years ago[mlir:PDL] Fix assembly format for pdl.apply_native_rewrite
River Riddle [Fri, 10 Dec 2021 19:35:43 +0000 (19:35 +0000)]
[mlir:PDL] Fix assembly format for pdl.apply_native_rewrite

The results of a rewrite are optional, but we currently require
them to be present in the assembly format. This commit
makes the results component in the format optional.

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

2 years ago[mlir][ods] Fix OpFormatGen sometimes not calling inferReturnTypes
Mogball [Fri, 10 Dec 2021 15:04:46 +0000 (15:04 +0000)]
[mlir][ods] Fix OpFormatGen sometimes not calling inferReturnTypes

Reviewed By: jpienaar

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

2 years ago[mlir][ir] OpRewritePattern should accept generatedNames
Mogball [Fri, 10 Dec 2021 13:30:11 +0000 (13:30 +0000)]
[mlir][ir] OpRewritePattern should accept generatedNames

Reviewed By: rriddle

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

2 years ago[mlir][ir] Custom ops' parse/print fall back to dialect hooks
Mogball [Fri, 10 Dec 2021 00:47:48 +0000 (00:47 +0000)]
[mlir][ir] Custom ops' parse/print fall back to dialect hooks

Custom ops that have no parser or printer should fall back to the dialect's parser and/or printer hooks. This avoids the need to define parsers and printers that simply dispatch to the dialect hook.

Reviewed By: mehdi_amini, rriddle

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

2 years ago[OpenMP] Avoid costly shadow map traversals whenever possible
Joseph Huber [Fri, 10 Dec 2021 17:49:59 +0000 (12:49 -0500)]
[OpenMP] Avoid costly shadow map traversals whenever possible

In the OpenMC app we saw `omp target update` spending an awful lot of
time in the shadow map traversal without ever doing any update there.
There are two cases that allow us to avoid the traversal completely.
The simplest thing is that small updates cannot (reasonably) contain
an attached pointer part. The other case requires to track in the
mapping table if an entry might contain an attached pointer as part.
Given that we have a single location shadow map entries are created,
the latter is actually fairly easy as well.

Reviewed By: grokos

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

2 years ago[sanitizers] include build ids in stacks on linux.
Florian Mayer [Thu, 18 Nov 2021 03:50:33 +0000 (19:50 -0800)]
[sanitizers] include build ids in stacks on linux.

Reviewed By: eugenis

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

2 years agoutils: Remove some no-op raw_string_ostream flush calls, NFC
Duncan P. N. Exon Smith [Fri, 10 Dec 2021 02:57:38 +0000 (18:57 -0800)]
utils: Remove some no-op raw_string_ostream flush calls, NFC

Since 65b13610a5226b84889b923bae884ba395ad084d, raw_string_ostream has
been unbuffered by default. Based on an audit of llvm/utils/, this
commit removes every call to `raw_string_ostream::flush()` and any call
to `raw_string_ostream::str()` whose result is ignored or that doesn't
help with clarity.

I left behind a few calls to `str()`. In these cases, the underlying
std::string was declared pretty far away and never used again, whereas
stream recently had its last write. The code is easier to read as-is;
the no-op call to `flush()` inside `str()` isn't harmful, and when
https://reviews.llvm.org/D115421 lands it'll be gone anyway.

2 years ago[NFC][MLGO] Factor ModelUnderTrainingRunner for reuse
Mircea Trofin [Thu, 9 Dec 2021 20:56:16 +0000 (12:56 -0800)]
[NFC][MLGO] Factor ModelUnderTrainingRunner for reuse

This is so we may reuse it. It was very non-inliner specific already.

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

2 years ago[OpenMP] Part 2 of At present, amdgpu plugin merges both asynchronous
Carlo Bertolli [Fri, 10 Dec 2021 19:10:53 +0000 (19:10 +0000)]
[OpenMP] Part 2 of At present, amdgpu plugin merges both asynchronous
and synchronous kernel launch implementations into a single
synchronous version.  This patch prepares the plugin for asynchronous
implementation by:

    Privatizing actual kernel launch code (valid in both cases) into
    an anonymous namespace base function (submitted at D115267)

    - Separating the control flow path of asynchronous and synchronous
      kernel launch functions** (this diff)

Reviewed By: JonChesterfield

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

2 years ago[gn build] Port d25a65030bc1
LLVM GN Syncbot [Fri, 10 Dec 2021 18:58:26 +0000 (18:58 +0000)]
[gn build] Port d25a65030bc1

2 years ago[llvm-readobj] Add JSONScopedPrinter to llvm-readelf
Jayson Yan [Fri, 10 Dec 2021 18:46:55 +0000 (18:46 +0000)]
[llvm-readobj] Add JSONScopedPrinter to llvm-readelf

 Adds JSONScopedPrinter to llvm-readelf. It includes an empty
 JSONELFDumper class which will be used to override any LLVMELFDumper
 methods which utilize startLine() which JSONScopedPrinter cannot
 provide.

 Reviewed By: jhenderson

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

2 years ago[llvm] Add JSONScopedPrinter class
Jayson Yan [Fri, 10 Dec 2021 18:44:45 +0000 (18:44 +0000)]
[llvm] Add JSONScopedPrinter class

This change adds a JSONScopedPrinter as a subclass to ScopedPrinter.

Reviewed By: jhenderson

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

2 years ago[llvm] Add ScopedPrinter unit tests
Jayson Yan [Fri, 10 Dec 2021 18:35:11 +0000 (18:35 +0000)]
[llvm] Add ScopedPrinter unit tests

Add unit tests for the ScopedPrinter class.

Reviewed By: jhenderson

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

2 years ago[NFC] Move printNumber method
Jayson Yan [Fri, 10 Dec 2021 18:29:09 +0000 (18:29 +0000)]
[NFC] Move printNumber method

Move printNumber(StringRef Label, StringRef Str, T Value) to
be with the rest of the printNumber(...) methods.

Reviewed By: jhenderson

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

2 years ago[NFC] Remove unneeded printString methods
Jayson Yan [Fri, 10 Dec 2021 18:14:53 +0000 (18:14 +0000)]
[NFC] Remove unneeded printString methods

Both std::string and char * implicitly convert to StringRef so
the overloaded method using std::string and char* are unneeded.

Reviewed By: jhenderson

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

2 years ago[llvm] Make ScopedPrinter interface virtual
Jayson Yan [Fri, 10 Dec 2021 17:45:40 +0000 (17:45 +0000)]
[llvm] Make ScopedPrinter interface virtual

Make the interface provided by ScopedPrinter virtual to support a future
JSONScopedPrinter which will supply it's own implementation.

Reviewed By: jhenderson

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

2 years ago[MCA][X86] Add missing VPMOVSX/VPMOVZX from AVX512 tests
Simon Pilgrim [Fri, 10 Dec 2021 17:30:27 +0000 (17:30 +0000)]
[MCA][X86] Add missing VPMOVSX/VPMOVZX from AVX512 tests

2 years ago[OpenMP] Add test for custom state machine if have reduction
Joel E. Denny [Fri, 10 Dec 2021 17:07:31 +0000 (12:07 -0500)]
[OpenMP] Add test for custom state machine if have reduction

D113602 broke the custom state machine when a reduction is present, as
revealed by the reproducer this patch adds to the test suite.  In that
case, openmp-opts changes the return value to undef in
`__kmpc_get_warp_size` (which the custom state machine calls as of
D113602).  Later optimizations then optimize away the custom state
machine code as if all threads are outside the thread block, so the
target region does not execute.  D114802 fixed that but didn't add a
reproducer.

This patch also adds a `__OMP_RTL_ATTRS` entry for
`__kmpc_get_warp_size` to OMPKinds.def, which D113602 missed.  This
change does not seem to have any impact on the reduction problem.

Reviewed By: JonChesterfield, jdoerfert

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

2 years ago[RISCV] Share tablegen classes for F, D, and Zfh. Other simplifications. NFC
Craig Topper [Fri, 10 Dec 2021 17:27:13 +0000 (09:27 -0800)]
[RISCV] Share tablegen classes for F, D, and Zfh. Other simplifications. NFC

By adding the register class and funct as template parameters we
can share the classes with all 3 extensions.

I've used "let SchedRW =" to avoid repeating scheduler classes on
multiple lines where we previously inherited from the Sched class.

A subsequent patch will add mayRaiseFPException and FRM dependencies.
Reducing the number of classes means less repeating for those changes.

This of course conflicts with the Zfinx patch D93298.

Reviewed By: achieveartificialintelligence

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

2 years ago[DwarfDebug] Refuse to emit DW_OP_LLVM_arg values wider than 64 bits
Adrian Prantl [Fri, 10 Dec 2021 17:15:54 +0000 (09:15 -0800)]
[DwarfDebug] Refuse to emit DW_OP_LLVM_arg values wider than 64 bits

DwarfExpression::addUnsignedConstant(const APInt &Value) only supports
wider-than-64-bit values when it is used to emit a top-level DWARF
expression representing the location of a variable. Before this change,
it was possible to call addUnsignedConstant on >64 bit values within a
subexpression when substituting DW_OP_LLVM_arg values.

This can trigger an assertion failure (e.g. PR52584, PR52333) when it
happens in a fragment (DW_OP_LLVM_fragment) expression, as
addUnsignedConstant on >64 bit values splits the constant into separate
DW_OP_pieces, which modifies DwarfExpression::OffsetInBits.

This change papers over the assertion errors by bailing on overly wide
DW_OP_LLVM_arg values. A more comprehensive fix might be to be to split
wide values into pointer-sized fragments.

[0] https://github.com/llvm/llvm-project/blob/e71fa03/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp#L799-L805

Patch by Ricky Zhou!

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

2 years ago[RISCV] Remove FCSR from RISCVRegisterInfo.
Craig Topper [Fri, 10 Dec 2021 17:20:40 +0000 (09:20 -0800)]
[RISCV] Remove FCSR from RISCVRegisterInfo.

We only used this to mark it as a reserved register. But that's not
important if we don't do anything else with it.

I think if we were ever to do anything with it, we would need to
model it as a super register of FRM and FFLAGS. But it might be
easier to reference both FRM and FFLAGS in implicit defs/uses
for anything we were to do with "fcsr".

Reviewed By: sepavloff

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

2 years ago[RISCV][Clang] Compute the default target-abi if it's empty.
Zakk Chen [Thu, 4 Nov 2021 17:13:50 +0000 (10:13 -0700)]
[RISCV][Clang] Compute the default target-abi if it's empty.

Every generated IR has a corresponding target-abi value, so
encoding a non-empty value would improve the robustness and
correctness.

Reviewed By: asb, jrtc27, arichardson

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

2 years ago[Support] Use range-based for loops (NFC)
Kazu Hirata [Fri, 10 Dec 2021 16:53:14 +0000 (08:53 -0800)]
[Support] Use range-based for loops (NFC)

2 years ago[analyzer] Implemented RangeSet::Factory::unite function to handle intersections...
Denys Petrov [Thu, 18 Nov 2021 14:06:06 +0000 (16:06 +0200)]
[analyzer] Implemented RangeSet::Factory::unite function to handle intersections and adjacency

Summary: Handle intersected and adjacent ranges uniting them into a single one.
Example:
intersection [0, 10] U [5, 20] = [0, 20]
adjacency [0, 10] U [11, 20] = [0, 20]

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

2 years ago[AArch64] Fix a warning
Kazu Hirata [Fri, 10 Dec 2021 16:33:07 +0000 (08:33 -0800)]
[AArch64] Fix a warning

This patch fixes:

  llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerCombiner.cpp:315:7:
  error: unused variable 'ValTy' [-Werror,-Wunused-variable]

2 years ago[IR] Extract method to get single GEP index from offset (NFC)
Nikita Popov [Fri, 10 Dec 2021 11:32:05 +0000 (12:32 +0100)]
[IR] Extract method to get single GEP index from offset (NFC)

This exposes the core logic of getGEPIndicesForOffset() as a
getGEPIndexForOffset() method that only returns a single offset,
instead of following the whole chain.

2 years agoRevert "[clang][dataflow] Add framework for testing analyses."
Nico Weber [Fri, 10 Dec 2021 16:05:59 +0000 (11:05 -0500)]
Revert "[clang][dataflow] Add framework for testing analyses."

Doesn't build on Windows.

This reverts commit 5a40df6381819b38df66e4b6eaa02e7140e07a0c
and commit db494bd4e815bc5546ee0986cb738da1a54bf6ab.

2 years ago[MCA][X86] Add missing ALIGND/ALIGNQ from AVX512F/AVX512VL tests
Simon Pilgrim [Fri, 10 Dec 2021 15:59:36 +0000 (15:59 +0000)]
[MCA][X86] Add missing ALIGND/ALIGNQ from AVX512F/AVX512VL tests

2 years ago[MCA][X86] Add missing PALIGNR from AVX512BW/AVX512BWVL tests
Simon Pilgrim [Fri, 10 Dec 2021 15:33:20 +0000 (15:33 +0000)]
[MCA][X86] Add missing PALIGNR from AVX512BW/AVX512BWVL tests

2 years ago[MCA][X86] Add missing PSLLDQ/PSRLDQ from AVX512BW/AVX512BWVL tests
Simon Pilgrim [Fri, 10 Dec 2021 15:27:52 +0000 (15:27 +0000)]
[MCA][X86] Add missing PSLLDQ/PSRLDQ from AVX512BW/AVX512BWVL tests

2 years ago[MCA][X86] Add missing PACKSS/PACKUS from AVX512BW/AVX512BWVL tests
Simon Pilgrim [Fri, 10 Dec 2021 15:18:30 +0000 (15:18 +0000)]
[MCA][X86] Add missing PACKSS/PACKUS from AVX512BW/AVX512BWVL tests

2 years agoVerify inferattrs doesn't infer unexpected attributes
Paul Robinson [Fri, 10 Dec 2021 15:54:17 +0000 (07:54 -0800)]
Verify inferattrs doesn't infer unexpected attributes

Add --match-full-lines or `{{$}}` to ensure that no unexpected
attributes appear at the ends of lines.  Account for the cases
where attributes were in fact appearing.

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

2 years ago[LV][ARM] Improve reduction costmodel for mismatching extension types.
David Green [Fri, 10 Dec 2021 15:40:58 +0000 (15:40 +0000)]
[LV][ARM] Improve reduction costmodel for mismatching extension types.

Given a MLA reduction from two different types (say i8 and i16), we were
previously failing to find the reduction pattern, often making us chose
the lower vector factor. This improves that by using the largest of the
two extension types, allowing us to use the larger VF as the type of the
reduction.

As per https://godbolt.org/z/KP549EEYM the backend handles this
valiantly, leading to better performance.

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

2 years ago[ConstantFold] Handle same type in ConstantFoldLoadThroughBitcast
Nikita Popov [Fri, 10 Dec 2021 15:37:49 +0000 (16:37 +0100)]
[ConstantFold] Handle same type in ConstantFoldLoadThroughBitcast

Usually the case where the types are the same ends up being handled
fine because it's legal to do a trivial bitcast to the same type.
However, this is not true for aggregate types. Short-circuit the
whole code if the types match exactly to account for this.

2 years ago[gn build] (semimanually) port ebc31d2e7297
Nico Weber [Fri, 10 Dec 2021 15:39:28 +0000 (10:39 -0500)]
[gn build] (semimanually) port ebc31d2e7297

2 years ago[gn build] Port 5a40df638181
Nico Weber [Fri, 10 Dec 2021 15:34:07 +0000 (10:34 -0500)]
[gn build] Port 5a40df638181

2 years ago[ASan] Shared optimized callbacks implementation.
Kirill Stoimenov [Fri, 10 Dec 2021 15:08:26 +0000 (15:08 +0000)]
[ASan] Shared optimized callbacks implementation.

This change moves optimized callbacks from each .o file to compiler-rt. Instead of using code generation it uses direct assembly implementation. Please note that the 'or' version is not implemented and it will produce unresolved external if somehow 'or' version is requested.

Reviewed By: vitalybuka

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

2 years agoRevert "[Symbolizer][Debuginfo] Add debuginfod client to llvm-symbolizer."
Nico Weber [Fri, 10 Dec 2021 15:26:55 +0000 (10:26 -0500)]
Revert "[Symbolizer][Debuginfo] Add debuginfod client to llvm-symbolizer."

This reverts commit 5bba0fe12b2971a9cbc859f48ee6e6c1356c88b8.
Makes lld depend on libcurl, see comments on https://reviews.llvm.org/D113717

2 years ago[clang][dataflow] Add framework for testing analyses.
Yitzhak Mandelbaum [Tue, 16 Nov 2021 16:57:26 +0000 (16:57 +0000)]
[clang][dataflow] Add framework for testing analyses.

Adds a general-purpose framework to support testing of dataflow analyses.

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

2 years ago[InstSimplify] Add test for load of aggregate (NFC)
Nikita Popov [Fri, 10 Dec 2021 15:11:32 +0000 (16:11 +0100)]
[InstSimplify] Add test for load of aggregate (NFC)

The test is switched to use -instsimplify as it is in the
InstSimplify directory. In this particular case InstCombine does
fold the load (in a very roundabout way), but InstSimplify does not.

2 years ago[GlobalOpt] Add test for PR51879 (NFC)
Nikita Popov [Thu, 9 Dec 2021 15:23:39 +0000 (16:23 +0100)]
[GlobalOpt] Add test for PR51879 (NFC)

2 years ago[AArch64] Use Feature for A53 Erratum 835769 Fix
Archibald Elliott [Fri, 10 Dec 2021 15:09:43 +0000 (15:09 +0000)]
[AArch64] Use Feature for A53 Erratum 835769 Fix

When this pass was originally implemented, the fix pass was enabled
using a llvm command-line flag. This works fine, except in the case of
LTO, where the flag is not passed into the linker plugin in order to
enable the function pass in the LTO backend.

Now LTO exists, the expectation now is to use target features rather
than command-line arguments to control code generation, as this ensures
that different command-line arguments in different files are correctly
represented, and target-features always get to the LTO plugin as they
are encoded into LLVM IR.

The fall-out of this change is that the fix pass has to always be added
to the backend pass pipeline, so now it makes no changes if the function
does not have the right target feature to enable it. This should make a
minimal difference to compile time.

One advantage is it's now much easier to enable when compiling for a
Cortex-A53, as CPUs imply their own individual sets of target-features,
in a more fine-grained way. I haven't done this yet, but it is an
option, if the fix should be enabled in more places.

Existing tests of the user interface are unaffected, the changes are to
reflect that the argument is now turned into a target feature.

Reviewed By: tmatheson

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

2 years agoRevert "[clang][dataflow] Add framework for testing analyses."
Yitzhak Mandelbaum [Fri, 10 Dec 2021 14:27:15 +0000 (14:27 +0000)]
Revert "[clang][dataflow] Add framework for testing analyses."

This reverts commit 47d526d67e3cc66771eed1d0b607226a4fb9a5b5.

The commit is failing to build on some platforms. Rolling back while we investigate.

2 years ago[M68k][NFC] Fixed unused argument warnings in M68kInstrControl.td
Min-Yih Hsu [Fri, 10 Dec 2021 14:02:15 +0000 (22:02 +0800)]
[M68k][NFC] Fixed unused argument warnings in M68kInstrControl.td

Removed those unused template arguments. NFC.

2 years ago[MCA][X86] Add missing PSHUFLW from AVX512BWVL tests
Simon Pilgrim [Fri, 10 Dec 2021 14:02:19 +0000 (14:02 +0000)]
[MCA][X86] Add missing PSHUFLW from AVX512BWVL tests

2 years ago[clang][dataflow] Add framework for testing analyses.
Yitzhak Mandelbaum [Tue, 16 Nov 2021 16:57:26 +0000 (16:57 +0000)]
[clang][dataflow] Add framework for testing analyses.

Adds a general-purpose framework to support testing of dataflow analyses.

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

2 years ago[LV] Remove redundant IV casts using VPlan (NFCI).
Florian Hahn [Fri, 10 Dec 2021 13:56:43 +0000 (13:56 +0000)]
[LV] Remove redundant IV casts using VPlan (NFCI).

This patch simplifies handling of redundant induction casts, by
removing dead cast instructions after initial VPlan construction.
This has the following benefits:

  1. fixes a crash
     (see @test_optimized_cast_induction_feeding_first_order_recurrence)
  2. Simplifies VPWidenIntOrFpInduction to a single-def recipes
  3. Retires recordVectorLoopValueForInductionCast.

Reviewed By: Ayal

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

2 years ago[gn build] Prevent deps on HTTP requests in clang and lld at GN time
Nico Weber [Fri, 10 Dec 2021 13:54:17 +0000 (08:54 -0500)]
[gn build] Prevent deps on HTTP requests in clang and lld at GN time

To make sure no regressions creep in. See also discussion on
https://reviews.llvm.org/D113717

We don't want this dep in most targets, but protecting clang and lld is
a good start.

2 years ago[CodeGen] Improve SelectionDAGBuilder lowering code for get.active.lane.mask intrinsic
David Sherwood [Tue, 7 Dec 2021 14:13:55 +0000 (14:13 +0000)]
[CodeGen] Improve SelectionDAGBuilder lowering code for get.active.lane.mask intrinsic

Previously we were using UADDO to generate a two-result value with
the unsigned addition and the overflow mask. We then combined the
overflow mask with the trip count comparison to get a result.
However, we don't need to do this - we can simply use a UADDSAT
saturating add node to add the vector index splat and the stepvector
together. Then we can just compare this to a splat of the trip count.
This results in overall better code quality for both Thumb2 and AArch64.

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

2 years agoReapply [xray] add support for hexagon
Brian Cain [Thu, 9 Dec 2021 01:57:20 +0000 (17:57 -0800)]
Reapply [xray] add support for hexagon

Adds x-ray support for hexagon to llvm codegen, clang driver,
compiler-rt libs.

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

Reapplying this after 543a9ad7c460bb8d641b1b7c67bbc032c9bfdb45,
which fixes the leak introduced there.

2 years ago[OpenMP] libomp: fix Fortran header: lines exceeded 72-char length
AndreyChurbanov [Fri, 10 Dec 2021 13:23:21 +0000 (16:23 +0300)]
[OpenMP] libomp: fix Fortran header: lines exceeded 72-char length

Added line continuation to two long lines in Fortran header.

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

2 years ago[clang][dataflow] Fix build breakage from commit 8dcaf3aa0bf25508700a7452ed963c1487221dfd
Yitzhak Mandelbaum [Fri, 10 Dec 2021 12:55:48 +0000 (12:55 +0000)]
[clang][dataflow] Fix build breakage from commit 8dcaf3aa0bf25508700a7452ed963c1487221dfd

2 years ago[gn build] (manually) port 8dcaf3aa0bf25 and 6e2aecd759dc
Nico Weber [Fri, 10 Dec 2021 12:49:25 +0000 (07:49 -0500)]
[gn build] (manually) port 8dcaf3aa0bf25 and 6e2aecd759dc

2 years ago[libcxx][test][NFC] Extend testing for vector.cons
Konstantin Boyarinov [Fri, 10 Dec 2021 12:00:10 +0000 (15:00 +0300)]
[libcxx][test][NFC] Extend testing for vector.cons

Extending std::vector tests in vector.cons module:

- std::vector::assign when source range is bigger than destination
  capacity
- construction of empty vector using copy ctor, initializer_list ctor and
  others

Reviewed By: ldionne, rarutyun, #libc

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

2 years ago[clangd] Provide documentation as MarkupContent in signaturehelp
Kadir Cetinkaya [Thu, 9 Dec 2021 08:36:04 +0000 (09:36 +0100)]
[clangd] Provide documentation as MarkupContent in signaturehelp

This unifies the behaviour we have in code completion item
documentations and signaturehelp. Providing better line wrapping and detection
of inline code blocks in comments to be renedered appropriately in markdown.

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

2 years agoAdd PACBTI-M support to LLVM release notes.
Ties Stuij [Fri, 10 Dec 2021 11:52:09 +0000 (11:52 +0000)]
Add PACBTI-M support to LLVM release notes.

Clang release note changes will be added once the last PACBTI-M command line
patch lands.

Reviewed By: vhscampos

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

2 years ago[libcxx][test][NFC] Tests for set comparisons
Konstantin Boyarinov [Fri, 10 Dec 2021 09:51:42 +0000 (12:51 +0300)]
[libcxx][test][NFC] Tests for set comparisons

Add tests for std::set and std::multiset comparisons that were missed by
D111738 and D112424.

Reviewed By: ldionne, rarutyun, #libc

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

2 years ago[Passes] Only run extra vector passes if loops have been vectorized.
Florian Hahn [Fri, 10 Dec 2021 11:42:45 +0000 (11:42 +0000)]
[Passes] Only run extra vector passes if loops have been vectorized.

This patch uses a similar trick as in D113947 to only run the extra
passes after vectorization on functions where loops have been
vectorized.

The reason for running the 'extra vector passes' is
simplification/unswitching of the runtime checks created by LV, there
should be no need to run them if nothing got vectorized

To do that, a new dummy analysis ShouldRunExtraVectorPasses has been
added. If loops have been vectorized for a function, LV will cache the
analysis. At the moment it uses MadeCFGChanges as proxy for loop
vectorized, which isn't perfect (it could be too aggressive, e.g.
because no runtime checks have been added), but should be good enough
for now.

The extra passes are now managed by a new FunctionPassManager that
runs its passes only if ShouldRunExtraVectorPasses has been cached.

Without this patch, `-extra-vectorizer-passes` has the following
compile-time impact:

NewPM-O3: +4.86%
NewPM-ReleaseThinLTO: +3.56%
NewPM-ReleaseLTO-g: +7.17%

http://llvm-compile-time-tracker.com/compare.php?from=ead3979a92fc33add4710c4510d6906260dcb4ad&to=c292da649e2c6e88a31e702fdc474727d09c72bc&stat=instructions

With this patch, that gets reduced to

NewPM-O3: +1.43%
NewPM-ReleaseThinLTO: +1.00%
NewPM-ReleaseLTO-g: +1.58%

http://llvm-compile-time-tracker.com/compare.php?from=ead3979a92fc33add4710c4510d6906260dcb4ad&to=e67d86b57810011cf285eb9aa1944781be6096f0&stat=instructions

It is probably still too high to enable by default, but much better.

Reviewed By: aeubanks

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

2 years ago[LV][NFC] New test case for compile time known trip count (TC)
Evgeniy Brevnov [Wed, 24 Nov 2021 12:41:47 +0000 (19:41 +0700)]
[LV][NFC] New test case for compile time known trip count (TC)

New test to test/track upcoming chnages

Reviewed By: fhahn

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

2 years ago[asan] Add support for disable_sanitizer_instrumentation attribute
Alexander Potapenko [Tue, 23 Nov 2021 09:32:35 +0000 (10:32 +0100)]
[asan] Add support for disable_sanitizer_instrumentation attribute

For ASan this will effectively serve as a synonym for
__attribute__((no_sanitize("address")))

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

2 years ago[mlir] Move `linalg.tensor_expand/collapse_shape` to TensorDialect.
Alexander Belyaev [Fri, 10 Dec 2021 11:03:47 +0000 (12:03 +0100)]
[mlir] Move `linalg.tensor_expand/collapse_shape` to TensorDialect.

RFC: https://llvm.discourse.group/t/rfc-reshape-ops-restructuring/3310

linalg.fill gets a canonicalizer, because `FoldFillWithTensorReshape` cannot be moved to tensorops (it uses linalg::FillOp inside). Before it was listed as a canonicalization pattern for the reshape operations, now it became a canonicalization for FillOp.

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

2 years agoRevert "[llvm] [Debuginfo] Add llvm-debuginfod-find tool and end-to-end-tests."
Noah Shutty [Fri, 10 Dec 2021 11:08:15 +0000 (11:08 +0000)]
Revert "[llvm] [Debuginfo] Add llvm-debuginfod-find tool and end-to-end-tests."

This reverts commit 350fe22f2a7f16791f9269fd50f1fca1e7fa74d1 because it
caused buildbot breakages (https://lab.llvm.org/buildbot/#/builders/91/builds/387).

2 years ago[clang][dataflow] Implement a basic algorithm for dataflow analysis
Stanislav Gatev [Fri, 10 Dec 2021 09:37:07 +0000 (10:37 +0100)]
[clang][dataflow] Implement a basic algorithm for dataflow analysis

This is part of the implementation of the dataflow analysis framework.
See "[RFC] A dataflow analysis framework for Clang AST" on cfe-dev.

Reviewed By: xazax.hun, gribozavr2

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

2 years ago[llvm] [Debuginfo] Add llvm-debuginfod-find tool and end-to-end-tests.
Noah Shutty [Fri, 10 Dec 2021 10:22:15 +0000 (10:22 +0000)]
[llvm] [Debuginfo] Add llvm-debuginfod-find tool and end-to-end-tests.

This implements the `llvm-debuginfod-find` tool, which wraps the Debuginfod library (D112758) to query debuginfod servers for artifacts according to the [[ https://www.mankier.com/8/debuginfod#Webapi | specification ]].

Reviewed By: labath

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

2 years ago[VPlan] Add InductionDescriptor to VPWidenIntOrFpInduction. (NFC)
Florian Hahn [Fri, 10 Dec 2021 09:55:09 +0000 (09:55 +0000)]
[VPlan] Add InductionDescriptor to VPWidenIntOrFpInduction. (NFC)

This allows easier access to the induction descriptor from VPlan,
without needing to go through Legal. VPReductionPHIRecipe already
contains a RecurrenceDescriptor in a similar fashion.

Reviewed By: Ayal

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

2 years ago[ARM][libcxxabi] Add PACBTI-M support to libcxxabi
Ties Stuij [Fri, 10 Dec 2021 09:36:19 +0000 (09:36 +0000)]
[ARM][libcxxabi] Add PACBTI-M support to libcxxabi

This change consists of just adding 'BTI' to the prologue of Arm assembly
functions, which is just the one: __cxa_end_cleanup

This patch is part of a series that adds support for the PACBTI-M extension of
the Armv8.1-M architecture, as detailed here:

https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/armv8-1-m-pointer-authentication-and-branch-target-identification-extension

The PACBTI-M specification can be found in the Armv8-M Architecture Reference
Manual:

https://developer.arm.com/documentation/ddi0553/latest

The following people contributed to this patch:

- Mikhail Maltsev

Reviewed By: lenary, danielkiss

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

2 years ago[msan] Implement -msan-disable-checks.
Alexander Potapenko [Tue, 7 Dec 2021 12:20:12 +0000 (13:20 +0100)]
[msan] Implement -msan-disable-checks.

To ease the deployment of KMSAN, we need a way to apply
__attribute__((no_sanitize("kernel-memory"))) to the whole source file.

Passing -msan-disable-checks=1 to the compiler will make it
treat every function in the file as if it was lacking the
sanitize_memory attribute.

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

2 years ago[gn build] Port 1d0244aed781
LLVM GN Syncbot [Fri, 10 Dec 2021 09:08:48 +0000 (09:08 +0000)]
[gn build] Port 1d0244aed781

2 years agoReapply CycleInfo: Introduce cycles as a generalization of loops
Sameer Sahasrabuddhe [Fri, 10 Dec 2021 09:06:43 +0000 (14:36 +0530)]
Reapply CycleInfo: Introduce cycles as a generalization of loops

Reverts 02940d6d2202. Fixes breakage in the modules build.

LLVM loops cannot represent irreducible structures in the CFG. This
change introduce the concept of cycles as a generalization of loops,
along with a CycleInfo analysis that discovers a nested
hierarchy of such cycles. This is based on Havlak (1997), Nesting of
Reducible and Irreducible Loops.

The cycle analysis is implemented as a generic template and then
instatiated for LLVM IR and Machine IR. The template relies on a new
GenericSSAContext template which must be specialized when used for
each IR.

This review is a restart of an older review request:
https://reviews.llvm.org/D83094

Original implementation by Nicolai Hähnle <nicolai.haehnle@amd.com>,
with recent refactoring by Sameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>

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

2 years agoRemove one change from https://reviews.llvm.org/D115431
Jason Molenda [Fri, 10 Dec 2021 09:01:17 +0000 (01:01 -0800)]
Remove one change from https://reviews.llvm.org/D115431

The change to ArchSpec::SetArchitecture that was setting the
ObjectFile of a mach-o binary to llvm::Triple::MachO.  It's not
necessary for my patch, and it changes the output of image list -t
causing TestUniversal.py to fail on x86_64 systems.  The bots
turned up the failure, I was developing and testing this on
an Apple Silicon mac.

2 years ago[flang][nfc] Fix formatting
Andrzej Warzynski [Fri, 10 Dec 2021 08:56:57 +0000 (08:56 +0000)]
[flang][nfc] Fix formatting

2 years ago[flang][codegen] Add a conversion for `!fir.coordinate_of` - part 1
Andrzej Warzynski [Wed, 17 Nov 2021 10:03:19 +0000 (10:03 +0000)]
[flang][codegen] Add a conversion for `!fir.coordinate_of` - part 1

This patch extends the `FIRToLLVMLowering` pass in Flang by adding a
hook to transform `!fir.coordinate_of` into a sequence of LLVM MLIR
instructions.

The following cases are currently supported:
  1.  the input object is a `!fir.complex` (wrapped in e.g. `!fir.ref` or
      `!fir.box`)
  2.  the input object is wrapped in a `!fir.box` (including e.g.
      `!fir.array`).
Note that `!fir.complex` inside a `!fir.box` falls under case 1. above
(i.e. it's a special case regardless of the wrapping type).

This is part of the upstreaming effort from the `!fir-dev` branch in [1].

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

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: V Donaldson <vdonaldson@nvidia.com>
2 years ago[AMDGPU] Add AV class spill pseudo instructions
Christudasan Devadasan [Thu, 9 Dec 2021 07:55:21 +0000 (02:55 -0500)]
[AMDGPU] Add AV class spill pseudo instructions

While enabling vector superclasses with D109301,
the AV spills are converted into VGPR spills by
introducing appropriate copies. The whole thing
ended up adding two instructions per spill (a copy
+ vgpr spill pseudo) and caused an incorrect
liverange update during inline spiller.

This patch adds the pseudo instructions for all
AV spills from 32b to 1024b and handles them in
the way all other spills are lowered.

Reviewed By: arsenm

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