platform/upstream/llvm.git
19 months agoRevert "[clang-format] Add a space between an overloaded operator and '>'"
Kadir Cetinkaya [Mon, 20 Mar 2023 06:51:49 +0000 (07:51 +0100)]
Revert "[clang-format] Add a space between an overloaded operator and '>'"

This reverts commit b05dc1b8766a47482cae432011fd2faa04c83a3e.

Makes clang-format crash on `struct Foo { operator enum foo{} };`

19 months ago[RFC][X86][MemFold] Upgrade the mechanism of auto-generated Memory Folding Table
Bing1 Yu [Mon, 20 Mar 2023 05:48:01 +0000 (13:48 +0800)]
[RFC][X86][MemFold] Upgrade the mechanism of auto-generated Memory Folding Table

1. Align ManualMapSet with X86MemoryFoldTableEntry instead of using UnfoldStrategy
2. ManualMapSet able to update the existing record in auto-generated MemFold table

Reviewed By: skan

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

19 months ago[GuardWidening] Improve analysis of potential widening into hotter block
Max Kazantsev [Mon, 20 Mar 2023 05:38:37 +0000 (12:38 +0700)]
[GuardWidening] Improve analysis of potential widening into hotter block

There is a piece of logic in GuardWidening which is very limited, and it happens
to ignore implicit control flow, therefore it "works fine" with guards expressed as
intrinsic calls. However, when the guards are represented as branches, its limitations
create a lot of trouble.

The intent here is to make sure that we do not widen code across complex CFG,
so that it can end up being in hotter code than it used to be. The old logic was limited
to unique immediate successor and that's it.

This patch changes the logic there to work the following way: when we need to check
if we can widen from `DominatedBlock` into `DominatingBlock`, we first try to find the
lowest (by CFG) transitive successor  of `DominatingBlock` which is guaranteed to not
be significantly colder than the `DominatingBlock`. It means that every time we move
to either:

- Unique successor of the current block, if it only has one successor;
- The only taken successor, if the current block ends with `br(const)`;
- If one of successors ends with deopt, another one is taken;

If the lowest block we can find this way is the `DominatedBlock`, then it is safe to assume
that this widening won't move the code into a hotter location.

I did not touch the existing check with PDT. It looks fishy to me (post-dominance doesn't
really guarantee anything about hotness), but let's keep it as is and maybe fix later.

With this patch, Guard Widening can widen explicitly expressed branches across more than one
dominating guard if it's profitable.

Differential Revision: https://reviews.llvm.org/D146276
Reviewed By: skatkov

19 months ago[LICM] Do not hoist widenable conditions
Max Kazantsev [Mon, 20 Mar 2023 05:02:22 +0000 (12:02 +0700)]
[LICM] Do not hoist widenable conditions

Despite the fact that it is legal, it is not profitable. It may prevent
Loop Guard Widening to happen. Because of bug described at
https://github.com/llvm/llvm-project/issues/60234, now the guard widening is
only possible when condtion we want to add is available at the point of the
widenable_condition() of dominating guard. It means that, if all such calls are
hoisted out of loop, and the loop conditions depend on loop-variants, we cannot
widen. Hoisting is otherwise not helpful, because it does not introduce any
optimization opportunities.

Differential Revision: https://reviews.llvm.org/D146274
Reviewed By: apilipenko

19 months ago[AMDGPU] Add release note for ommited barrier waitcnt
Austin Kerbow [Sat, 18 Mar 2023 06:39:25 +0000 (23:39 -0700)]
[AMDGPU] Add release note for ommited barrier waitcnt

Reviewed By: arsenm

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

19 months ago[NFC] [C++20] [Modules] Add test for #pragma once
Chuanqi Xu [Mon, 20 Mar 2023 03:37:06 +0000 (11:37 +0800)]
[NFC] [C++20] [Modules] Add test for #pragma once

Close https://github.com/llvm/llvm-project/issues/38554
Close https://github.com/llvm/llvm-project/issues/58532

It looks like we can workaround the '#pragma once' problem automatically
after we force the lazily loading for named modules. Add a test to show
this.

19 months ago[ORC] Use ExecutorAddr instead of JITTargetAddress in JITDylib symbol table.
Lang Hames [Mon, 20 Mar 2023 00:31:52 +0000 (17:31 -0700)]
[ORC] Use ExecutorAddr instead of JITTargetAddress in JITDylib symbol table.

Update JITDylib's symbol table entry struct to use the newer ExecutorAddr type.

19 months ago[IRSim] Treat Branch OperVals different from regular operands to ensure correct ordering
Andrew Litteken [Sun, 2 Oct 2022 17:33:03 +0000 (12:33 -0500)]
[IRSim] Treat Branch OperVals different from regular operands to ensure correct ordering

Branch operands are different from regular instructions. They can have a mix of boolean values and branch instructions. This makes sure that branches are treated as more of a special case and makes sure that the successor blocks are always in the same order, and that they do not include the conditional argument.

Reviewer: paquette
Differential Revision: https://reviews.llvm.org/D139337

19 months ago[CGSCC] Allow creation of no-rerun CGSCC->function adaptor via textual pipeline
Arthur Eubanks [Thu, 2 Mar 2023 22:47:46 +0000 (14:47 -0800)]
[CGSCC] Allow creation of no-rerun CGSCC->function adaptor via textual pipeline

Reviewed By: asbirlea

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

19 months agoRevert "[ORC] Introduce SetUpExecutorNativePlatform utility."
Lang Hames [Sun, 19 Mar 2023 22:50:44 +0000 (15:50 -0700)]
Revert "[ORC] Introduce SetUpExecutorNativePlatform utility."

This reverts commit bdf5f9c3228d6ed1d7c6f87b3828a7d573b34c03, which was a work
in progress for https://reviews.llvm.org/D144276 and accidentally committed
early.

19 months agoRevert "[SimplifyCFG] Check if the return instruction causes undefined behavior"
DianQK [Sun, 19 Mar 2023 22:42:19 +0000 (06:42 +0800)]
Revert "[SimplifyCFG] Check if the return instruction causes undefined behavior"

This reverts commit b6a0be8ce3114d0c57e7a7d6c3c222986ca506ad.

