platform/upstream/llvm.git
2 years ago[pseudo] NFC, remove redundant ;
Haojian Wu [Fri, 19 Aug 2022 13:53:16 +0000 (15:53 +0200)]
[pseudo] NFC, remove redundant ;

2 years ago[lldb] [test] Add synchronization to TestContinue
Michał Górny [Fri, 19 Aug 2022 13:49:35 +0000 (15:49 +0200)]
[lldb] [test] Add synchronization to TestContinue

Sponsored by: The FreeBSD Foundation

2 years ago[lldb] [Core] Harmonize Communication::Read() returns w/ thread
Michał Górny [Fri, 19 Aug 2022 10:30:50 +0000 (12:30 +0200)]
[lldb] [Core] Harmonize Communication::Read() returns w/ thread

Harmonize the status and error values of Communication::Read() when
running with and without read thread.  Prior to this change, Read()
would return eConnectionStatusSuccess if read thread was enabled
and the read timed out or reached end-of-file, rather than
the respective states that are returned if read thread was disabled.
Now, it correctly returns eConnectionStatusTimedOut
and eConnectionStatusEndOfFile, and sets the error respectively.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.llvm.org/D132217

2 years ago[libc++][NFC] Rename the constexpr macros
Nikolas Klauser [Fri, 19 Aug 2022 11:08:01 +0000 (13:08 +0200)]
[libc++][NFC] Rename the constexpr macros

This was discussed on Discord with the consensus that we should rename the macros.

Reviewed By: ldionne, Mordante, var-const, avogelsgesang, jloser, #libc

Spies: libcxx-commits

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

2 years ago[Sema] Tweak diagnostic logic so suppress-in-header logic works in tools too.
Sam McCall [Wed, 13 Jul 2022 14:27:36 +0000 (16:27 +0200)]
[Sema] Tweak diagnostic logic so suppress-in-header logic works in tools too.

Certain idioms are ignored by -Wunused in header files only.
The current "is a header" check assumes that if headers are the main file, we're
building a PCH or a module or something. However in tools we may be parsing the
header in its own right, but still want to treat it as a header.

Fixes https://github.com/clangd/vscode-clangd/issues/360

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

2 years ago[pseudo] Changes omitted from previous commit
Sam McCall [Fri, 19 Aug 2022 13:15:37 +0000 (15:15 +0200)]
[pseudo] Changes omitted from previous commit

2 years ago[pseudo] Perform unconstrained reduction prior to recovery.
Sam McCall [Fri, 19 Aug 2022 13:00:59 +0000 (15:00 +0200)]
[pseudo] Perform unconstrained reduction prior to recovery.

Our GLR uses lookahead: only perform reductions that might be consumed by the
shift immediately following. However when shift fails and so reduce is followed
by recovery instead, this restriction is incorrect and leads to missing heads.

In turn this means certain recovery strategies can't be made to work. e.g.
```
ns := NAMESPACE { namespace-body } [recover=Skip]
ns-body := namespace_opt
```
When `namespace { namespace {` is parsed, we can recover the inner `ns` (using
the `Skip` strategy to ignore the missing `}`). However this `namespace` will
not be reduced to a `namespace-body` as EOF is not in the follow-set, and so we
are unable to recover the outer `ns`.

This patch fixes this by tracking which heads were produced by constrained
reduce, and discarding and rebuilding them before performing recovery.

This is a prerequisite for the `Skip` strategy mentioned above, though there are
some other limitations we need to address too.

Reviewed By: hokein

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

2 years ago[clangd] Support hover on __func__ etc (PredefinedExpr)
Sam McCall [Fri, 19 Aug 2022 12:51:36 +0000 (14:51 +0200)]
[clangd] Support hover on __func__ etc (PredefinedExpr)

Expose these as variables as that's what the standard calls them (and D131175).

To make this work, we also fix a bug in SelectionTree: PredefinedExpr has
an implicit/invisible StringLiteral, and SelectionTree should not traverse
implicit things.

Reviewed By: ckandeler

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

2 years agoAdd guidance for what to put in community calendar invites
Kristof Beyls [Thu, 18 Aug 2022 12:58:05 +0000 (14:58 +0200)]
Add guidance for what to put in community calendar invites

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

2 years ago[PowerPC] Fix bugs in sign-/zero-extension elimination
Stefan Pintilie [Tue, 16 Aug 2022 16:08:33 +0000 (11:08 -0500)]
[PowerPC] Fix bugs in sign-/zero-extension elimination

This patch fixes the following two bugs in `PPCInstrInfo::isSignOrZeroExtended` helper, which is used from sign-/zero-extension elimination in PPCMIPeephole pass.
- Registers defined by load with update (e.g. LBZU) were identified as already sign or zero-extended. But it is true only for the first def (loaded value) and not for the second def (i.e. updated pointer).
- Registers defined by ORIS/XORIS were identified as already sign-extended. But, it is not true for sign extension depending on the immediate (while it is ok for zero extension).

To handle the first case, the parameter for the helpers is changed from `MachineInstr` to a register number to distinguish first and second defs. Also, this patch moves the initialization of PPCMIPeepholePass to allow mir test case.

Reviewed By: nemanjai

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

2 years ago[Clang][AArch64] Use generic extract/insert vector for svget/svset/svcreate tuples
Caroline Concatto [Wed, 10 Aug 2022 07:13:15 +0000 (08:13 +0100)]
[Clang][AArch64] Use generic extract/insert vector for svget/svset/svcreate tuples

This patch replaces svget, svset and svcreate aarch64 intrinsics for tuple
types with the generic llvm-ir intrinsics extract/insert vector

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

2 years ago[gn build] Port c74c17f37aa9
Nico Weber [Fri, 19 Aug 2022 11:45:06 +0000 (07:45 -0400)]
[gn build] Port c74c17f37aa9

2 years agoRevert "[gn build] port f7a33090a910"
Nico Weber [Fri, 19 Aug 2022 11:40:45 +0000 (07:40 -0400)]
Revert "[gn build] port f7a33090a910"

