platform/upstream/llvm.git
17 months ago[Docs] Add best practices for regression tests
Nikita Popov [Tue, 24 Jan 2023 09:43:40 +0000 (10:43 +0100)]
[Docs] Add best practices for regression tests

There are a lot of conventions for writing tests that don't seem
to be documented anywhere right now, so this takes a stab at
writing down some "best practices".

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

17 months agoRevert "ARM: skip debug instructions when matching jump-table patterns."
Tim Northover [Thu, 26 Jan 2023 13:26:10 +0000 (13:26 +0000)]
Revert "ARM: skip debug instructions when matching jump-table patterns."

This reverts commit ce4fcea59e1d5829b4355b6401d7265be23f617a.

I committed it accidentally.

17 months agoAArch64: remove SM4 support from Apple CPUs.
Tim Northover [Thu, 26 Jan 2023 12:52:59 +0000 (12:52 +0000)]
AArch64: remove SM4 support from Apple CPUs.

The CPUs never supported SM4 instructions, but until recently I think crypto
was folded into the baseline architecture as a monolithic feature so it was
difficult to represent that. Now it's split we can, and the CPUs that support
v8.4 onwards only handle AES, SHA2, SHA3 by way of crypto instructions.

17 months agoARM: skip debug instructions when matching jump-table patterns.
Tim Northover [Wed, 18 Jan 2023 15:12:29 +0000 (15:12 +0000)]
ARM: skip debug instructions when matching jump-table patterns.

When working out whether we can see a compressible jump-table pattern during
ConstantIslands, we were stopping when we saw a debug instruction. Instead it's
better to keep iterating backwards to the first real instruction.

17 months ago[DAGCombine] fp_to_sint isSaturatingMinMax
Samuel Parker [Thu, 26 Jan 2023 11:52:24 +0000 (11:52 +0000)]
[DAGCombine] fp_to_sint isSaturatingMinMax

Check for single smax pattern against zero when converting from a
small enough float.

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

17 months ago[SVE] Move isel for casting between NEON and SVE vector types into tablegen.
Paul Walker [Thu, 26 Jan 2023 12:33:10 +0000 (12:33 +0000)]
[SVE] Move isel for casting between NEON and SVE vector types into tablegen.

This is purely refactoring to remove some unecessary C++ code.

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

17 months ago[LLVM][TableGen] Notebook describing how to write a Python backend
David Spickett [Wed, 14 Dec 2022 13:46:27 +0000 (13:46 +0000)]
[LLVM][TableGen] Notebook describing how to write a Python backend

This tutorial uses the dump json option to write a backend for
SQL queries.

It is based on the work of Min-Yih Hsu:
* https://github.com/mshockwave/SQLGen
* https://www.youtube.com/watch?v=UP-LBRbvI_U

I hope that having the same concepts in 3 forms will allow people
to choose the style that fits them.

The main drawback here being that it's in Python. C++ can be used
in a notebook (https://github.com/jupyter-xeus/xeus-cling) but I
decided against it for a few reasons:

* Python is the default for Jupyter, no extra installs needed.
* Having the code in a second language may help people who
  know one or the other.
* There is no upstream example of a JSON powered backend.
  (and although we would be unlikely to accept one upstream,
  I think it's a great option for quick development before
  translating into C++)

Reviewed By: myhsu

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

17 months ago[SVE] Fix incorrect lowering of predicate permute builtins.
Paul Walker [Wed, 18 Jan 2023 16:33:42 +0000 (16:33 +0000)]
[SVE] Fix incorrect lowering of predicate permute builtins.

When lowering predicate permute builtins we incorrectly assume only
the typically "active" bits for the specified element type play a
role with all other bits zero'd.  This is not the case because all
bits are significant, with the element type specifying how they
are grouped:

  b8  - permute using a block size of 1 bit
  b16 - permute using a block size of 2 bits
  b32 - permute using a block size of 4 bits
  b64 - permute using a block size of 8 bits

The affected builtins are svrev, svtrn1, svtrn2, svuzp1, svuzp2,
svzip1 and svzip2.

This patch adds new intrinsics to support these operations and
changes the builtin lowering code to emit them.  The b8 case remains
unchanged because for that operation the existing intrinsics work
as required and their support for other predicate types has been
maintained as useful if only as a way to test the correctness of
their matching ISD nodes that code generation relies on.

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

17 months ago[SCCP] Adjust test after cdeaf5f28c3dca.
Florian Hahn [Thu, 26 Jan 2023 12:04:20 +0000 (12:04 +0000)]
[SCCP] Adjust test after cdeaf5f28c3dca.

17 months agoRevert "[LoopVectorize] Enable integer Mul and Add as select reduction patterns"
Matt Devereau [Thu, 26 Jan 2023 12:02:16 +0000 (12:02 +0000)]
Revert "[LoopVectorize] Enable integer Mul and Add as select reduction patterns"

This reverts commit f90103851f9a381bbf7ed6da250217577afd00d2.

17 months agoRecommit "[SCCP] Use range info to prove AddInst has NUW flag."
Florian Hahn [Thu, 26 Jan 2023 11:45:10 +0000 (11:45 +0000)]
Recommit "[SCCP] Use range info to prove AddInst has NUW flag."

This reverts commit 531756b9544b3e164b9ab998292fce3ebbc7c746.

The recommitted version fixes a crash when one of the operands is a
constant other than a ConstantInt. Test for that case have been added
in 5b16cd97b8e1c273.

It splits off the new logic into a separate function because setting the
flags is quite different compared to the other cases handled in replaceSignedInst
which all require replacing an existing instruction.

It also guards makeGuaranteedNoWrapRegion by `if (!Inst.hasNoUnsignedWrap())`
as discussed in the review.

Fixes #60280.
Fixes #60278.

Original message:
    This patch updates SCCP to use the value ranges of AddInst operands to
    try to prove the AddInst does not overflow in the unsigned sense and
    adds the NUW flag. The reasoning is done with
    makeGuaranteedNoWrapRegion (thanks @nikic for point it out!).

    Follow-ups will include adding NSW and extension to more
    OverflowingBinaryOperators.

    Reviewed By: nikic

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

17 months ago[Coroutine] Fix typos in comment
Jannik Silvanus [Thu, 26 Jan 2023 11:42:08 +0000 (12:42 +0100)]
[Coroutine] Fix typos in comment

17 months ago[clang] Add test for CWG1960
Vlad Serebrennikov [Thu, 26 Jan 2023 11:07:30 +0000 (14:07 +0300)]
[clang] Add test for CWG1960

P1787: "CWG1960 (currently closed as NAD) is resolved by removing the rule in question (which is widely ignored by implementations and gives subtle interactions between using-declarations)."
Wording: "In a using-declarator that does not name a constructor, every declaration named shall be accessible."

Reviewed By: #clang-language-wg, erichkeane, shafik

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

17 months ago[RISCV][NFC] Rename narrowing patterns to use W suffix
Luke Lau [Wed, 25 Jan 2023 16:19:11 +0000 (16:19 +0000)]
[RISCV][NFC] Rename narrowing patterns to use W suffix

To match up with the pseudo instruction names

Reviewed By: craig.topper

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

17 months ago[AArch64][SME2] Add multi-vector saturating rounding shift right intrinsics
Kerry McLaughlin [Thu, 26 Jan 2023 10:55:06 +0000 (10:55 +0000)]
[AArch64][SME2] Add multi-vector saturating rounding shift right intrinsics

Adds IR intrinsics for the following SME2 instructions:
 - sqrshr (2 and 4 vector)
 - uqrshr (2 and 4 vector)
 - sqrshru (2 and 4 vector)
 - sqrshrn (4 vector)
 - uqrshrn (4 vector)
 - sqrshrun (4 vector)

Also adds intrinsics for the following SVE2p1 instructions:
 - sqrshrn (2 vector)
 - uqrshrn (2 vector)
 - sqrshrun (2 vector)

NOTE: These intrinsics are still in development and are subject to future changes.

Reviewed By: CarolineConcatto

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

17 months ago[MLIR][OpenMP] Add Lowering support for OpenMP Target Data, Exit Data and Enter Data...
Akash Banerjee [Tue, 24 Jan 2023 11:29:50 +0000 (11:29 +0000)]
[MLIR][OpenMP] Add Lowering support for OpenMP Target Data, Exit Data and Enter Data directives

This patch adds Fortran Lowering support for the OpenMP Target Data, Target Exit Data and Target Enter Data constructs.
operation.

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

17 months ago[SPIRV] Fix build warnings
Jay Foad [Wed, 25 Jan 2023 12:02:54 +0000 (12:02 +0000)]
[SPIRV] Fix build warnings

Fix these build warnings:

SPIRVBuiltins.cpp:1590:30: warning: 'getPrefTypeAlignment' is deprecated: use getPrefTypeAlign instead [-Wdeprecated-declarations]
SPIRVUtils.cpp:209:3: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]

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