19 months agoRevert "[SimplifyCFG] Improve the precision of `PtrValueMayBeModified`"
DianQK [Sun, 19 Mar 2023 22:42:07 +0000 (06:42 +0800)]
Revert "[SimplifyCFG] Improve the precision of `PtrValueMayBeModified`"

This reverts commit f890f010f6a70addbd885acd0c8d1b9578b6246f.

19 months ago[ORC] Introduce SetUpExecutorNativePlatform utility.
Lang Hames [Sun, 19 Mar 2023 22:27:46 +0000 (15:27 -0700)]
[ORC] Introduce SetUpExecutorNativePlatform utility.

Simplifies the process of building an LLJIT instance that supports the native
platform features (initializers, TLV, etc.).

SetUpExecutorNativePlatform can be passed to LLJITBuilder::setPlatformSetUp
method. It takes a reference to the ORC runtime (as a path or an in-memory
archive) and automatically sets the platform for LLJIT's ExecutionSession based
on the executor process's triple.

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

19 months agollvm/test/TableGen/intrinsic-*.td: Use Intrinsics.td instead of mock
NAKAMURA Takumi [Tue, 14 Mar 2023 13:37:08 +0000 (22:37 +0900)]
llvm/test/TableGen/intrinsic-*.td: Use Intrinsics.td instead of mock

- `intrinsic-pointer-to-any.td`
- `intrinsic-varargs.td`

They used their own mock.

I have introduced `TEST_INTRINSICS_SUPPRESS_DEFS` in `Intrinsics.td`.
Tests of intrinsics may use it.

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

19 months ago[clang-format] Fix non-case colons in Verilog case lines
sstwcw [Sun, 19 Mar 2023 21:32:44 +0000 (21:32 +0000)]
[clang-format] Fix non-case colons in Verilog case lines

Back in D128714, we should have replaced the old rule about colons when
we added the new one.  Because we didn't, all colons got mistaken as
case colons as long as the line began with `case` or `default`.  Now we
remove the rule that we forgot to remove.

Reviewed By: MyDeveloperDay, rymiel

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

19 months ago[GlobalOpt] Collect initializer when building GlobalPart.
Florian Hahn [Sun, 19 Mar 2023 20:47:59 +0000 (20:47 +0000)]
[GlobalOpt] Collect initializer when building GlobalPart.

Update the code to collect the initializer when collecting the types for
a global, as suggested by @nikic in D144476.

This replaces code which bailed out if *any* part doesn't have an
initializer with a continue to just skip parts which don't have an
initializer.

Depends on D145489.

Reviewed By: nikic

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

19 months ago[InstCombine] Precommit tests
Kazu Hirata [Sun, 19 Mar 2023 20:44:43 +0000 (13:44 -0700)]
[InstCombine] Precommit tests

This patch precommits tests for:

https://github.com/llvm/llvm-project/issues/60802

19 months ago[libc++] Change linkage for some functions.
Mark de Wever [Sun, 19 Mar 2023 17:06:47 +0000 (18:06 +0100)]
[libc++] Change linkage for some functions.

Internal linkages fails when building libc++ with modules. Using
internal linkage is headers seems questionable to change the linkage.

Reviewed By: #libc, philnik

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

19 months ago[libc++] Assert that lengths fit in difference_type
David Benjamin [Sun, 19 Mar 2023 17:41:04 +0000 (18:41 +0100)]
[libc++] Assert that lengths fit in difference_type

This can help flag accidentally passing in negative values into the  `string_view` constructor. This aligns with a similar check in `absl::string_view`.

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

Reviewed By: #libc, Mordante

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

19 months ago[libc++][test] Adds a missing include.
Mark de Wever [Sun, 19 Mar 2023 17:03:25 +0000 (18:03 +0100)]
[libc++][test] Adds a missing include.

19 months ago[libc++] Inline small constructors into basic_string
Nikolas Klauser [Wed, 22 Feb 2023 19:11:03 +0000 (20:11 +0100)]
[libc++] Inline small constructors into basic_string

This allows the compiler to inline the constructors.

Reviewed By: ldionne, #libc

Spies: mikhail.ramalho, libcxx-commits

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

19 months ago[C++2x][Modules] Amend module purview constant linkage [P2788R0].
Iain Sandoe [Sun, 12 Mar 2023 20:45:26 +0000 (20:45 +0000)]
[C++2x][Modules] Amend module purview constant linkage [P2788R0].

This paper has been applied to the working draft and is believed to be
a DR against C++20, so that the patch here makes the change unconditionally.

for:
```
export module A;

const int mod_cst = 10;
```
Before the change, mod_cst would have internal linkage; after the change it
has module linkage.

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

19 months ago[Flang][RISCV] Fix 9f93b71f20ea
Shao-Ce SUN [Sun, 19 Mar 2023 15:25:52 +0000 (23:25 +0800)]
[Flang][RISCV] Fix 9f93b71f20ea

19 months ago[libc++][NFC] Clean up the ABI changelog
Louis Dionne [Sun, 19 Mar 2023 14:35:20 +0000 (10:35 -0400)]
[libc++][NFC] Clean up the ABI changelog

Fix a few typos and remove TODOs

19 months ago[libc++][Apple] Update availability markup for std::to_chars(floating-point)
Louis Dionne [Sat, 18 Mar 2023 20:46:54 +0000 (16:46 -0400)]
[libc++][Apple] Update availability markup for std::to_chars(floating-point)

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

19 months ago[libc++] Remove C++03 extensions for std::allocator_arg & friends
Louis Dionne [Mon, 6 Mar 2023 20:43:26 +0000 (15:43 -0500)]
[libc++] Remove C++03 extensions for std::allocator_arg & friends

As explained in the release note, libc++ used to provide various
global variables as an extension in C++03 mode. Unfortunately, that
made our definition non-conforming in all standard modes. This was
never a big problem until recently, since we are trying to support
C++20 Modules in libc++, and that requires cleaning up the definition
of these variables.