This reverts commit d3a1dbc4907b59690f9013cdb6221573ca4233f1.
f7a33090a910 was reverted in e941b031d316.

2 years ago[lldb] Use WSAEventSelect for MainLoop polling on windows
Pavel Labath [Thu, 4 Aug 2022 09:26:36 +0000 (11:26 +0200)]
[lldb] Use WSAEventSelect for MainLoop polling on windows

This patch switches the MainLoop class to use the WSAEventSelect
mechanism to wait for multiple sockets to become readable. The
motivation for doing that is that this allows us to wait for other kinds
of events as well (as long as they can be converted to WSAEvents). This
will allow us to avoid (abstract away) pipe-based multiplexing
mechanisms in the generic code, since pipes cannot be combined with
sockets on windows.

Since the windows implementation will now look completely different than
the posix (file descriptor-based) implementations, I have split the
MainLoop class into two (MainLoopPosix and MainLoopWindows), with the
common code going into MainLoopBase.

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

2 years agoAdd support for specifying the severity of a SARIF Result
Vaibhav Yenamandra [Fri, 19 Aug 2022 11:13:44 +0000 (07:13 -0400)]
Add support for specifying the severity of a SARIF Result

* Extend SarifResult with level property, and allow rule configuration
* Create SarifReportingConfiguration which allow configuring rules with
a default priority, severity and an enable-toggle
* Support for setting the level property[1] of a result.

If unset, it defaults to "warning", which is the result of an empty
default configuration on rules[2]

[1]: https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317648
[2]: https://docs.oasis-open.org/sarif/sarif/v2.1.0/os/sarif-v2.1.0-os.html#_Toc34317855

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

2 years ago[InstCombine] For vector extract when extract vector and insert value type is the...
Caroline Concatto [Fri, 19 Aug 2022 11:08:14 +0000 (12:08 +0100)]
[InstCombine] For vector extract when extract vector and insert value type is the same

This patch has implements these optimizations:

 extract.vector(insert.vector(Vector, Value, Idx), Idx) --> Value

 extract.vector(insert.vector(Vector, Value, InsertIndex), ExtractIndex)
  --> extract.vector(Vector, ExtractIndex)

Reviewed By: sdesmalen

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

2 years ago[AMDGPU][MC][GFX9][NFC] Split large test file
Dmitry Preobrazhensky [Fri, 19 Aug 2022 11:01:42 +0000 (14:01 +0300)]
[AMDGPU][MC][GFX9][NFC] Split large test file

Split gfx9_dasm_all.txt by instruction encoding.

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

2 years ago[AMDGPU][MC][GFX8][NFC] Split large test file
Dmitry Preobrazhensky [Fri, 19 Aug 2022 10:51:55 +0000 (13:51 +0300)]
[AMDGPU][MC][GFX8][NFC] Split large test file

Split gfx8_dasm_all.txt by instruction encoding.

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

2 years ago[NFC][OpenMP] Add test for simd directive with nested loop
Dominik Adamski [Fri, 19 Aug 2022 10:00:02 +0000 (05:00 -0500)]
[NFC][OpenMP] Add test for simd directive with nested loop

This test is follow up of the review: https://reviews.llvm.org/D131402

Co-Author of the patch: Kiran Chandramohan

Reviewed By: kiranchandramohan

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

2 years ago[Clang][AArch64] Replace aarch64_sve_ldN intrinsic by aarch64_sve_ldN.sret
Caroline Concatto [Thu, 11 Aug 2022 11:09:58 +0000 (12:09 +0100)]
[Clang][AArch64] Replace aarch64_sve_ldN intrinsic by aarch64_sve_ldN.sret

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

2 years ago[clang,flang] Add help text for -fsyntax-only
Alexander Malkov [Fri, 19 Aug 2022 09:53:27 +0000 (09:53 +0000)]
[clang,flang] Add help text for -fsyntax-only

Fix for the problem with displaying options `-fsyntax-only` in clang and flang-new in help
Fix https://github.com/llvm/llvm-project/issues/57033

Before:
``` $ clang  -help | grep syntax
  -objcmt-migrate-property-dot-syntax
         Enable migration of setter/getter messages to property-dot syntax
```
After:
```
 $ clang -help | grep syntax
  -fsyntax-only           Run the preprocessor, parser and semantic analysis stages
  -objcmt-migrate-property-dot-syntax
         Enable migration of setter/getter messages to property-dot syntax
```

Reviewed By: vzakhari, awarzynski, MaskRay, alexiprof

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

2 years ago[CostModel][X86] Split icmp/fcmp cost kinds tests
Simon Pilgrim [Fri, 19 Aug 2022 09:39:30 +0000 (10:39 +0100)]
[CostModel][X86] Split icmp/fcmp cost kinds tests

It's going to be much easier to maintain these tests (and all the check prefix combinations) if we don't mix cost kinds in the same file.

2 years ago[CostModel][X86] Split select cost kinds tests
Simon Pilgrim [Fri, 19 Aug 2022 09:28:04 +0000 (10:28 +0100)]
[CostModel][X86] Split select cost kinds tests

It's going to be much easier to maintain these tests (and all the check prefix combinations) if we don't mix cost kinds in the same file.

2 years ago[CostModel][X86] Add tremont to slm-arith-costs.ll
Simon Pilgrim [Fri, 19 Aug 2022 09:17:44 +0000 (10:17 +0100)]
[CostModel][X86] Add tremont to slm-arith-costs.ll

Tremont uses the Goldmont div/sqrt costs but we weren't testing for them

2 years ago[CostModel][X86] Cleanup arithmetic test triples
Simon Pilgrim [Fri, 19 Aug 2022 09:09:28 +0000 (10:09 +0100)]
[CostModel][X86] Cleanup arithmetic test triples

Just specify the triple inside the RUN command (to make i686 support much easier!), and consistently use x86_64-- generic triple