17 months ago[AArch64][SME2] Add multi-vector saturating doubling multiply high intrinsics
Kerry McLaughlin [Thu, 26 Jan 2023 09:56:39 +0000 (09:56 +0000)]
[AArch64][SME2] Add multi-vector saturating doubling multiply high intrinsics

Adds intrinsics for the following SME2 instructions:
 - sqdmulh, 2 vector (single & multi)
 - sqdmulh, 4 vector (single & multi)

NOTE: These intrinsics are still in development and are subject to future changes.

Reviewed By: david-arm

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

17 months ago[SROA] Break typed pointer support
Nikita Popov [Thu, 26 Jan 2023 09:10:01 +0000 (10:10 +0100)]
[SROA] Break typed pointer support

This removes typed pointer support in a prominent place in the
optimization pipeline, to ensure that any non-trivial consumers
of tip-of-tree LLVM are aware that this is no longer a supported
configuration.

17 months agoRevert "[clang] Build UsingType for elaborated type specifiers."
Haojian Wu [Thu, 26 Jan 2023 09:46:51 +0000 (10:46 +0100)]
Revert "[clang] Build UsingType for elaborated type specifiers."

This reverts commit e70ca7b35319a3621f9d9c6475926428f8c5c000 and the
followup patch "[clang] Fix the location of UsingTypeLoc"
(ebbeb164c25a40cb6ba9c6b18dce5dcd06c0bb07).

The patch causes an incorrect lookup result:

```
namespace ns { struct Foo { };}

using ns::Foo;
void test() {
  struct Foo {
  } k; // the type of k refers to ns::Foo, rather than the local Foo!
}
```

17 months ago[Clang] Convert some tests to opaque pointers (NFC)
Nikita Popov [Thu, 26 Jan 2023 09:18:42 +0000 (10:18 +0100)]
[Clang] Convert some tests to opaque pointers (NFC)

These are all tests that end up running SROA.

17 months ago[NFC][WebAssembly] Updated tests
Samuel Parker [Thu, 26 Jan 2023 10:26:24 +0000 (10:26 +0000)]
[NFC][WebAssembly] Updated tests

Run update_llc_test_checks on a number of codegen tests.

17 months agoAllow getRawCommentForDecl to find comments in macros
Dana Jansens [Thu, 26 Jan 2023 08:53:59 +0000 (09:53 +0100)]
Allow getRawCommentForDecl to find comments in macros

The key part of getRawCommentForDecl() required to find a comment
is determining where to look for it. The location of the decl
itself is usually right, except when macros get involved. The
comment in the macro is stored in RawCommentList at the spelling
location of the decl, not at the place where the decl comes into
being as the macro is instantiated.

getDeclLocForCommentSearch() already contained to branches to try
handle comments inside macros, and we are able to replace them
and handle more cases as well, by returning the spelling location
of the decl's begin location. That is:
  SourceMgr.getSpellingLoc(D->getBeginLoc())

Reviewed By: gribozavr2

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