This change is the first in a series of changes to achieve our end goal.
This patch removes the ability for users to rely on the (incorrect)
definition of those global variables inside the shared library. The
plan is to then remove those definitions from the shared library
(which is an ABI break but I don't think it will have impact), and
finally to make our definition of those variables conforming in all
standard modes.

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

19 months ago[sancov] fix coverage-report-server cannot display coverage detail
Congcong Cai [Sun, 19 Mar 2023 13:08:37 +0000 (21:08 +0800)]
[sancov] fix coverage-report-server cannot display coverage detail

This patch make following change for coverage-report-server.py
- using uri `./{name}` from root in the old version python http.server can be handled as `//{name}`. But due to https://github.com/python/cpython/pull/93879, it will be handled as `/{name}` now.

So I want to use a prefix to avoid double slashes issue.

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

19 months ago[runtimes] Don't use -Wall on clang-cl builds
Nikolas Klauser [Sun, 19 Mar 2023 09:15:14 +0000 (10:15 +0100)]
[runtimes] Don't use -Wall on clang-cl builds

`-Wall` on clang-cl is equivalent to `-Weverything` on clang. We already add the correct warning flag depending whether we are in an MSVC-like environment, so just remove it from the list of flags that get passed unconditionally.

Spies: libcxx-commits

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

19 months ago[libcxxabi][Demangle] Don't drop ctor/dtor name for abi-tagged structures
Michael Buch [Tue, 7 Mar 2023 13:18:07 +0000 (13:18 +0000)]
[libcxxabi][Demangle] Don't drop ctor/dtor name for abi-tagged structures

Before this patch we would demangle abi-tagged structures as follows:
```
$ c++filt -n _ZN1SB5OuterC2Ev
S[abi:Outer]:()

$ c++filt -n _ZN1SB5OuterD2Ev
S[abi:Outer]::~()
```

This is because `Node::getBaseName` was unimplemented for the
`AbiTagAttr` node, which meant that when we tried printing `CtorDtorName`
where its `Basename` `Node` was an `AbiTagAttr`, we'd drop the
name.

Addresses https://github.com/llvm/llvm-project/issues/61213

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

19 months ago[llvm][Demangle][NFC] Sync latest libcxxabi/demangle
Michael Buch [Thu, 9 Mar 2023 16:10:00 +0000 (16:10 +0000)]
[llvm][Demangle][NFC] Sync latest libcxxabi/demangle

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

19 months ago[libc++] Granularize <exception> includes
Nikolas Klauser [Wed, 1 Mar 2023 19:49:22 +0000 (20:49 +0100)]
[libc++] Granularize <exception> includes

Reviewed By: ldionne, #libc

Spies: mikhail.ramalho, smeenai, libcxx-commits

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

19 months ago[libc++][NFC] Refactor the __enable_ifs in <string>
Nikolas Klauser [Wed, 22 Feb 2023 17:01:23 +0000 (18:01 +0100)]
[libc++][NFC] Refactor the __enable_ifs in <string>

This changes all `__enable_if`s inside `<string>` to a common pattern. Specifically, it's always inside the `template <>` and uses the `, int> = 0` style.

Reviewed By: ldionne, #libc

Spies: mikhail.ramalho, EricWF, libcxx-commits

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

19 months ago[libc++abi] Improve performance of __dynamic_cast
Sirui Mu [Sun, 19 Mar 2023 09:03:38 +0000 (10:03 +0100)]
[libc++abi] Improve performance of __dynamic_cast

The original `__dynamic_cast` implementation does not use the ABI-provided `src2dst_offset` parameter which helps improve performance on the hot paths. This patch improves the performance on the hot paths in `__dynamic_cast` by leveraging hints provided by the `src2dst_offset` parameter. This patch also includes a performance benchmark suite for the `__dynamic_cast` implementation.

Reviewed By: philnik, ldionne, #libc, #libc_abi, avogelsgesang

Spies: mikhail.ramalho, avogelsgesang, xingxue, libcxx-commits

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

19 months ago[compiler-rt] Add missing #else clause to fix the build on NetBSD.
Frederic Cambus [Sun, 19 Mar 2023 08:44:55 +0000 (09:44 +0100)]
[compiler-rt] Add missing #else clause to fix the build on NetBSD.

An #elif SANITIZER_SOLARIS clause was removed in D120048, but it also
removed the #else clause for the error fallback, causing the build to
fail on NetBSD.

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

19 months ago[clangd] Fix test failure in SemanticHighlighting.GetsCorrectTokens
Nathan Ridge [Sun, 19 Mar 2023 08:43:24 +0000 (04:43 -0400)]
[clangd] Fix test failure in SemanticHighlighting.GetsCorrectTokens

19 months ago[clangd] Avoid recursion on UnresolvedUsingValueDecl during semantic highlighting
Nathan Ridge [Wed, 28 Sep 2022 19:57:56 +0000 (09:57 -1000)]
[clangd] Avoid recursion on UnresolvedUsingValueDecl during semantic highlighting

Fixes https://github.com/clangd/clangd/issues/1313

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

19 months ago[Sanitizer] [Scudo] Add riscv64 support for scudo
Jun Sha (Joshua) [Sun, 19 Mar 2023 06:37:46 +0000 (23:37 -0700)]
[Sanitizer] [Scudo] Add riscv64 support for scudo

Enable Scudo on RISCV64 on both clang side and compiler-rt side.

Reviewers: cryptoad, eugenis, vitalybuka, luismarques, hiraditya

Reviewed By: vitalybuka, luismarques
Differential Revision: https://reviews.llvm.org/D137397

19 months ago[clang-tidy] readability-identifier-naming: fix hungarian enum prefix in C
Alexis Murzeau [Sun, 19 Mar 2023 06:22:14 +0000 (06:22 +0000)]
[clang-tidy] readability-identifier-naming: fix hungarian enum prefix in C

When checking a C file, enum tags are of type `int` instead of the enum
type as in C++.
So the checker was using `i` as the prefix for enum tags instead of main
letters of the enum type name (for example `rt` for `enum REV_TYPE`).

This commit fixes this divergence and makes the behavior the same between
C and C++ files.

For example, `enum REV_TYPE { rtRevValid };` won't be reported as badly
named when in a C file. Previously, it would have proposed a rename to
`iRevValid`.

This commit also add a file to test the hungarian notation checker with C
files.
The test file was made from identifier-naming-hungarian-notation.cpp
with C++-only features removed.

Reviewed By: carlosgalvezp

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

19 months ago[SVE] Add patterns for shift intrinsics with FalseLanesZero mode
lizhijin [Sun, 19 Mar 2023 05:43:01 +0000 (13:43 +0800)]
[SVE] Add patterns for shift intrinsics with FalseLanesZero mode

This patch adds patterns to reduce redundant mov and sel instructions
for shift intrinsics with FalseLanesZero mode, when
FeatureExperimentalZeroingPseudosis supported.

For example, before:

mov     z1.b, #0
sel     z0.b, p0, z0.b, z1.b
asr     z0.b, p0/m, z0.b, #7
After:

movprfx z0.b, p0/z, z0.b
asr     z0.b, p0/m, z0.b, #7

Reviewed By: paulwalker-arm
Differential Revision: https://reviews.llvm.org/D145551

19 months ago[JITLink][ELF] Don't skip debug info sections by default.
Lang Hames [Sun, 19 Mar 2023 05:34:07 +0000 (22:34 -0700)]
[JITLink][ELF] Don't skip debug info sections by default.

By default ELFLinkGraphBuilder will now create LinkGraph sections with NoAlloc
lifetime for debug info sections in the original object. Debug sections are not
kept alive by default, and will be dead-stripped unless some plugin marks them
as live in the pre-prune phase.

19 months ago[JITLink][ELF][x86-64] Add support for R_X86_64_32 relocation.
Lang Hames [Sun, 19 Mar 2023 03:00:03 +0000 (20:00 -0700)]
[JITLink][ELF][x86-64] Add support for R_X86_64_32 relocation.

19 months ago[gn] Fix libunwind build on mac after 203b6f31bb7
Nico Weber [Sat, 18 Mar 2023 21:19:41 +0000 (22:19 +0100)]
[gn] Fix libunwind build on mac after 203b6f31bb7

See #61501 and https://reviews.llvm.org/D143637#4204277 for details.

19 months ago[gn build] Port f7efcaca77d8
LLVM GN Syncbot [Sat, 18 Mar 2023 20:31:42 +0000 (20:31 +0000)]
[gn build] Port f7efcaca77d8

19 months ago[gn build] Port 787fbad57e05
LLVM GN Syncbot [Sat, 18 Mar 2023 20:31:41 +0000 (20:31 +0000)]
[gn build] Port 787fbad57e05

19 months ago[gn build] Port 65f7ebe72e4c
LLVM GN Syncbot [Sat, 18 Mar 2023 20:31:40 +0000 (20:31 +0000)]
[gn build] Port 65f7ebe72e4c

19 months ago[VPlan] Move createReplicateRegion out of VPRecipeBuilder.h. (NFC)
Florian Hahn [Sat, 18 Mar 2023 20:30:48 +0000 (20:30 +0000)]
[VPlan] Move createReplicateRegion out of VPRecipeBuilder.h. (NFC)

The function doesn't use anything from VPRecipeBuilder, so move the
definition to where it is actually used and turn it into a simple static
function.

It also makes the VPRecipeBuilder argument for createAndOptimizeReplicateRegions
unnecessary.

19 months ago[NFC][AIX][PGO] Create AIX specific compiler-rt profile file.
Wael Yehia [Sat, 18 Mar 2023 02:50:48 +0000 (22:50 -0400)]
[NFC][AIX][PGO] Create AIX specific compiler-rt profile file.

19 months ago[libc++][Apple] Make sure to set the LIBCXX_LIBRARY_VERSION when building for Apple
Louis Dionne [Sat, 18 Mar 2023 16:10:31 +0000 (12:10 -0400)]
[libc++][Apple] Make sure to set the LIBCXX_LIBRARY_VERSION when building for Apple

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

19 months ago[libc++][Apple] Make sure we install libc++experimental.a
Louis Dionne [Sat, 18 Mar 2023 15:57:24 +0000 (11:57 -0400)]
[libc++][Apple] Make sure we install libc++experimental.a

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

19 months ago[gn] merge e46d8a731535 more
Nico Weber [Sat, 18 Mar 2023 20:19:27 +0000 (21:19 +0100)]
[gn] merge e46d8a731535 more

19 months ago[gn] merge e46d8a731535
Nico Weber [Sat, 18 Mar 2023 20:17:49 +0000 (21:17 +0100)]
[gn] merge e46d8a731535

19 months agoRevert "Reland "[CMake] Bumps minimum version to 3.20.0.""
Mark de Wever [Sat, 18 Mar 2023 19:32:43 +0000 (20:32 +0100)]
Revert "Reland "[CMake] Bumps minimum version to 3.20.0.""

This reverts commit a72165e5df59032cdd54dcb18155f2630d73abd1.

Some buildbots have not been updated yet.

19 months ago[lldb] Introduce SymbolFile::ParseAllLanguages
Augusto Noronha [Thu, 16 Mar 2023 22:51:34 +0000 (15:51 -0700)]
[lldb] Introduce SymbolFile::ParseAllLanguages

SymbolFile::ParseAllLanguages allows collecting the languages of the
extra compile units a SymbolFileDWARFDebugMap may have, which can't
be accessed otherwise. For every other symbol file type, it should
behave exactly the same as ParseLanguage.

rdar://97610458

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

19 months ago[LV] Restructure code creating replicate region (NFC).
Florian Hahn [Sat, 18 Mar 2023 17:17:07 +0000 (17:17 +0000)]
[LV] Restructure code creating replicate region (NFC).

Re-order recipe and block creation to be in order, as suggested
post-commit for 2db71c9851e5.

19 months agoRe-apply "[JITLink][ORC] Rename MemDeallocPolicy to MemLifetime..." with fixes.
Lang Hames [Fri, 17 Mar 2023 21:57:15 +0000 (14:57 -0700)]
Re-apply "[JITLink][ORC] Rename MemDeallocPolicy to MemLifetime..." with fixes.

This reapplies 2cc64df0bd6a802eab592dbc282463c3e4a4281c, which was reverted in
5379c46d490640bfa80283e00240b6f1006092b4 due to bot failures.

The new patch contains fixes to ELFLinkGraphBuilder.h to better handle
non-SHT_ALLOC sections (these were being accidentally skipped in the previous
patch), and to skip SHT_NULL sections.

19 months ago[clang-tidy] Fixed an issue in readability-identifier-naming not using options specified.
Nathan James [Sat, 18 Mar 2023 15:53:32 +0000 (15:53 +0000)]
[clang-tidy] Fixed an issue in readability-identifier-naming not using options specified.

Fixed an issue where specifying empty strings for prefix or suffix would be ignored preventing using those to override a different style.

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

Reviewed By: carlosgalvezp

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

19 months agoReland "[CMake] Bumps minimum version to 3.20.0."
Mark de Wever [Sat, 18 Mar 2023 12:33:42 +0000 (13:33 +0100)]
Reland "[CMake] Bumps minimum version to 3.20.0."

This reverts commit 92523a35a827539db8557bbc3ecab7f9ea3f6ade.

Test whether all CI runners are updated.

19 months ago[clang-tidy] Fix minor bug in bugprone-too-small-loop-variable
Piotr Zegar [Sat, 18 Mar 2023 10:44:11 +0000 (10:44 +0000)]
[clang-tidy] Fix minor bug in bugprone-too-small-loop-variable

Correct issue when incorrectly matched bitfield loop
variable would still be considered valid and equal to
base type, because check didnt compare size of bitfield.

Fixes issue introduced in: D142587

Reviewed By: carlosgalvezp

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

19 months ago[gn] port d60d3455eb2b
Nico Weber [Sat, 18 Mar 2023 09:13:31 +0000 (10:13 +0100)]
[gn] port d60d3455eb2b

19 months ago[RISCV] Use 'unsigned' for XLen in RISCVTargetDefEmitter.cpp. NFC
Craig Topper [Sat, 18 Mar 2023 07:41:03 +0000 (00:41 -0700)]
[RISCV] Use 'unsigned' for XLen in RISCVTargetDefEmitter.cpp. NFC

The values are small so the difference doesn't matter, but the
consuming function is defined to take 'unsigned'.

19 months ago[AMDGPU] Reserve extra SGPR blocks wth XNACK "any" TID Setting
Austin Kerbow [Mon, 6 Mar 2023 18:10:14 +0000 (10:10 -0800)]
[AMDGPU] Reserve extra SGPR blocks wth XNACK "any" TID Setting

ASMPrinter was relying on feature bits to setup extra SGRPs in the knerel
descriptor for the xnack_mask. This was broken for the dynamic XNACK "any" TID
setting which could cause user SGPRs to be clobbered if the number of SGPRs
reserved was near a granulated block boundary.

When XNACK was enabled this worked correctly in the ASMParser which meant some
kernels were only failing without "-save-temps".

Fixes: SWDEV-382764

Reviewed By: kzhuravl

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

19 months ago[JITLink] Store Sections in a DenseMap with the section name as key.
Lang Hames [Sat, 18 Mar 2023 03:14:11 +0000 (20:14 -0700)]
[JITLink] Store Sections in a DenseMap with the section name as key.

This speeds up section lookup by name.

This change was motivated by poor performance of a testcase while trying to fix
the NoAlloc lifetime patch that was originally landed as 2cc64df0bd6. The
NoAlloc lifetime patch causes ELF non-SHF_ALLOC sections to be given a JITLink
Section (previously they were skipped), and the
llvm/test/ExecutionEngine/JITLink/X86/ELF_shndex.s testcase creates > 64k
non-SHF_ALLOC sections, each of which now needs to be checked to ensure that its
name does not clash. Moving to a DenseMap allows us to implement this check
efficiently.

19 months ago[WebAssembly] Support debug info for TLS + global in PIC mode
Heejin Ahn [Thu, 2 Mar 2023 06:53:51 +0000 (22:53 -0800)]
[WebAssembly] Support debug info for TLS + global in PIC mode

This adds debug info support for
- `thread_local` global variables, both in non-PIC and PIC modes
- (non-thread_local) Global variables in PIC mode

The former needs to read the value from an offset relative to
`__tls_base` and the latter an offset from `__memory_base`. The code for
doing this overlaps with some of the existing code to add
`__stack_pointer` global, so this adds a new member function to add a
a global in `TI_GLOBAL_RELOC` mode and use it in all three places.

Split DWARF support is currently patchy at best, because the index for
`__tls_base` is not fixed after dynamic linking. The preexisting split
DWARF support for `__stack_pointer` relies on that in practice it is
always index 0. This does similar hardcoding for `__tls_base` and
`__memory_base`, but `__tls_base`'s index in dynamic linking is not
fixed now (See
https://github.com/llvm/llvm-project/blob/19afbfe33156d211fa959dadeea46cd17b9c723c/lld/wasm/Driver.cpp#L786-L823
for details), TLS + dynamic linking will not work at the moment.

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

Reviewed By: dschuff

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

19 months ago[WebAssembly] Add comments on local.tee transformation
Heejin Ahn [Tue, 14 Mar 2023 07:32:43 +0000 (00:32 -0700)]
[WebAssembly] Add comments on local.tee transformation

We have a good comment on `TEE` transformation in `RegStackify`:
https://github.com/llvm/llvm-project/blob/547e3456660000a16fc5c2a2f819f1a2b5d35b5d/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp#L613-L632

And I think it can be helpful to have some more comments on how the
`TEE`s created in `RegStackify` are converted into `LOCAL_TEE`s.

Variable `OldReg` is changed to `DefReg` to be consistent with
`RegStackify`'s comment.

Reviewed By: tlively

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

19 months ago[WebAssembly] Use MachineInstr::setDebugValueUndef
Heejin Ahn [Mon, 13 Mar 2023 09:44:47 +0000 (02:44 -0700)]
[WebAssembly] Use MachineInstr::setDebugValueUndef

When making `DBG_VALUE`/`DBG_VALUE_LIST` instructions undefined, there
is a method that takes care of it so we don't need to do it manually.
This changes the test because previously we are converting
`DBG_VALUE_LIST`s into `DBG_VALUE $noreg` but now we leave
`DBG_VALUE_LIST` but set it to undef by turning all its register
operands `$noreg`. The effect is the same.

Reviewed By: dschuff

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

19 months ago[llvm-readobj] Output valid JSON for GroupSections
Paul Kirth [Sat, 18 Mar 2023 01:36:40 +0000 (01:36 +0000)]
[llvm-readobj] Output valid JSON for GroupSections

The current implementation output the LLVM formatted heading for group
sections, which was not valid JSON. This patch provides two small
customization points that allow the heading to vary between the two
implementations, and another that allows the section members to be
output as valid JSON objects.

Reviewed By: jhenderson

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

19 months ago[WebAssembly] Replace Bugzilla links with Github issues
Heejin Ahn [Mon, 13 Mar 2023 09:48:03 +0000 (02:48 -0700)]
[WebAssembly] Replace Bugzilla links with Github issues

Reviewed By: dschuff, asb

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

19 months ago[llvm-readobj] Fix "Section" output when emitting relocations in JSON
Paul Kirth [Sat, 18 Mar 2023 00:05:41 +0000 (00:05 +0000)]
[llvm-readobj] Fix "Section" output when emitting relocations in JSON

Prior to this patch, the JSON output would emit an invalid key from the
shared LLVM implementation. This caused llvm-readobj to output invalid
JSON. This patch introduces a small helper function to print the
relocation information differently between the LLVM and JSON formats.

Before this patch:

```
    "Relocations": [Section (2) .rel.text {

      {
        "Relocation": {
          "Offset": 0,
          "Type": {
            "Value": "R_X86_64_NONE",
            "RawValue": 0
          },
          "Symbol": {
            "Value": "rel_0",
            "RawValue": 1
          }
        }
      },
      ...

```

After this patch:

```
   "Relocations": [
      {
        "SectionIdx": 2,
        "Relocs": [
          {
            "Relocation": {
              "Offset": 0,
              "Type": {
                "Name": "R_X86_64_NONE",
                "Value": 0
              },
              "Symbol": {
                "Name": "rel_0",
                "Value": 1
              }
            }
          },
          ...
```

Reviewed By: jhenderson

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

19 months ago[TSan] Make sure we only collect non-TSan frames for memory operations r=dvyukov...
Julian Lettner [Thu, 16 Mar 2023 22:57:56 +0000 (15:57 -0700)]
[TSan] Make sure we only collect non-TSan frames for memory operations r=dvyukov,rsundahl,thetruestblue,wrotki,kubamracek!

A previous change [1] moved retrieval of the caller PC
(`__builtin_return_address(0)` via `CALLERPC`) from an
interface-boundary function into a shared helper function
`ExternalAccess`.  If this function does not get inlined, we fail to
collect the appropriate caller PC for the "TSan interface boundary".

[1] https://reviews.llvm.org/D32360

rdar://78489600

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

19 months agogn build: Pass -fno-emulated-tls when targeting Android.
Peter Collingbourne [Sat, 18 Mar 2023 00:05:46 +0000 (17:05 -0700)]
gn build: Pass -fno-emulated-tls when targeting Android.

Matches the CMake build:
https://github.com/llvm/llvm-project/blob/93c1a5f3ddd41e0ec09f38ab0045bd5e92199fd5/compiler-rt/CMakeLists.txt#L343
(we always use API level 29).

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

19 months ago[NVPTX] Report fatal error on empty argument type.
Pavel Kopyl [Thu, 16 Mar 2023 02:01:50 +0000 (03:01 +0100)]
[NVPTX] Report fatal error on empty argument type.

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

19 months ago[llvm-readobj] Rename JSON Flag fields to be more consistent
Paul Kirth [Sat, 18 Mar 2023 00:00:57 +0000 (00:00 +0000)]
[llvm-readobj] Rename JSON Flag fields to be more consistent

Today the JSON uses `Value` and `RawValue` when printing `Flags`, when really
the `Value` field is always the name of an Enum variant, and `RawValue` is its
underlying numeric value. Similarly, we rename the `RawFlags` key to `Value`,
to match the new scheme. This also allows JSON parsing to use consistent logic
for `Flag` types.

Reviewed By: jhenderson

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

19 months ago[llvm-readobj] Fix JSON output for Relocations
Paul Kirth [Fri, 17 Mar 2023 23:40:23 +0000 (23:40 +0000)]
[llvm-readobj] Fix JSON output for Relocations

The existing JSON incorrectly outputs line breaks and other invalid JSON.

Example Before this patch:

```
...
"Relocations":[Section (9) .rela.dyn {
  0xA3B0 R_X86_64_RELATIVE - 0x43D0
  0xA3B8 R_X86_64_RELATIVE - 0x4A30
...
```

Example After this patch:

```
...
"Relocations":[Section (9) .rela.dyn {
{"Relocation":{"Offset":41904,"Type":{"Value":"R_X86_64_RELATIVE","RawValue":8},
"Symbol":{"Value":"","RawValue":0},"Addend":17360}},
{"Relocation":{"Offset":41912,"Type":{"Value":"R_X86_64_RELATIVE","RawValue":8},
"Symbol":{"Value":"","RawValue":0},"Addend":18992}},
{"Relocation":{"Offset":41920,"Type":{"Value":"R_X86_64_RELATIVE","RawValue":8},
"Symbol":{"Value":"","RawValue":0},"Addend":17440}},
...
```

Note there are still issues with the Section, but each Relocation is
now a valid JSON object that can be parsed. Future patches will address
the issues regarding JSON output for the Section.

Reviewed By: jhenderson

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

19 months ago[llvm-readobj] Standardize JSON output for `Other` field
Paul Kirth [Fri, 17 Mar 2023 23:32:00 +0000 (23:32 +0000)]
[llvm-readobj] Standardize JSON output for `Other` field

Today, the LLVM output uses special handling when the Other field is 0.
This output makes sense for a command line utility that a human will
read, but JSON is a machine readable format, so being consistent is more
important. Prior to this change, any consumer of the JSON output would
need to handle the Other field specially, since the structure of the
JSON would no longer be consistent.

Changes to JSON output when Other flag == 0:
```
"Other": 0,   ->   "Other": {
                      "RawFlags": 0,
                       "Flags": []
                    },
```

There are no changes to when Other flag != 0:
```
"Other": {        ->   "Other": {
  "RawFlags": 1,          "RawFlags": 1,
  "Flags": [              "Flags": [
      ...                     ...
  ]                       ]
},                     },
```

This patch adds a overload for the JSONELFDumper's printSymbol() method,
that uses consistent output formatting, regardless of the value of the
Other field.

Depends on D137092

Reviewed By: jhenderson

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

19 months ago[libc++] Use the _LIBCPP_VERBOSE_ABORT macro instead of calling the function directly
Nikolas Klauser [Thu, 16 Mar 2023 14:05:49 +0000 (15:05 +0100)]
[libc++] Use the _LIBCPP_VERBOSE_ABORT macro instead of calling the function directly

These calls were added in D141222.

Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits, smeenai, mikhail.ramalho

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

19 months ago[llvm-readobj] Use a helper to extract the Other Flags from symbols
Paul Kirth [Fri, 17 Mar 2023 23:29:31 +0000 (23:29 +0000)]
[llvm-readobj] Use a helper to extract the Other Flags from symbols

Since all ELFDumper implementations will require the same logic when
dealing with Other Flags, we move the logic into a helper so that it can
be easily reused across implementations.

Reviewed By: jhenderson

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

19 months ago[LSR] Rework term-fold tests
Philip Reames [Fri, 17 Mar 2023 19:09:27 +0000 (12:09 -0700)]
[LSR] Rework term-fold tests

There were two major problems with the tests.

First, with the pointer size being 32 bit and the original IVs also being 32 bit, almost all of the positive tests were actually unsound.  An upcoming change will add the appropriate safety check, but the test diffs are really hard to understand without switching the tests to 64 bit pointers first.

Second, checking debug messages for failures is a major bad practice.  This should not have been accepted in review at all.  The reason is that it makes the *order* of legality checks visibile and modifying any of them becomes annoying and tedious.

19 months agoRevert "[fuzzer] Use puts() rather than printf() in CopyFileToErr()"
Matthew Voss [Fri, 17 Mar 2023 22:57:07 +0000 (15:57 -0700)]
Revert "[fuzzer] Use puts() rather than printf() in CopyFileToErr()"

This reverts commit 03aa02adb03c928ae4ec9d139b303348f81861c9.

Reverting due to bot failures:
https://lab.llvm.org/buildbot/#/builders/247/builds/2653

19 months ago[mlir][gpu][nvvm] refined sparsity selector test and verification of mma.sp
Aart Bik [Fri, 17 Mar 2023 18:40:10 +0000 (11:40 -0700)]
[mlir][gpu][nvvm] refined sparsity selector test and verification of mma.sp

Reviewed By: ThomasRaoux

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

19 months ago[Docs] Fix llvm-cov debuginfod option formatting.
Daniel Thornburgh [Fri, 17 Mar 2023 22:48:50 +0000 (15:48 -0700)]
[Docs] Fix llvm-cov debuginfod option formatting.

19 months ago[MLIR] Do not hardcode attribute indexes in intrinsic decls
Artem Belevich [Fri, 17 Mar 2023 21:48:47 +0000 (14:48 -0700)]
[MLIR] Do not hardcode attribute indexes in intrinsic decls

We're not checking the attributes themselves, so hardcoded attribute numbers
only make the tests more fragile, without improving the testing.

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

19 months ago[bazel] add missing dependency to //mlir:SPIRVCommonConversion
Jorge Gorbe Moya [Fri, 17 Mar 2023 22:00:50 +0000 (15:00 -0700)]
[bazel] add missing dependency to //mlir:SPIRVCommonConversion

19 months ago[libc++] Remove unnecessary main() function in .compile.pass.cpp and .verify.cpp...
Louis Dionne [Thu, 16 Mar 2023 16:45:41 +0000 (12:45 -0400)]
[libc++] Remove unnecessary main() function in .compile.pass.cpp and .verify.cpp tests

We pretty consistently don't define those cause they are not needed,
and it removes the potential pitfall to think that these tests are
being run. This doesn't touch .compile.fail.cpp tests since those
should be replaced by .verify.cpp tests anyway, and there would be
a lot to fix up.

As a fly-by, I also fixed a bit of formatting, removed a few unused
includes and made some very minor, clearly NFC refactorings such as
in allocator.traits/allocator.traits.members/allocate.verify.cpp where
the old test basically made no sense the way it was written.

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

19 months agoscudo: Don't define mallinfo2 on Android.
Peter Collingbourne [Fri, 17 Mar 2023 18:59:39 +0000 (11:59 -0700)]
scudo: Don't define mallinfo2 on Android.

On Android, mallinfo2 is an alias of mallinfo, which results
in errors if we try to define both.

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

19 months agoLiveRangeEdit: Use Register
Matt Arsenault [Fri, 10 Mar 2023 20:15:06 +0000 (16:15 -0400)]
LiveRangeEdit: Use Register

19 months agoRevert unintentionally committed "Use nvptxcompile library."
Artem Belevich [Fri, 17 Mar 2023 21:23:42 +0000 (14:23 -0700)]
Revert unintentionally committed "Use nvptxcompile library."

This reverts commit 5f66348e59aa7ce5e5780a972b3875268c45d57c.

19 months agoSeparate SerializeToCubin from GPUTransforms.
Artem Belevich [Fri, 17 Mar 2023 20:47:46 +0000 (13:47 -0700)]
Separate SerializeToCubin from GPUTransforms.

SerializeToCubin depends on CUDA at *runtime* which is undesirable for MLIR's
general use case, as compilation should be doable on any host, regardless of
whether it has a GPU.

SerializeToCubin is needed to run some GPU tests, so when we build mlir-opt,
SerializeToCubin pass is linked in directly into mlir-opt.

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

19 months agoUse nvptxcompile library.
Artem Belevich [Tue, 7 Mar 2023 23:21:37 +0000 (15:21 -0800)]
Use nvptxcompile library.

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

19 months ago[Clang][OpenMP] Insert alloca for kernel args at function entry block instead of...
Dhruva Chakrabarti [Fri, 17 Mar 2023 16:16:17 +0000 (12:16 -0400)]
[Clang][OpenMP] Insert alloca for kernel args at function entry block instead of the launch point.

If an inlined kernel is called in a loop, the launch point alloca would
lead to increasing stack usage every time the kernel is invoked. This
could make the application run out of stack space and crash. This problem
is fixed by using the alloca insertion point while creating the alloca instruction.

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

Reviewed By: jdoerfert

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

19 months ago[clang] Properly parse variable template requires clause in lambda
Emilia Dreamer [Fri, 17 Mar 2023 08:13:02 +0000 (10:13 +0200)]
[clang] Properly parse variable template requires clause in lambda

Since P0857, part of C++20, a *lambda-expression* can contain a
*requires-clause* after its *template-parameter-list*.

While support for this was added as part of
eccc734a69c0c012ae3160887b65a535b35ead3e, one specific case isn't
handled properly, where the *requires-clause* consists of an
instantiation of a boolean variable template. This is due to a
diagnostic check which was written with the assumption that a
*requires-clause* can never be followed by a left parenthesis. This
assumption no longer holds for lambdas.

This diagnostic check would then attempt to perform a "recovery", but it
does so in a valid parse state, resulting in an invalid parse state
instead!

This patch adds a special case when parsing requires clauses of lambda
templates, to skip this diagnostic check.

Fixes https://github.com/llvm/llvm-project/issues/61278
Fixes https://github.com/llvm/llvm-project/issues/61387

Reviewed By: erichkeane

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

19 months ago[flang] Replace !fir.ref<T> -> T conversion with a load
Renaud-K [Thu, 16 Mar 2023 01:11:50 +0000 (18:11 -0700)]
[flang] Replace !fir.ref<T> -> T conversion with a load
Differential revision: https://reviews.llvm.org/D146186

19 months agoRevert "[JITLink][ORC] Rename MemDeallocPolicy to MemLifetimePolicy, add ..."
Lang Hames [Fri, 17 Mar 2023 19:57:38 +0000 (12:57 -0700)]
Revert "[JITLink][ORC] Rename MemDeallocPolicy to MemLifetimePolicy, add ..."

This reverts commit 2cc64df0bd6a802eab592dbc282463c3e4a4281c while I investigate
bot failures (e.g. https://lab.llvm.org/buildbot/#/builders/3/builds/23081).

19 months ago[lldb] Enable TestPublicAPIHeaders.py on Apple Silicon
Alex Langford [Fri, 17 Mar 2023 18:34:58 +0000 (11:34 -0700)]
[lldb] Enable TestPublicAPIHeaders.py on Apple Silicon

This cleans up the test a bit and enables it to run on apple silicon
machines.

19 months ago[JITLink][ORC] Rename MemDeallocPolicy to MemLifetimePolicy, add NoAlloc option.
Lang Hames [Thu, 16 Mar 2023 00:09:04 +0000 (17:09 -0700)]
[JITLink][ORC] Rename MemDeallocPolicy to MemLifetimePolicy, add NoAlloc option.

The original MemDeallocPolicy had two options:
* Standard: allocated memory lives until deallocated or abandoned.
* Finalize: allocated memory lives until all finalize actions have been run,
            then is destroyed.

This patch introduces a new 'NoAlloc' option. NoAlloc indicates that the
section should be ignored by the JITLinkMemoryManager -- the memory manager
should allocate neither working memory nor executor address space to blocks in
NoAlloc sections. The NoAlloc option is intended to support metadata sections
(e.g. debug info) that we want to keep in the graph and have fixed up if
necessary, but don't want allocated or transmitted to the executor (or we want
that allocation and transmission to be managed manually by plugins).

Since NoAlloc blocks are ignored by the JITLinkMemoryManager they will not have
working memory allocated to them by default post-allocation. Clients wishing to
modify the content of a block in a NoAlloc section should call
`Block::getMutableMemory(LinkGraph&)` to get writable memory allocated on the
LinkGraph's allocator (this memory will exist for the lifetime of the graph).
If no client requests mutable memory prior to the fixup phase then the generic
link algorithm will do so when it encounters the first edge in any given block.

Addresses of blocks in NoAlloc sections are initialized by the LinkGraph
creator (a LinkGraphBuilder, if the graph is generated from an object file),
and should not be modified by the JITLinkMemoryManager. Plugins are responsible
for updating addresses if they add/remove content from these sections. The
meaning of addresses in NoAlloc-sections is backend/plugin defined, but for
fixup purposes they will be treated the same as addresses in Standard/Finalize
sections. References from Standard/Finalize sections to NoAlloc sections are
expected to be common (these represent metadata tracking executor addresses).
References from NoAlloc sections to Standard/Finalize sections are expected to
be rare/non-existent (they would represent JIT'd code / data tracking metadata
in the controller, which would be surprising). LinkGraphBuilders and specific
backends may impose additional constraints on edges between Standard/Finalize
and NoAlloc sections where required for correctness.

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

19 months agoRegAllocGreedy: Don't use Register reference
Matt Arsenault [Fri, 10 Mar 2023 12:56:51 +0000 (08:56 -0400)]
RegAllocGreedy: Don't use Register reference

19 months agoIntrinsics: Make vector reduce intrinsics speculatable
Matt Arsenault [Fri, 17 Mar 2023 16:00:05 +0000 (12:00 -0400)]
Intrinsics: Make vector reduce intrinsics speculatable

19 months ago[RISCV] Add isReMaterializable to FLI instructions.
Craig Topper [Fri, 17 Mar 2023 19:16:36 +0000 (12:16 -0700)]
[RISCV] Add isReMaterializable to FLI instructions.

Reviewed By: reames

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

19 months ago[RISCV] Add isAsCheapAsAMove to FLI instructions.
Craig Topper [Fri, 17 Mar 2023 19:05:51 +0000 (12:05 -0700)]
[RISCV] Add isAsCheapAsAMove to FLI instructions.

This can prevent unnecessarily hoisting out of loops.

Test case cribbed from AArch64.

I also intend to make them rematerializable.

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

19 months ago[RISCV] Add test case showing fli being hoisted out of a loop and creating extra...
Craig Topper [Fri, 17 Mar 2023 19:05:44 +0000 (12:05 -0700)]
[RISCV] Add test case showing fli being hoisted out of a loop and creating extra copies/spills.

Test case for D146314.

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

19 months ago[libc++][NFC] Move the stdlib= test suite configuration for Apple into the cfg.in...
Louis Dionne [Fri, 17 Mar 2023 16:40:50 +0000 (12:40 -0400)]
[libc++][NFC] Move the stdlib= test suite configuration for Apple into the cfg.in files

This centralizes where configuration lives.