2 years ago[libcxx] [test] Mark the libcxx/selftest/remote-substitutions.sh.cpp test as requirin...
Martin Storsjö [Mon, 8 Aug 2022 21:48:22 +0000 (00:48 +0300)]
[libcxx] [test] Mark the libcxx/selftest/remote-substitutions.sh.cpp test as requiring bash in the executor

It's unclear to me why this wasn't tagged this way already in
87fe0709d4ad7c3128f998f14c66245ebb423e4f / D114612 where the
feature flag executor-has-no-bash was added, as this test did exist
in its current form already at that time.

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

2 years ago[libcxx] [test] Make some threading tests more robust
Martin Storsjö [Tue, 9 Aug 2022 08:56:46 +0000 (11:56 +0300)]
[libcxx] [test] Make some threading tests more robust

Increase the timeout tolerance if TEST_IS_EXECUTED_IN_A_SLOW_ENVIRONMENT
is set, similarly to how it's done in a couple other tests.

Use `std::this_thread::yield();` instead of busylooping. When multiple
threads are busylooping, it's plausible that not all threads even get
started running before the timeout runs out.

This makes the threading tests succeed if run in Windows runners on
Github Actions.

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

2 years ago[libcxx] [test] Split the TEST_HAS_SANITIZERS define into TEST_IS_EXECUTED_IN_A_SLOW_...
Martin Storsjö [Tue, 9 Aug 2022 10:51:33 +0000 (13:51 +0300)]
[libcxx] [test] Split the TEST_HAS_SANITIZERS define into TEST_IS_EXECUTED_IN_A_SLOW_ENVIRONMENT

This makes its role clearer. It's plausible that one may want to manually
define TEST_IS_EXECUTED_IN_A_SLOW_ENVIRONMENT when running the tests in
some environments - in particular, it seems to be necessary to use the
higher tolerance timeouts if running the tests on Windows runners
on Github Actions.

Also add the descriptive comment in one file where it was missing.

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

2 years ago[libcxx] [test] Remove --env PATH from the static clangcl config
Martin Storsjö [Tue, 9 Aug 2022 08:36:51 +0000 (11:36 +0300)]
[libcxx] [test] Remove --env PATH from the static clangcl config

The PATH is set in order to be able to find the tested DLL at runtime.
When linking statically, it's not necessary to set the PATH.