17 months ago[libc++][NFC] Rename multidimentional uninitialized algorithms
Nikolas Klauser [Wed, 25 Jan 2023 09:02:04 +0000 (10:02 +0100)]
[libc++][NFC] Rename multidimentional uninitialized algorithms

Reviewed By: Mordante, #libc

Spies: libcxx-commits

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

17 months ago[AMDGPU] sendmsg(MSG_ORDERED_PS_DONE) is not supported on GFX11
Jay Foad [Wed, 25 Jan 2023 14:31:09 +0000 (14:31 +0000)]
[AMDGPU] sendmsg(MSG_ORDERED_PS_DONE) is not supported on GFX11

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

17 months ago[mlir] GreedyPatternRewriteDriver: Keep track of surviving ops
Matthias Springer [Thu, 26 Jan 2023 08:15:49 +0000 (09:15 +0100)]
[mlir] GreedyPatternRewriteDriver: Keep track of surviving ops

This change adds `allErased` to the `applyOpPatternsAndFold(ArrayRef<Operation *>, ...)` overload. This overload now supports all functionality that is also supported by `applyOpPatternsAndFold(Operation *, ...)` and can be used as a replacement.

This change has no performance implications when `allErased = nullptr`.

The single-operation overload is removed in a subsequent NFC change.

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

17 months agoflang: fix a copy and paste mistake
Sylvestre Ledru [Thu, 26 Jan 2023 08:18:00 +0000 (09:18 +0100)]
flang: fix a copy and paste mistake

Reviewed By: clementval

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

17 months agoRe-apply "[clang][Interp] Fix left-/right-shifting more than sizeof(unsigned)"
Timm Bäder [Thu, 26 Jan 2023 06:50:14 +0000 (07:50 +0100)]
Re-apply "[clang][Interp] Fix left-/right-shifting more than sizeof(unsigned)"

17 months ago[AST] Use llvm::bit_width (NFC)
Kazu Hirata [Thu, 26 Jan 2023 06:59:51 +0000 (22:59 -0800)]
[AST] Use llvm::bit_width (NFC)

17 months ago[llvm] Replace array allocation pattern by SmallVector in ComputeMappedEditDistance
serge-sans-paille [Wed, 25 Jan 2023 19:43:06 +0000 (20:43 +0100)]
[llvm] Replace array allocation pattern by SmallVector in ComputeMappedEditDistance

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

17 months ago[llvm] Do not zero out write_unsigned_impl internal buffer
serge-sans-paille [Tue, 24 Jan 2023 13:52:43 +0000 (14:52 +0100)]
[llvm] Do not zero out write_unsigned_impl internal buffer

Current implementation uselessly calls memset on its internal buffer
while it does not read the non overwritten part.

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

17 months agoRevert "[clang][Interp] Fix left-/right-shifting more than sizeof(unsigned)"
Timm Bäder [Thu, 26 Jan 2023 06:49:10 +0000 (07:49 +0100)]
Revert "[clang][Interp] Fix left-/right-shifting more than sizeof(unsigned)"

This reverts commit 00e967f6c2d626d1913f5af5763beab7946978ce.

This breaks builders where long is only 32 bits, e.g.
https://lab.llvm.org/buildbot/#/builders/65/builds/7721
https://lab.llvm.org/buildbot/#/builders/245/builds/3899

17 months ago[clang][Interp][NFCI] Don't crash on void builtin functions
Timm Bäder [Sat, 7 Jan 2023 07:10:48 +0000 (08:10 +0100)]
[clang][Interp][NFCI] Don't crash on void builtin functions

classifyPrim() runs into a llvm_unreachable() for those.

17 months ago[RISCV] Add Zcd and Zcf to RISCVUsage.rst. NFC
Craig Topper [Thu, 26 Jan 2023 06:08:02 +0000 (22:08 -0800)]
[RISCV] Add Zcd and Zcf to RISCVUsage.rst. NFC

17 months ago[clang][Interp] Fix left-/right-shifting more than sizeof(unsigned)
Timm Bäder [Mon, 2 Jan 2023 14:11:27 +0000 (15:11 +0100)]
[clang][Interp] Fix left-/right-shifting more than sizeof(unsigned)

We were just casting to `unsigned` before, so that caused problems when
shifting more bits than `unsigned` has.

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

17 months ago[SystemZ] Use llvm::countl_zero and llvm::countr_zero (NFC)
Kazu Hirata [Thu, 26 Jan 2023 06:05:06 +0000 (22:05 -0800)]
[SystemZ] Use llvm::countl_zero and llvm::countr_zero (NFC)

isVectorConstantLegal calls findFirstSet and findLastSet, but we don't
rely on their ability to return std::numeric_limits<T>::max() on input
0.

This patch replaces those calls with calls to llvm::countl_zero and
llvm::countr_zero.

Due to an off-by-one error in the original code, the value of Upper
could change at bit N, where N is the index of the highest set bit in
SplatBitsZ, but the difference doesn't matter at the end.  Without
this patch, Upper could have bit N set.  With this patch, Upper never
has bit N set.  Either way, both calls to tryValue have this bit set
because the argument is ORed with SplatBitsZ.

17 months ago[clang][Interp] Implement logical and/or operators
Timm Bäder [Sat, 31 Dec 2022 19:04:41 +0000 (20:04 +0100)]
[clang][Interp] Implement logical and/or operators

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

17 months agoUse llvm::Log2_32 and llvm::Log2_64 instead of llvm::findLastSet (NFC)
Kazu Hirata [Thu, 26 Jan 2023 05:34:09 +0000 (21:34 -0800)]
Use llvm::Log2_32 and llvm::Log2_64 instead of llvm::findLastSet (NFC)

For a nonzero argument, llvm::findLastSet(x) is equivalent to
llvm::Log2_32(x) or llvm::Log2_64(x).  None of the calls to
llvm::findLastSet in this patch relies on llvm::findLastSet's ability
to return std::numeric_limits<T>::max() on input 0.

17 months ago[Support] Use llvm::countr_zero and llvm::Log2_64 in APInt.cpp (NFC)
Kazu Hirata [Thu, 26 Jan 2023 05:22:11 +0000 (21:22 -0800)]
[Support] Use llvm::countr_zero and llvm::Log2_64 in APInt.cpp (NFC)

partMSB and partLSB never get 0 as the argument.  That is, we don't
rely on find{First,Last}Set's ability to return
std::numeric_limits<T>::max() on input 0.

This patch replaces partLSB and partMSB with llvm::countr_zero and
llvm::Log2_64, respectively.

FWIW, nobody in LLVM (except unit test MathExtrasTest.cpp) relies on
find{First,Last}Set's ability to return std::numeric_limits<T>::max()
on input 0.

17 months agoResolve a FIXME in MachineCopyPropagation by allowig propagation to subregister uses.
Owen Anderson [Sat, 14 Jan 2023 04:40:04 +0000 (21:40 -0700)]
Resolve a FIXME in MachineCopyPropagation by allowig propagation to subregister uses.

Reviewed By: barannikov88

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

17 months ago[Mips] Simplify loadImmediate (NFC)
Kazu Hirata [Thu, 26 Jan 2023 04:54:43 +0000 (20:54 -0800)]
[Mips] Simplify loadImmediate (NFC)

loadImmediate computes ShiftAmount in an unnecessarily complicated
manner.  We just need to know the minimum right shift amount to bring
the immediate down to an unsigned 16-bit value, so

  unsigned ShiftAmount = llvm::bit_width((uint64_t)ImmValue) - 16;

is sufficient.  In other words, the following are all equivalent:

  unsigned ShiftAmount = FirstSet - (15 - (LastSet - FirstSet));
  unsigned ShiftAmount = llvm::countr_zero(IV) - (15 - (63 - llvm::countl_zero(IV) - llvm::countr_zero(IV)));
  unsigned ShiftAmount = llvm::countr_zero(IV) - 15 + (63 - llvm::countl_zero(IV) - llvm::countr_zero(IV));
  unsigned ShiftAmount = 48 - llvm::countl_zero(IV);
  unsigned ShiftAmount = 64 - llvm::countl_zero(IV) - 16;
  unsigned ShiftAmount = llvm::bit_width(IV) - 16;

where IV represents (uint64)ImmValue.  I've also checked the
equivalence empirically up to 2u << 32.

17 months ago[Mips] Simplify isShiftedUIntAtAnyPosition (NFC)
Kazu Hirata [Thu, 26 Jan 2023 04:44:53 +0000 (20:44 -0800)]
[Mips] Simplify isShiftedUIntAtAnyPosition (NFC)

isShiftedUIntAtAnyPosition never gets zero as the argument because the
caller processes ImmValue satisfying isInt<16>(ImmValue), which
includes zero, long before it calls isShiftedUIntAtAnyPosition.

Given that the argument is always nonzero, findFirstSet is identical
to llvm::countr_zero.  Also, x == x >> BitNum << BitNum is always
true, so we are left with:

  isUInt<N>(x >> llvm::countr_zero(x))

Just in case the caller changes its behavior and starts passing zero
to us, we can protect the shift from undefined behavior "x << 64" by
adding "x &&".

17 months agoRevert "[llvm-cov] Look up object files using debuginfod"
Douglas Yung [Thu, 26 Jan 2023 03:11:08 +0000 (19:11 -0800)]
Revert "[llvm-cov] Look up object files using debuginfod"

This reverts commit efbc8bb18eda63007216ad0cb5a8de04963eddd5.

This change is causing failures when detecting curl on several build bots:
 - https://lab.llvm.org/buildbot/#/builders/247/builds/884
 - https://lab.llvm.org/buildbot/#/builders/231/builds/7688
 - https://lab.llvm.org/buildbot/#/builders/121/builds/27389
 - https://lab.llvm.org/buildbot/#/builders/230/builds/8464
 - https://lab.llvm.org/buildbot/#/builders/57/builds/24209
 - https://lab.llvm.org/buildbot/#/builders/127/builds/42722

17 months agoRevert "Fix compilation failure in CoverageMapping.cpp"
Douglas Yung [Thu, 26 Jan 2023 03:10:29 +0000 (19:10 -0800)]
Revert "Fix compilation failure in CoverageMapping.cpp"

This reverts commit 46013fc10a6879f4c9b4c9b9fbd43e4dc70f3c8b.

The original commit efbc8bb18eda63007216ad0cb5a8de04963eddd5 is failing on several bots, so
reverting this follow-up commit as well as the original commit.

17 months agoAMDGPU: Add fneg from integer tests
Matt Arsenault [Mon, 23 Jan 2023 20:16:44 +0000 (16:16 -0400)]
AMDGPU: Add fneg from integer tests

17 months agoVerifier: Add checks for associated metadata
Matt Arsenault [Mon, 9 Jan 2023 17:17:38 +0000 (12:17 -0500)]
Verifier: Add checks for associated metadata

Also add missing assembler test for the valid cases.

17 months ago[RISCV] Rename CS_ALU tablegen class to CA_ALU. NFC
Craig Topper [Thu, 26 Jan 2023 01:08:42 +0000 (17:08 -0800)]
[RISCV] Rename CS_ALU tablegen class to CA_ALU. NFC

The format this uses is CA. I think it may have once shared CS and
this didn't get renamed when that changed in D54302.

17 months ago[MLIR] Fix python tests for LocationAttr
Andrew Young [Thu, 26 Jan 2023 01:01:11 +0000 (17:01 -0800)]
[MLIR] Fix python tests for LocationAttr

Follow up to https://reviews.llvm.org/D142522.  I forgot to push the
test changes, was caught only in the post-merge builds.

17 months agoGVN.cpp: Suppress a warning in D141712 [-Wunused-variable]
NAKAMURA Takumi [Thu, 26 Jan 2023 00:52:38 +0000 (09:52 +0900)]
GVN.cpp: Suppress a warning in D141712 [-Wunused-variable]

17 months ago[bazel] Port efbc8bb18e
Benjamin Kramer [Thu, 26 Jan 2023 00:49:59 +0000 (01:49 +0100)]
[bazel] Port efbc8bb18e