Setting PATH in the executor has the downside that it clears the
existing path (it's not prepended/appended to it), which means
that the executed tools can't find other tools - which sets the
executor-has-no-bash flag.

By removing the unnecessary setting of PATH, we have a properly
working bash even when wrapped by the executor, which gets rid
of the executor-has-no-bash flag in this test configuration, which
makes 9 more testcases be executed.

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

2 years ago[clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members on...
Carlos Galvez [Fri, 12 Aug 2022 14:53:31 +0000 (14:53 +0000)]
[clang-tidy] Do not trigger cppcoreguidelines-avoid-const-or-ref-data-members on lambda captures

Lambdas are implemented as regular classes internally,
and the captured variables end up as members there.
Do not diagnose those - the check should cover only
regular classes and structs.

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

2 years ago[LangRef][VP] Fix typo.
jacquesguan [Fri, 19 Aug 2022 07:59:27 +0000 (15:59 +0800)]
[LangRef][VP] Fix typo.

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

2 years ago[clang][Modules] Fix a regression in handling missing framework headers.
Iain Sandoe [Thu, 18 Aug 2022 13:34:50 +0000 (14:34 +0100)]
[clang][Modules] Fix a regression in handling missing framework headers.

The commit of af2d11b1d5c1508b506825df460656e0151cd3b0 missed a case where
the value of a suggested module needed to be reset to nullptr.  Fixed thus
and added a testcase to cover the circumstance.

2 years ago[AArch64][GISel] Lower llvm.prefetch
Archibald Elliott [Wed, 17 Aug 2022 17:11:58 +0000 (18:11 +0100)]
[AArch64][GISel] Lower llvm.prefetch

This change adds support for lowering llvm.prefetch directly using
GlobalISel. Currently, llvm.prefetch falls back to SelectionDAG.

This Change:
- Adds an AArch64-specific G_PREFETCH generic instruction, to be used
  where AArch64ISD::PREFETCH is used in SelectionDAG.
- Adds the GINodeEquiv so patterns are translated over to GlobalISel
  automatically.
- Corrects the AArch64Prefetch patterns to use a target immediate, which
  is needed to get the patterns to translate across correctly.
- Translates the SelectionDAG legalisation of the prefetch intrinsic
  into the corresponding GlobalISel legalisation.

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

2 years ago[IR] Update llvm.prefetch to match docs
Archibald Elliott [Wed, 17 Aug 2022 17:05:12 +0000 (18:05 +0100)]
[IR] Update llvm.prefetch to match docs

The current llvm.prefetch intrinsic docs state "The rw, locality and
cache type arguments must be constant integers."

This change:
- Makes arg 3 (cache type) an ImmArg
- Improves the verifier error messages to reference the incorrect
  argument.
- Fixes two tests which contradict the docs.

This is needed as the lowering to GlobalISel is different for ImmArgs
compared to other constants. The non-ImmArgs create a G_CONSTANT MIR
instruction, the for ImmArgs the constant is put directly on the
intrinsic's MIR instruction as an immediate.

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

2 years ago[lldb] [test] Remove test_step_multiprocess, it's unreliable
Michał Górny [Fri, 19 Aug 2022 08:07:37 +0000 (10:07 +0200)]
[lldb] [test] Remove test_step_multiprocess, it's unreliable

Sponsored by: The FreeBSD Foundation

2 years ago[Test] Regenerate tests using update_tests.py
Max Kazantsev [Fri, 19 Aug 2022 07:48:39 +0000 (14:48 +0700)]
[Test] Regenerate tests using update_tests.py

2 years ago[lldb] [test] Skip step packet test on non-amd64
Michał Górny [Fri, 19 Aug 2022 07:39:56 +0000 (09:39 +0200)]
[lldb] [test] Skip step packet test on non-amd64

Sponsored by: The FreeBSD Foundation

2 years ago[libc] Add more headers to the linux x86_64 and aarch64 configs.
Siva Chandra Reddy [Fri, 19 Aug 2022 07:15:08 +0000 (07:15 +0000)]
[libc] Add more headers to the linux x86_64 and aarch64 configs.

2 years ago[libc][NFC] Change the libc fullbuild target name to "libc".
Siva Chandra Reddy [Fri, 19 Aug 2022 07:01:47 +0000 (07:01 +0000)]
[libc][NFC] Change the libc fullbuild target name to "libc".

2 years ago[NFC] Add tests for MemorySSA shouldn't contain debug instructions
Chuanqi Xu [Fri, 19 Aug 2022 07:02:54 +0000 (15:02 +0800)]
[NFC] Add tests for MemorySSA shouldn't contain debug instructions

Extracted from D130153

2 years ago[lldb] [gdb-remote] Include PID in vCont packets if multiprocess
Michał Górny [Fri, 12 Aug 2022 10:37:18 +0000 (12:37 +0200)]
[lldb] [gdb-remote] Include PID in vCont packets if multiprocess

Try to always send vCont packets and include the PID in them if running
multiprocess.  This is necessary to ensure that with the upcoming full
multiprocess support always resumes the correct process without having
to resort to the legacy Hc packets.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.llvm.org/D131758

2 years ago[clang-tidy] Improve modernize-use-emplace check
Joey Watts [Fri, 19 Aug 2022 06:57:12 +0000 (07:57 +0100)]
[clang-tidy] Improve modernize-use-emplace check

This patch improves the modernize-use-emplace check by adding support for
detecting inefficient invocations of the `push` and `push_front` methods on
STL-style containers and replacing them with their `emplace`-style equivalent.

Fixes #56996.

Reviewed By: njames93

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

2 years ago[DirectX] Fix crash on ShuffleVectorInst in DXILBitcodeWriter
Xiang Li [Thu, 18 Aug 2022 06:40:13 +0000 (23:40 -0700)]
[DirectX] Fix crash on ShuffleVectorInst in DXILBitcodeWriter

Use onstantDataSequential::getElementType to allow vector type.

Use getShuffleMaskForBitcode to get ShuffleMask.

Use old format for alloca Align.

Reviewed By: beanz

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

2 years ago[NFC] Add [[maybe_unused]] to avoid warning in gcc9
Chuanqi Xu [Fri, 19 Aug 2022 06:41:25 +0000 (14:41 +0800)]
[NFC] Add [[maybe_unused]] to avoid warning in gcc9

GCC9 may issue warning for the 'unused' parameters in if constexpr.
This commit try to fix it by adding the [[maybe_unused]] attribute.

2 years ago[flang] Shift argument attributes when result operand is inserted
Valentin Clement [Fri, 19 Aug 2022 06:40:09 +0000 (08:40 +0200)]
[flang] Shift argument attributes when result operand is inserted

The TargetRewrite pass convert the signature of the function.
In some cases it adds operands to the function to hanlde the result of it.
This patch makes sure the argument attributes present before the conversion
are replaced with the correct arguments after the conversion is performed.

Depends D132113

Reviewed By: vdonaldson

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

2 years ago[Test] Remove addrspace1 ptr to not confuse alive2
Max Kazantsev [Fri, 19 Aug 2022 06:24:35 +0000 (13:24 +0700)]
[Test] Remove addrspace1 ptr to not confuse alive2

addrspace here is not import for the test itself.

2 years ago[clang] Improve diagnostics for uninitialized constexpr variables
Timm Bäder [Thu, 11 Aug 2022 09:22:00 +0000 (11:22 +0200)]
[clang] Improve diagnostics for uninitialized constexpr variables

Instead of complaining about default initialization, tell users that
constexpr variables need to be initialized by a constant expression.

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

2 years ago[BOLT] Insert EH trampolines for multiple fragments
Fabian Parzefall [Fri, 19 Aug 2022 04:51:51 +0000 (21:51 -0700)]
[BOLT] Insert EH trampolines for multiple fragments

This patch adds exception handling trampolines when a function is split
into more than two fragments. Trampolines are tracked per-fragment, such
that they can be removed if splitting is reversed.

Reviewed By: rafauler

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

2 years ago[BOLT] Update buildCallGraph to check for split blocks
Fabian Parzefall [Fri, 19 Aug 2022 04:51:22 +0000 (21:51 -0700)]
[BOLT] Update buildCallGraph to check for split blocks

Use isSplit() instead of isCold() when building the call graph and
update parameter names to reflect this.

Reviewed By: rafauler

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

2 years ago[BOLT] Add randomN split strategy
Fabian Parzefall [Fri, 19 Aug 2022 04:51:01 +0000 (21:51 -0700)]
[BOLT] Add randomN split strategy

This adds a strategy to split functions into a random number of
fragments at randomly chosen split points.

Reviewed By: rafauler

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

2 years ago[BOLT] Add split all blocks strategy
Fabian Parzefall [Fri, 19 Aug 2022 04:50:35 +0000 (21:50 -0700)]
[BOLT] Add split all blocks strategy

This adds a function splitting strategy that splits each outlineable
basic block into its own fragment. This is exposed through a new command
line option `--split-strategy`.

Reviewed By: rafauler

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

2 years ago[BOLT] Generate sections for multiple fragments
Fabian Parzefall [Fri, 19 Aug 2022 04:48:19 +0000 (21:48 -0700)]
[BOLT] Generate sections for multiple fragments

This patch adds support to generate any number of sections that are
assigned to fragments of functions that are split more than two-way.
With this, a function's *nth* split fragment goes into section
`.text.cold.n`.

This also changes `FunctionLayout::erase` to make sure, that there are
no empty fragments at the end of the function. This sometimes happens
when blocks are erased from the function. To avoid creating symbols
pointing to these fragments, they need to be removed.

Reviewed By: rafauler

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

2 years ago[BOLT] Make exception handling fragment aware
Fabian Parzefall [Fri, 19 Aug 2022 04:40:00 +0000 (21:40 -0700)]
[BOLT] Make exception handling fragment aware

This adds basic fragment awareness in the exception handling passes and
generates the necessary symbols for fragments.

Reviewed By: rafauler

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

2 years ago[BOLT] Support passing fragments to code emission
Fabian Parzefall [Fri, 19 Aug 2022 04:26:18 +0000 (21:26 -0700)]
[BOLT] Support passing fragments to code emission

This changes code emission such that it can emit specific function
fragments instead of scanning all basic blocks of a function and just
emitting those that are hot or cold.

To implement this, `FunctionLayout` explicitly distinguishes the "main"
fragment (i.e. the one that contains the entry block and is associated
with the original symbol) from "split" fragments. Additionally,
`BinaryFunction` receives support for multiple cold symbols - one for
each split fragment.

Reviewed By: rafauler

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

2 years agoRevert "[tsan] Keep thread/stack for closed FD"
David Blaikie [Fri, 19 Aug 2022 04:01:42 +0000 (04:01 +0000)]
Revert "[tsan] Keep thread/stack for closed FD"

Test is flaky.

This reverts commit e9c5bde88ea2e35fadb15c5e5a1d2cb583fd0772.

2 years agoSimplify RAV isSameMethod with constexpr if
David Blaikie [Fri, 19 Aug 2022 03:33:01 +0000 (03:33 +0000)]
Simplify RAV isSameMethod with constexpr if

Owing to the large number of instantiations of this function, this small
change has a small but meaningful difference on the total size of
(especially a debug) build of clang at -O0:
```
    FILE SIZE        VM SIZE
 --------------  --------------
  +0.9% +96.9Ki  +0.9% +96.9Ki    .data.rel.ro
  +0.7% +96.7Ki  +0.7% +96.7Ki    .rela.dyn
  +0.0% +18.3Ki  +0.0% +18.3Ki    .rodata
  +0.0%    +324  [ = ]       0    [2 Others]
  -0.2%    -392  -0.2%    -392    .gnu.version
  -0.0%    -441  [ = ]       0    .debug_abbrev
  -0.1%    -980  -0.1%    -980    .gnu.hash
  -0.2% -1.53Ki  -0.2% -1.53Ki    .hash
  -0.2% -4.59Ki  -0.2% -4.59Ki    .dynsym
  -0.1% -10.5Ki  [ = ]       0    .debug_rnglists
  -0.6% -59.0Ki  -0.6% -59.0Ki    .dynstr
  -0.2%  -191Ki  [ = ]       0    .debug_str_offsets
  -3.0%  -233Ki  -3.0%  -233Ki    .eh_frame_hdr
  -0.7%  -244Ki  [ = ]       0    .debug_addr
  -2.9%  -699Ki  [ = ]       0    .symtab
  -0.6%  -884Ki  [ = ]       0    .debug_line
  -3.0%  -932Ki  -3.0%  -932Ki    .eh_frame
  -1.0% -1.48Mi  -1.0% -1.48Mi    .text
  -0.6% -2.75Mi  [ = ]       0    .debug_info
  -7.3% -8.61Mi  [ = ]       0    .strtab
  -7.3% -17.2Mi  [ = ]       0    .debug_str
  -2.4% -33.0Mi  -0.9% -2.47Mi    TOTAL
```

If anyone's got other ideas for how to reduce this further - it's not
especially important, I just came across it while investigating a debug
info size regression, but thought it was interesting enough to poke
around at.

2 years ago[RISCV] Copy SDNodeFlags in lowerToScalableOp.
Craig Topper [Fri, 19 Aug 2022 03:42:59 +0000 (20:42 -0700)]
[RISCV] Copy SDNodeFlags in lowerToScalableOp.

Reviewed By: arcbbb

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

2 years ago[RISCV] Copy SDNodeFlags in doPeepholeMaskedRVV and doPeepholeMergeVVMFold
Craig Topper [Fri, 19 Aug 2022 03:42:45 +0000 (20:42 -0700)]
[RISCV] Copy SDNodeFlags in doPeepholeMaskedRVV and doPeepholeMergeVVMFold

Especially the NoFPExcept flag for FP.

Reviewed By: fakepaper56

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

2 years ago[MLIR][normalize-memrefs] Non-normalizable operations with identity map layouts do...
Tung D. Le [Fri, 19 Aug 2022 02:57:20 +0000 (08:27 +0530)]
[MLIR][normalize-memrefs] Non-normalizable operations with identity map layouts do not block normalization of the entire function

The current approach is convervative in which whenever there is a
non-normalizable operations in a function will the function be labelled
as non-normalizable. It means it requires that all operations must have
MemRefsNormalizable trait.

This patch relaxes the requirement that if the memref map layouts of a
non-normalizable operation are identity, this operation does not block
the normalization of the other operations in the same function.

Reviewed By: bondhugula

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

2 years agoRevert "[cmake] Use `CMAKE_INSTALL_LIBDIR` too"
John Ericson [Fri, 19 Aug 2022 02:44:46 +0000 (22:44 -0400)]
Revert "[cmake] Use `CMAKE_INSTALL_LIBDIR` too"

This reverts commit f7a33090a91015836497c75f173775392ab0304d.

Unfortunately this causes a number of failures that didn't show up in my
local build.

2 years ago[Clang][BPF] Support record argument with direct values
Yonghong Song [Thu, 18 Aug 2022 15:01:45 +0000 (08:01 -0700)]
[Clang][BPF] Support record argument with direct values

Currently, record arguments are always passed by reference by allocating
space for record values in the caller. This is less efficient for
small records which may take one or two registers. For example,
for x86_64 and aarch64, for a record size up to 16 bytes, the record
values can be passed by values directly on the registers.

This patch added BPF support of record argument with direct values
for up to 16 byte record size. If record size is 0, that record
will not take any register, which is the same behavior for x86_64
and aarch64. If the record size is greater than 16 bytes, the
record argument will be passed by reference.

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

2 years ago[DAGCombiner] Add use check for VSCALE in visitSUB.
wanglian [Thu, 18 Aug 2022 09:50:44 +0000 (17:50 +0800)]
[DAGCombiner] Add use check for VSCALE in visitSUB.

Reviewed By: david-arm

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

2 years ago[mlir][affine] Option to unroll cleanup loop if smaller trip count.
lewuathe [Thu, 18 Aug 2022 05:28:38 +0000 (14:28 +0900)]
[mlir][affine] Option to unroll cleanup loop if smaller trip count.

Add an option (cleanUpUnroll) to unroll cleanup loop even if the trip count is smaller the unroll factor.

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

2 years ago[AArch64] Enable AdrpAdd fusion for neoverse-n1
Alexander Shaposhnikov [Fri, 19 Aug 2022 00:13:32 +0000 (00:13 +0000)]
[AArch64] Enable AdrpAdd fusion for neoverse-n1

AdrpAdd fusion is already enabled for "generic" and it helps
the linker apply relocation relaxations for more adrp+add pairs.
This patch enables it for -mtune=neoverse-n1.

Differential revision: https://reviews.llvm.org/D132075

2 years agoRevert "[BOLT][NFC] Simplify addRelocation"
Amir Ayupov [Fri, 19 Aug 2022 00:26:26 +0000 (17:26 -0700)]
Revert "[BOLT][NFC] Simplify addRelocation"

This reverts commit 29f23013226097a18ce90c48c9435f324956779b.

This change breaks one of the internal tests.

2 years ago[mlir][linalg] Fix tiling interface implementation offset calculation
Thomas Raoux [Thu, 18 Aug 2022 22:39:29 +0000 (22:39 +0000)]
[mlir][linalg] Fix tiling interface implementation offset calculation

The tiling interface implementation was making assumption on the code
generated by makeTiledShape which were wrong. The ExtractSliceOp create
may be combined with other ExtractSliceOp. To solve that we compute
directly the offset using the new utilities.

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

2 years ago[OpenMP][NFC] Refactor code for interop parts of 'init' and 'append_args' clauses
Mike Rice [Thu, 18 Aug 2022 18:54:52 +0000 (11:54 -0700)]
[OpenMP][NFC] Refactor code for interop parts of 'init' and 'append_args' clauses

The 'init' clause allows an interop-modifier of prefer_type(list) and
and interop-types 'target' and 'targetsync'.

The 'append_args' clause uses an append-op that also includes
interop-types ('target' and 'targetsync') and will allow
a prefer_type list in the next OpenMP version.

This change adds a helper struct OMPInteropInfo and uses it in the parsing
of both the 'init' and 'append_args' clauses.

One OMPInteropInfo object represents the info in a single 'init' clause.
Since 'append_args' allows a variable number of interop items it will
require an array of OMPInteropInfo objects once that is supported.

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

2 years ago[AArch64] Add `foldCSELOfCSEL` combine.
Karl Meakin [Fri, 19 Aug 2022 00:02:59 +0000 (01:02 +0100)]
[AArch64] Add `foldCSELOfCSEL` combine.

This time more conservative.

Differential review: https://reviews.llvm.org/D125504

2 years ago[IR] Use Min behavior for module flag "PIC Level"
Fangrui Song [Thu, 18 Aug 2022 23:28:55 +0000 (16:28 -0700)]
[IR] Use Min behavior for module flag "PIC Level"

Using Max for both "PIC Level" and "PIE Level" is inconsistent. PIC imposes less
restriction while PIE imposes more restriction. The result generally
picks the more restrictive behavior: Min for PIC.

This choice matches `ld -r`: a non-pic object and a pic object merge into a
result which should be treated as non-pic.

To allow linking "PIC Level" using Error/Max from old bitcode files, upgrade
Error/Max to Min.

Reviewed By: tejohnson

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

2 years ago[RISCV] Change how mtune aliases are implemented.
Craig Topper [Thu, 18 Aug 2022 21:39:37 +0000 (14:39 -0700)]
[RISCV] Change how mtune aliases are implemented.

The previous implementation translated from names like sifive-7-series
to sifive-7-rv32 or sifive-7-rv64. This also required sifive-7-rv32
and sifive-7-rv64 to be valid CPU names. As those are not real
CPUs it doesn't make sense to accept them in -mcpu.

This patch does away with the translation and adds sifive-7-series
directly to RISCV.td. Removing sifive-7-rv32 and sifive-7-rv64.
sifive-7-series is only allowed in -mtune.

I've also added "rocket" to RISCV.td but have not removed rocket-rv32
or rocket-rv64.

To prevent -mcpu=sifive-7-series or -mcpu=rocket being used with llc,
I've added a Feature32Bit to all rv32 CPUs. And made it an error to
have an rv32 triple without Feature32Bit. sifive-7-series and rocket
do not have Feature32Bit or Feature64Bit set so the user would need
to provide -mattr=+32bit or -mattr=+64bit along with the -mcpu to
avoid the error.

SiFive no longer names their newer products with 3, 5, or 7 series.
Instead we have p200 series, x200 series, p500 series, and p600 series.
Following the previous behavior would require a sifive-p500-rv32 and
sifive-p500-rv64 in order to support -mtune=sifive-p500-series. There
is currently no p500 product, but it could start getting confusing if
there was in the future.

I'm open to hearing alternatives for how to achieve my main goal
of removing sifive-7-rv32/rv64 as a CPU name.

Reviewed By: reames

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

2 years ago[compiler-rt] Clean up explicit -std=c++17 addition
Shoaib Meenai [Thu, 18 Aug 2022 22:51:14 +0000 (15:51 -0700)]
[compiler-rt] Clean up explicit -std=c++17 addition

This was superseded by 5737f6a527d782e6577e5cc1e0c743df2c98546a. Clean
it up as suggested by Mike Hommey in https://reviews.llvm.org/D131937.

2 years ago[flang][runtime] Catch input error case of missing integer value
Peter Klausler [Sun, 14 Aug 2022 17:29:21 +0000 (10:29 -0700)]
[flang][runtime] Catch input error case of missing integer value

Formatted input allows for an empty numeric input field, which
signifies a zero value, but list-directed and NAMELIST input does
not -- apart from the special case of a NAMELIST array.

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

2 years ago[gn build] Port ad8eb85545c5
LLVM GN Syncbot [Thu, 18 Aug 2022 22:43:34 +0000 (22:43 +0000)]
[gn build] Port ad8eb85545c5

2 years ago[flang][runtime] Handle endian-swapped record headers & footers on input
Peter Klausler [Thu, 18 Aug 2022 16:52:17 +0000 (09:52 -0700)]
[flang][runtime] Handle endian-swapped record headers & footers on input

The runtime I/O library correctly handles endianness conversions on payload
data I/O and on the output of sequential record headers and footers, but
does not swap endianness when required when reading sequential record headers
and footers back in for READ and BACKSPACE statements.  Mea culpa.  Fix.

Fixes https://github.com/llvm/llvm-project/issues/57126

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

2 years ago[flang] Support for character array formats
Peter Klausler [Thu, 18 Aug 2022 17:52:59 +0000 (10:52 -0700)]
[flang] Support for character array formats

A character array can be used as a format in an I/O data transfer
statement, with the interpretation that its elements are concatenated
in element order to constitute the format.

Support in the runtime with an extra optional descriptor argument
to six I/O API calls; support in semantics by removing an earlier
check for a simply contiguous array presented as a format.

Some work needs to be done in lowering to pass a character array
descriptor to the I/O runtime API when present

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

2 years ago[NFC][MLGO] ML Regalloc Priority Advisor
Eric Wang [Thu, 18 Aug 2022 22:27:38 +0000 (15:27 -0700)]
[NFC][MLGO] ML Regalloc Priority Advisor

This patch introduces the priority analysis and the priority advisor,
the default implementation, and the scaffolding for introducing the
other implementations of the advisor.

Reviewed By: mtrofin

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

2 years ago[flang] Accept a null pointer as a NULL(MOLD=...) actual argument
Peter Klausler [Thu, 18 Aug 2022 17:50:53 +0000 (10:50 -0700)]
[flang] Accept a null pointer as a NULL(MOLD=...) actual argument

The MOLD= argument to NULL() is allowed to be a null pointer itself --
for example, NULL(MOLD=NULL(MOLD=...)) should not raise spurious semantic
errors.

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

2 years ago[flang] Improve error message for attempted assignment to a procedure
Peter Klausler [Wed, 17 Aug 2022 19:17:41 +0000 (12:17 -0700)]
[flang] Improve error message for attempted assignment to a procedure

Emit a "Assignment to procedure 'foo' is not allowed" error message
for more cases of 'foo' than just declaraed subprograms, rather than
assuming that those additional cases were named constants.

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

2 years ago[flang] Use naive algorithm for folding complex division when it doesn't over/underflow
Peter Klausler [Wed, 17 Aug 2022 18:34:20 +0000 (11:34 -0700)]
[flang] Use naive algorithm for folding complex division when it doesn't over/underflow

f18 unconditionally uses a scaling algorithm for complex/complex division
that avoids needless overflows and underflows when computing the sum of
the squares of the components of the denominator -- but testing has shown
some 1 ULP differences relative to the naive calculation due to the
extra operations and roundings.  So use the scaling algorithm only when
the naive calculation actually would overflow or underflow.

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

2 years ago[flang] Be more persistent in search for non-intrinsic module file
Peter Klausler [Tue, 16 Aug 2022 21:16:29 +0000 (14:16 -0700)]
[flang] Be more persistent in search for non-intrinsic module file

When a particular module name has been brought into a compilation
as an intrinsic module via USE,INTRINSIC, perhaps indirectly via
an enclosing USE statement, f18 will resolve later USE statements
to it unless they are USE,NON_INTRINSIC.  This is not entirely
correct -- a bare USE statement for a module name that happens to
match that of an intrinsic module should still search the search
paths for a non-intrinsic module file of the same name.

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

2 years ago[flang] Avoid spurious error message in function result compatibility
Peter Klausler [Thu, 18 Aug 2022 17:44:50 +0000 (10:44 -0700)]
[flang] Avoid spurious error message in function result compatibility

When checking function interface compatibility for procedure pointer
assignment/initialization or actual/dummy procedure association, don't
emit a diagnositic about function result shape incompatibility unless
the interfaces differ in rank or have distinct constant extents on a
dimension.  Function results whose dimensions are determined by dummy
arguments or host-associated variables are not necessarily incompatible.

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

2 years ago[flang] Compile-time checks for shape conformance on assignments
Peter Klausler [Mon, 15 Aug 2022 20:24:46 +0000 (13:24 -0700)]
[flang] Compile-time checks for shape conformance on assignments

Assignment statements need to check for array shape conformance
errors that are discernable at compilation time.

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

2 years ago[flang][runtime] Don't raise internal error in user error recovery situation
Peter Klausler [Sun, 14 Aug 2022 17:49:19 +0000 (10:49 -0700)]
[flang][runtime] Don't raise internal error in user error recovery situation

In the case of a data transfer I/O statement with an illegal unit number and
error recovery, ensure that data transfer API calls don't raise internal
errors due to the I/O statement representation unexpectedly being something
other than a data transfer statement.

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

2 years ago[libc++] Implement `operator<=>` for `filesystem::directory_entry`
Adrian Vogelsgesang [Sun, 31 Jul 2022 22:57:10 +0000 (15:57 -0700)]
[libc++] Implement `operator<=>` for `filesystem::directory_entry`

Implements part of P1614R2 "The Mothership has Landed"

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

2 years ago[flang][runtime] Fix error message
Peter Klausler [Sun, 14 Aug 2022 17:02:30 +0000 (10:02 -0700)]
[flang][runtime] Fix error message

A literal % character in an error message needs to be doubled
so that it appears in the output of snprintf().

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

2 years ago[flang][runtime] Catch input error on missing NAMELIST scalar
Peter Klausler [Sun, 14 Aug 2022 16:56:31 +0000 (09:56 -0700)]
[flang][runtime] Catch input error on missing NAMELIST scalar

While a NAMELIST input group item for an array can have fewer
values than expected, or none, an input group item for a scalar
must have a value.

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

2 years ago[flang][runtime] Fix return value for MINVAL/MAXVAL for CHARACTER(kind > 1)
Peter Klausler [Thu, 18 Aug 2022 17:31:13 +0000 (10:31 -0700)]
[flang][runtime] Fix return value for MINVAL/MAXVAL for CHARACTER(kind > 1)

CharacterExtremumAccumulator::GetResult() needs to use byte counts, not wide
character counts, when calling memcpy() & memset().

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

2 years ago[flang] Fold SPACING() correctly when result is subnormal
Peter Klausler [Fri, 12 Aug 2022 20:20:08 +0000 (13:20 -0700)]
[flang] Fold SPACING() correctly when result is subnormal

The intrinsic function SPACING() was being folded to the smallest
normal number (TINY(x)) rather than to a smaller subnormal result
when that result really was subnormal.

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

2 years ago[gn build] Port 0ac597f3cacf
LLVM GN Syncbot [Thu, 18 Aug 2022 21:18:53 +0000 (21:18 +0000)]
[gn build] Port 0ac597f3cacf

2 years ago[flang] Legacy extension intrinsic functions IMAG, IZEXT, JZEXT
Peter Klausler [Fri, 12 Aug 2022 19:28:44 +0000 (12:28 -0700)]
[flang] Legacy extension intrinsic functions IMAG, IZEXT, JZEXT

Support these legacy extension intrinsic functions with unambiguous
semantics in those existing compilers that support them by means
of recognizing them as aliases for standard intrinsics (IMAG) or
with simple rewrites (IZEXT, JZEXT).  Note that ZEXT has different
semantics in different existing compilers, so we will not support it
due to lack of a broad unambiguous precedent.

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

2 years ago[InstCombine] fold bitwise logic or+or+xor+not
Sanjay Patel [Thu, 18 Aug 2022 19:26:32 +0000 (15:26 -0400)]
[InstCombine] fold bitwise logic or+or+xor+not

(~A | C) | (A ^ B) --> ~(A & B) | C
https://alive2.llvm.org/ce/z/Qw3aiJ

This extends the existing fold (just above the new match)
to peek through another 'or' instruction.

This should let the motivating case from issue #57174
simplify completely.

2 years ago[InstCombine] add tests for or-xor-not patterns; NFC
Sanjay Patel [Thu, 18 Aug 2022 17:58:17 +0000 (13:58 -0400)]
[InstCombine] add tests for or-xor-not patterns; NFC

2 years ago[libc++] Implement `operator<=>` for `filesystem::path`
Adrian Vogelsgesang [Sun, 31 Jul 2022 22:21:01 +0000 (15:21 -0700)]
[libc++] Implement `operator<=>` for `filesystem::path`

Implements part of P1614R2 "The Mothership has Landed"

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

2 years ago[llvm] Remove std::clamp equivalent in `Transforms/Utils/MisExpect.cpp`
Joe Loser [Mon, 15 Aug 2022 03:14:18 +0000 (21:14 -0600)]
[llvm] Remove std::clamp equivalent in `Transforms/Utils/MisExpect.cpp`

Use `std::clamp` directly from the standard library now that LLVM is built with
C++17 standards mode.

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

2 years ago[flang][runtime] Improve Fortran I/O behavior when main program is C/C++
Peter Klausler [Fri, 12 Aug 2022 00:16:10 +0000 (17:16 -0700)]
[flang][runtime] Improve Fortran I/O behavior when main program is C/C++

Ensure that I/O buffers are flushed at the end of the program,
and properly detect ttys for predefined units so that Fortran
output is interspersed with output from non-Fortran code.

Fixes https://github.com/llvm/llvm-project/issues/56944

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

Update: fix typo in comment

2 years ago[NFC] Move DXC driver tests
Chris Bieneman [Thu, 18 Aug 2022 20:22:04 +0000 (15:22 -0500)]
[NFC] Move DXC driver tests

The DXC driver tests don't really belong mixed in with the toolchain
tests. This pulls them out to their own file and moves the
SimpleDiagnosticConsumer into a header so it can be used by both DXC and
toolchain tests.

fast-forwarded.

2 years ago[clang][test] Recognize leading unscore for macos
Alex Brachet [Thu, 18 Aug 2022 21:02:35 +0000 (21:02 +0000)]
[clang][test] Recognize leading unscore for macos

Additionally mark this test unsupported for ps5 in addition
to ps4, niether support -fuse-ld=

2 years ago[Hexagon] Add defaulted operator= to classes with defaulted copy ctor
Krzysztof Parzyszek [Thu, 18 Aug 2022 20:50:20 +0000 (13:50 -0700)]
[Hexagon] Add defaulted operator= to classes with defaulted copy ctor

This avoids deprecation warning:
```
warning: definition of implicit copy assignment operator for 'AddrInfo'
is deprecated because it has a user-declared copy constructor
[-Wdeprecated-copy]
```

This fixes https://github.com/llvm/llvm-project/issues/57229

2 years ago[libc++] Make <ranges> non-experimental
Louis Dionne [Thu, 18 Aug 2022 18:06:40 +0000 (14:06 -0400)]
[libc++] Make <ranges> non-experimental

When we ship LLVM 16, <ranges> won't be considered experimental anymore.
We might as well do this sooner rather than later.

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

2 years ago[flang][runtime] Improve error message for incompatible MATMUL arguments
Peter Klausler [Fri, 12 Aug 2022 16:17:09 +0000 (09:17 -0700)]
[flang][runtime] Improve error message for incompatible MATMUL arguments

Print the full shapes of both argument when the dimensions that must
match do not do so.

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