17 months ago[flang] Add driver install directory to AIX toolchain program paths list.
Paul Scoropan [Wed, 25 Jan 2023 23:23:42 +0000 (23:23 +0000)]
[flang] Add driver install directory to AIX toolchain program paths list.

flang-new encounters an issue where its unable to invoke itself because the
install directory was missing from the program paths on AIX.

Reviewed By: w2yehia

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

17 months agoMigrate away from C++20-deprecated POD type traits
David Blaikie [Thu, 26 Jan 2023 00:14:30 +0000 (00:14 +0000)]
Migrate away from C++20-deprecated POD type traits

17 months agoAMDGPU: Remove redundant test
Matt Arsenault [Wed, 25 Jan 2023 19:10:44 +0000 (15:10 -0400)]
AMDGPU: Remove redundant test

implicit-arg-v5-opt.ll already covers this with more cases.

17 months ago[MLIR] Add LocationAttr to the Python API
Andrew Young [Thu, 19 Jan 2023 23:01:46 +0000 (15:01 -0800)]
[MLIR] Add LocationAttr to the Python API

This is a follow up to D142182, to expose LocationAttrs through Python.

Reviewed By: ftynse

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

17 months ago[NFC] clang-format OpenMPOpt.cpp
Shilei Tian [Thu, 26 Jan 2023 00:05:53 +0000 (19:05 -0500)]
[NFC] clang-format OpenMPOpt.cpp

17 months ago[clang-doc] Removed unused method in the Info class
Paul Kirth [Wed, 25 Jan 2023 23:55:02 +0000 (23:55 +0000)]
[clang-doc] Removed unused method in the Info class

Reviewed By: brettw

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

17 months ago[libc] add scanf pointer conversion
Michael Jones [Tue, 24 Jan 2023 22:41:28 +0000 (14:41 -0800)]
[libc] add scanf pointer conversion

This patch adds the last conversion for scanf, %p. It is set up to match
the %p implementation in our printf.

Reviewed By: sivachandra, lntue

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

17 months ago[libc] add scanf current position conversion
Michael Jones [Tue, 24 Jan 2023 19:25:54 +0000 (11:25 -0800)]
[libc] add scanf current position conversion

To add the current position (%n) conversion, some reorganization needed
to be done. The "write a number to this pointer using the length
modifier" utilities and a couple other shared parsing functions have
been moved into converter_utils.h. This made implementing
current_pos_converter very simple.

Reviewed By: lntue

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

17 months ago[llvm][NFC] Rename variables to match style guide in Local.cpp
Paul Kirth [Wed, 25 Jan 2023 21:34:01 +0000 (21:34 +0000)]
[llvm][NFC] Rename variables to match style guide in Local.cpp

Reviewed By: aeubanks

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

17 months ago[mlir-translate] More specific error message for BlockAddress
Arthur Lafrance [Wed, 25 Jan 2023 21:02:16 +0000 (13:02 -0800)]
[mlir-translate] More specific error message for BlockAddress

BlockAddress is currently unimplemented in the LLVM dialect of MLIR;
when converting to LLVM dialect MLIR from LLVM IR, mlir-translate
currently terminates with an "unhandled constant" error message.
Instead, this message could be made more specific, to let the user know
that the specific issue is that BlockAddress is unimplemented in the
LLVM dialect.

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

17 months agoFix compilation failure in CoverageMapping.cpp
Daniel Thornburgh [Wed, 25 Jan 2023 22:34:45 +0000 (14:34 -0800)]
Fix compilation failure in CoverageMapping.cpp

17 months ago[CUDA] Fix output from `ptxas` being removes as a temporary file
Joseph Huber [Wed, 25 Jan 2023 22:20:16 +0000 (16:20 -0600)]
[CUDA] Fix output from `ptxas` being removes as a temporary file

Summary:
The logic here is to add the `.cubin` temporary file if we had to create
a new filename to handle it. Unfortuantely the logic was wrong because
we compare `const char *` values here. This logic seems to have been
wrong for some time, but was never noticed since we never used the
relocatable output.

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

17 months agoReland [pgo] Avoid introducing relocations by using private alias
Paul Kirth [Thu, 19 Jan 2023 20:47:43 +0000 (20:47 +0000)]
Reland [pgo] Avoid introducing relocations by using private alias

In many cases, we can use an alias to avoid a symbolic relocations,
instead of using the public, interposable symbol. When the instrumented
function is in a COMDAT, we can use a hidden alias, and still avoid
references to discarded sections.

Previous versions of this patch allowed the compiler to name the
generated alias, but that would only be valid when the functions were
local. Since the alias may be used across TUs we use a more
deterministic naming convention, and add a ".local" suffix to the alias
name just as we do for relative vtables aliases.

https://reviews.llvm.org/rG20894a478da224bdd69c91a22a5175b28bc08ed9
removed an incorrect assertion on Mach-O which caused assertion failures in LLD.

We prevent duplicate symbols under ThinLTO + PGO + CFI by disabling
alias generation when the target function has MD_type metadata used in
CFI.

Reviewed By: phosek

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

17 months ago[llvm-cov] Look up object files using debuginfod
Daniel Thornburgh [Mon, 24 Oct 2022 22:35:00 +0000 (15:35 -0700)]
[llvm-cov] Look up object files using debuginfod

Reviewed By: gulfem

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

17 months ago[unittests] Use GTEST_SKIP() instead of return when appropriate
Paul Robinson [Wed, 25 Jan 2023 21:58:34 +0000 (13:58 -0800)]
[unittests] Use GTEST_SKIP() instead of return when appropriate

Basically NFC: A TEST/TEST_F/etc that bails out early (usually because
setup failed or some other runtime condition wasn't met) generally
should use GTEST_SKIP() to report its status correctly, unless it
takes steps to report another status (e.g., FAIL()).

I did see a handful of tests show up as SKIPPED after this change,
which is not unexpected. The status seemed appropriate in all the new
cases.

17 months ago[libc] fix strtointmax tests
Michael Jones [Wed, 25 Jan 2023 00:08:41 +0000 (16:08 -0800)]
[libc] fix strtointmax tests

The strtointmax tests weren't running because they depend on the same
shared logic as strtol tests and the target for that was being defined
after the inttypes targets, causing them to be skipped. This patch moves
the inttypes test directory later in the order so that the shared tests
are defined before inttypes tests try to use them.

Reviewed By: sivachandra, lntue

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

17 months ago[SCCP] Add additional tests for Add NUW/NSW flag inference.
Florian Hahn [Wed, 25 Jan 2023 21:41:14 +0000 (21:41 +0000)]
[SCCP] Add additional tests for Add NUW/NSW flag inference.

17 months ago[amdgpuarch] Delete stray hsa #include line
Jon Chesterfield [Wed, 25 Jan 2023 21:38:49 +0000 (21:38 +0000)]
[amdgpuarch] Delete stray hsa #include line

17 months ago[CodeGen] Split some functionality from DetectDeadLanes into its own class to be...
Craig Topper [Wed, 25 Jan 2023 21:09:58 +0000 (13:09 -0800)]
[CodeGen] Split some functionality from DetectDeadLanes into its own class to be reused. NFC

This is an alternative to D140382.

This moves the first part of runOnce into a new class that can be
reused by D129735. This encapsulates the ownership of the worklist,
and VRegInfos into the new class. The code for updating the dead
lanes stays in the DetectDeadLanes class.

The new class is created on the stack during runOnMachineFunction
so all the data structures will be deleted after each run.
Previously we only cleared them after each run so the memory might
have stayed allocated across runs. Except for VRegInfo which was
always deleted. Hopefully this allocation change isn't a big deal.

Reviewed By: BeMg

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

17 months ago[BOLT][NFC] Remove C-style out of bounds array ref
Rafael Auler [Wed, 25 Jan 2023 19:38:07 +0000 (11:38 -0800)]
[BOLT][NFC] Remove C-style out of bounds array ref

Old code breaks build with libstdc++ with assertions. Fix it.

17 months agoFix clang-tools-extra Sphinx build
Aaron Ballman [Wed, 25 Jan 2023 20:52:49 +0000 (15:52 -0500)]
Fix clang-tools-extra Sphinx build

This addresses the issue found in:
https://lab.llvm.org/buildbot/#/builders/115/builds/41077

17 months ago[AMDGPU] Remove predicates from real dot instructions. NFCI.
Stanislav Mekhanoshin [Wed, 25 Jan 2023 19:58:58 +0000 (11:58 -0800)]
[AMDGPU] Remove predicates from real dot instructions. NFCI.

These are copied from pseudos automatically.

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

17 months ago[Clang] Fix compilation errors for unsupported __bf16 intrinsics
Elizabeth Andrews [Tue, 10 Jan 2023 12:32:05 +0000 (04:32 -0800)]
[Clang] Fix compilation errors for unsupported __bf16 intrinsics

This patch uses existing deferred diagnostics framework to emit error
for unsupported type __bf16 in device code. Error is not emitted in
host code.

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

17 months ago[mlir][Pass] Make PassManager default to op-agnostic
rkayaith [Wed, 9 Nov 2022 04:23:28 +0000 (23:23 -0500)]
[mlir][Pass] Make PassManager default to op-agnostic

Currently `PassManager` defaults to being anchored on `builtin.module`.
Switching the default makes `PassManager` consistent with
`OpPassManager` and avoids the implicit dependency on `builtin.module`.

Specifying the anchor op type isn't strictly necessary when using
explicit nesting (existing pipelines will continue to work), but I've
updated most call sites to specify the anchor since it allows for better
error-checking during pipeline construction.

Reviewed By: rriddle

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

17 months agoFix a dead link in the docs
Aaron Ballman [Wed, 25 Jan 2023 20:07:14 +0000 (15:07 -0500)]
Fix a dead link in the docs

The link used to go to a page on Chris Lattner's site that has been
gone since at least 2015. Replaced the link with one that has similar
information to what Chris had.

Fixes #60238

17 months ago[clang-tidy] Fix segfault in bugprone-standalone-empty
Denis Nikitin [Wed, 25 Jan 2023 19:58:38 +0000 (19:58 +0000)]
[clang-tidy] Fix segfault in bugprone-standalone-empty

The check incorrectly identified empty() method call in the template
class definition as a stand-alone function call.
This led to a crash because the checker did not expect empty() function
calls without arguments.

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

Reviewed By: cjdb

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

17 months ago[Libomptarget] Add correct relative path for the nexgen plugin
Joseph Huber [Wed, 25 Jan 2023 20:04:25 +0000 (14:04 -0600)]
[Libomptarget] Add correct relative path for the nexgen plugin

Summary:
I forgot that this file "borrowed" the source from the other file tree.
Fix that.

17 months ago[Libomptarget] Clean up CUDA plugin CMake files
Joseph Huber [Wed, 25 Jan 2023 19:39:02 +0000 (13:39 -0600)]
[Libomptarget] Clean up CUDA plugin CMake files

Clean up this file after changing it in D142568.

Depends on D142568

Reviewed By: tianshilei1992

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

17 months ago[Libomptarget] Remove find_package(CUDA) as it has been deprecated
Joseph Huber [Wed, 25 Jan 2023 19:19:37 +0000 (13:19 -0600)]
[Libomptarget] Remove find_package(CUDA) as it has been deprecated

Since D137724 and the LLVM 17 release we have updated to CMake version
3.20. This means that `find_package(CUDA)` is officially deprecated and
can be replaced with `find_package(CUDAToolkit)` instead. This patch
does this and also cleans up a bit of the CMake.

Reviewed By: tianshilei1992

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

17 months ago[nvptx-arch] Remove `find_package(CUDA)` as it has been deprecated.
Joseph Huber [Wed, 25 Jan 2023 19:24:34 +0000 (13:24 -0600)]
[nvptx-arch] Remove `find_package(CUDA)` as it has been deprecated.

Since D137724 and the LLVM 17 release we have updated to CMake version
3.20. This means we can use `find_package(CUDAToolkit)` instead as the
legacy module is deprecated.

Reviewed By: tianshilei1992

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

17 months ago[GVN] Improve PRE on load instructions
Guozhi Wei [Wed, 25 Jan 2023 19:45:01 +0000 (19:45 +0000)]
[GVN] Improve PRE on load instructions

This patch implements the enhancement proposed by
https://github.com/llvm/llvm-project/issues/59312.

Suppose we have following code

   v0 = load %addr
   br %LoadBB

 LoadBB:
   v1 = load %addr
   ...

 PredBB:
   ...
   br %cond, label %LoadBB, label %SuccBB

 SuccBB:
   v2 = load %addr
   ...

Instruction v1 in LoadBB is partially redundant, edge (PredBB, LoadBB) is a
critical edge. SuccBB is another successor of PredBB, it contains another load
v2 which is identical to v1. Current GVN splits the critical edge
(PredBB, LoadBB) and inserts a new load in it. A better method is move the load
of v2 into PredBB, then v1 can be changed to a PHI instruction.

If there are two or more similar predecessors, like the test case in the bug
entry, current GVN simply gives up because otherwise it needs to split multiple
critical edges. But we can move all loads in successor blocks into predecessors.

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

17 months ago[BOLT] Use LTO fuzzy name matching in function-order
Amir Ayupov [Wed, 25 Jan 2023 19:37:55 +0000 (11:37 -0800)]
[BOLT] Use LTO fuzzy name matching in function-order

Allow partial name matching wrt LTO suffixes in `function-order`
user-supplied function list, the same as permitted by profile matching.

Reviewed By: #bolt, rafauler

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

17 months ago[BOLT] Emit a warning about invalid entries in function-order list
Amir Ayupov [Wed, 25 Jan 2023 19:37:42 +0000 (11:37 -0800)]
[BOLT] Emit a warning about invalid entries in function-order list

Move individual warnings under verbosity >= 1, print out a warning with
aggregate number.

Reviewed By: #bolt, rafauler

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

17 months ago[mlir][sparse] (re)introducing getRankedTensorType/getMemrefType
wren romano [Tue, 24 Jan 2023 21:23:52 +0000 (13:23 -0800)]
[mlir][sparse] (re)introducing getRankedTensorType/getMemrefType

The bulk of D142074 seems to have gotten overwritten due to some sort of merge conflict (afaict there's no record of it having been reverted intentionally).  So this commit redoes those changes.  In addition to the original changes, this commit also:
* moves the definition of `getRankedTensorType` (from `Transforms/CodegenUtils.h` to `IR/SparseTensor.h`), so that it can be used by `IR/SparseTensorDialect.cpp`.
* adds `getMemRefType` as another abbreviation.

Reviewed By: aartbik

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

17 months ago[mlir][scf] Fix typo in comment in BufferizableOpInterfaceImpl.cpp (NFC).
Ingo Müller [Wed, 25 Jan 2023 16:22:11 +0000 (16:22 +0000)]
[mlir][scf] Fix typo in comment in BufferizableOpInterfaceImpl.cpp (NFC).

Reviewed By: ingomueller-net

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

17 months ago[lldb][test] Replace use of p with expression (NFC)
Dave Lee [Wed, 11 Jan 2023 19:37:07 +0000 (11:37 -0800)]
[lldb][test] Replace use of p with expression (NFC)

In API tests, replace use of the `p` alias with the `expression` command.

To avoid conflating tests of the alias with tests of the expression command,
this patch canonicalizes to the use `expression`.

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

17 months ago[clang][CodeGen][NFC] Fix `llvm-else-after-return`
Michael Liao [Wed, 25 Jan 2023 15:19:44 +0000 (15:19 +0000)]
[clang][CodeGen][NFC] Fix `llvm-else-after-return`

17 months ago[mlir][tosa] Update tosa.avg_pool2d for bit-exact TOSA behavior
Rob Suderman [Wed, 25 Jan 2023 17:58:03 +0000 (17:58 +0000)]
[mlir][tosa] Update tosa.avg_pool2d for bit-exact TOSA behavior

The normalization component of average pool has a very specific
rounding behavior for compouting the division for floating
point values. Updated so that the bit-exact version is implemented.

Also includes a fix for computing the stride part of the average pool
operation.

Reviewed By: jpienaar

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

17 months ago[Clang] Add sanity check in Sema::getDestructorName to prevent nullptr dereference
Shafik Yaghmour [Wed, 25 Jan 2023 18:47:21 +0000 (10:47 -0800)]
[Clang] Add sanity check in Sema::getDestructorName to prevent nullptr dereference

Currently in Sema::getDestructorName we call SS.getScopeRep()->getPrefix() but
SS.getScopeRep() can return nullptr because LookupInNestedNameSpec(...) called a
little before can invalidate SS.

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

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

17 months agoAMDGPU: Convert some tests to opaque pointers
Matt Arsenault [Wed, 25 Jan 2023 14:04:26 +0000 (10:04 -0400)]
AMDGPU: Convert some tests to opaque pointers

17 months agoLangRef: Fix extra spaces in udec_wrap description
Matt Arsenault [Wed, 25 Jan 2023 13:45:48 +0000 (09:45 -0400)]
LangRef: Fix extra spaces in udec_wrap description

17 months ago[llvm-c] Remove LLVMContextSetOpaquePointers
Arthur Eubanks [Tue, 6 Dec 2022 17:20:08 +0000 (09:20 -0800)]
[llvm-c] Remove LLVMContextSetOpaquePointers

Reviewed By: nikic

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

17 months agoRevert "Recommit "[SCCP] Use range info to prove AddInst has NUW flag.""
Florian Hahn [Wed, 25 Jan 2023 18:22:24 +0000 (18:22 +0000)]
Revert "Recommit "[SCCP] Use range info to prove AddInst has NUW flag.""

This reverts commit 366e1faa2fffd5b2284e25b09b6a26bcd2aca2b7.

It looks like this exposes another set of crashes on the buildbots.
Revert while I investigate.

17 months agoRecommit "[SCCP] Use range info to prove AddInst has NUW flag."
Florian Hahn [Wed, 25 Jan 2023 18:07:24 +0000 (18:07 +0000)]
Recommit "[SCCP] Use range info to prove AddInst has NUW flag."

The recommitted version fixes a crash when one of the operands is a
constant other than a ConstantInt. Test for that case have been added
in 5b16cd97b8e1c273.

It splits off the new logic into a separate function because setting the
flags is quite different compared to the other cases handled in replaceSignedInst
which all require replacing an existing instruction. Instructions are
now refined before any replacements are done, which has the advantage
that we should have lattice values for all operands (fixing the crashes
and simplifies the logic) and also allows optimizing more cases where one
of the operands also gets replaced (see improvements in
@sge_with_sext_to_zext_conversion).

It also guards makeGuaranteedNoWrapRegion by `if (!Inst.hasNoUnsignedWrap())`
as discussed in the review.

Fixes #60280.
Fixes #60278.

Original message:
    This patch updates SCCP to use the value ranges of AddInst operands to
    try to prove the AddInst does not overflow in the unsigned sense and
    adds the NUW flag. The reasoning is done with
    makeGuaranteedNoWrapRegion (thanks @nikic for point it out!).

    Follow-ups will include adding NSW and extension to more
    OverflowingBinaryOperators.

    Reviewed By: nikic

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

17 months ago[ScheduleDAG] Fix removing edges with weak deps
Austin Kerbow [Mon, 23 Jan 2023 05:26:08 +0000 (21:26 -0800)]
[ScheduleDAG] Fix removing edges with weak deps

In SUnit::removePred edges are removed from the Preds and Succs lists before
updating the bookkeeping. This could result in incorrect values for
NumPreds/SuccsLeft and cause WeakPreds/SuccsLeft to underflow, since the
incorrect SDep will be used to update these values.

Reviewed By: rampitec

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

17 months agoAvoid removing useful loop metadata when stripping debug info
She Dongrui [Wed, 25 Jan 2023 17:52:48 +0000 (09:52 -0800)]
Avoid removing useful loop metadata when stripping debug info

The stripDebugLocFromLoopID() may mistakenly remove useful metadata nodes
when they are operands of a child node, which also has DILocation operands.

It can be reproduced by the output of clang for code similar to the following:

for(int i = 0; i < n; i++)
  x[i] = 10;
-strip-debug removes the child node of llvm.loop.vectorize.followup_all,
which contains llvm.loop.isvectorized and llvm.loop.unroll.count.

This patch fixes by checking all children nodes and only remove a metadata
node if all its children are DILocation.

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

17 months ago[ASan][libcxx] Annotating std::vector with all allocators
Advenam Tacet [Wed, 25 Jan 2023 18:01:24 +0000 (19:01 +0100)]
[ASan][libcxx] Annotating std::vector with all allocators

This revision is a part of a series of patches extending
AddressSanitizer C++ container overflow detection
capabilities by adding annotations, similar to those existing
in std::vector, to std::string and std::deque collections.
These changes allow ASan to detect cases when the instrumented
program accesses memory which is internally allocated by
the collection but is still not in-use (accesses before or
after the stored elements for std::deque, or between the size and
capacity bounds for std::string).

The motivation for the research and those changes was a bug,
found by Trail of Bits, in a real code where an out-of-bounds read
could happen as two strings were compared via a std::equals function
that took iter1_begin, iter1_end, iter2_begin iterators
(with a custom comparison function).
When object iter1 was longer than iter2, read out-of-bounds on iter2
could happen. Container sanitization would detect it.

In revision D132522, support for non-aligned memory buffers (sharing
first/last granule with other objects) was added, therefore the
check for standard allocator is not necessary anymore.
This patch removes the check in std::vector annotation member
function (__annotate_contiguous_container) to support
different allocators.

If you have any questions, please email:
 - advenam.tacet@trailofbits.com
 - disconnect3d@trailofbits.com

Reviewed By: #libc, #sanitizers, philnik, vitalybuka

Spies: EricWF, philnik, #sanitizers, libcxx-commits

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

17 months ago[libc] Implement strcasestr
Alex Brachet [Wed, 25 Jan 2023 17:58:13 +0000 (17:58 +0000)]
[libc] Implement strcasestr

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

17 months ago[RS4GC] Remove the hardcoded GC strategy names (v2)
Campbell Suter [Wed, 25 Jan 2023 14:12:19 +0000 (17:12 +0300)]
[RS4GC] Remove the hardcoded GC strategy names (v2)

Previously, RewriteStatepointsForGC had a hardcoded list of GC
strategies for which it would run, and using it with a custom strategy
required patching LLVM.

The logic for selecting the variables that are considered managed was
also hardcoded to use pointers in address space 1, rather than
delegating to GCStrategy::isGCManagedPointer.

This patch fixes both of these flaws: this pass now applies to all
functions whose GCStrategy returns true for useStatepoints, and checking
if a pointer is managed or not is also now done by the strategy.

One potentially questionable design decision in this change: the pass will
be enabled for all GC strategies that use statepoints. It seems unlikely
this would be a problem - consumers that don't use this pass probably
aren't adding it to the pass manager anyway - but if you had two different
GC strategies and only one wants this pass enabled then that'd need a new
flag in GCStrategy, which I can add if anyone thinks it's necessary.

This is an updated version of D140458, rebased to account for LLVM's
changes since D140504 (required by this patch) landed.

Reviewed By: dantrushin

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

17 months agoFix assertion in GCStrategy.
Denis Antrushin [Wed, 25 Jan 2023 17:17:06 +0000 (20:17 +0300)]
Fix assertion in GCStrategy.

It meant to check that `UseRS4GC` requires `UseStatepoints`.
Instead it always required `UseStatepoints` when `useRS4GC()`
was called.