platform/upstream/llvm.git
13 months ago[LLVM] Removes CMake work-arounds.
Mark de Wever [Sun, 4 Jun 2023 15:46:02 +0000 (17:46 +0200)]
[LLVM] Removes CMake work-arounds.

CMake older than 3.20.0 is no longer supported.
This removes work-arounds for no longer supported versions.

Reviewed By: kwk

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

13 months ago[gn] port 66a562d22e7 more (libc++ _LIBCPP_HAS_NO_FILESYSTEM)
Nico Weber [Wed, 7 Jun 2023 16:00:39 +0000 (12:00 -0400)]
[gn] port 66a562d22e7 more (libc++ _LIBCPP_HAS_NO_FILESYSTEM)

13 months agoAdd support for the NO_COLOR environment variable
Aaron Ballman [Wed, 7 Jun 2023 15:53:08 +0000 (11:53 -0400)]
Add support for the NO_COLOR environment variable

Clang currently supports disabling color diagnostic output via
-fno-color-diagnostics. However, there is a somewhat long-standing push
to support use of an environment variable to override color output so
that users can set up their terminal such that most color output is
disabled (largely for accessibility reasons).

There are two competing de facto standards to accomplish this:
  NO_COLOR (https://no-color.org/) and
  CLICOLOR/CLICOLOR_FORCE (http://bixense.com/clicolors/).

This patch adds support for NO_COLOR as that appears to be the more
commonly supported feature, at least when comparing issues and pull
requests:
https://github.com/search?q=NO_COLOR&type=issues (2.2k issues, 35k pull requests)
https://github.com/search?q=CLICOLOR&type=issues (1k issues, 3k pull requests)

It's also the more straightforward and thoroughly-specified of the two
options. If NO_COLOR is present as an environment variable (regardless
of value), color output is suppressed unless the command line specifies
use of color output (command line takes precedence over the environment
variable).

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

13 months ago[RISCV] Use inheritance to reduce repeated code in RISCVInstrInfoV.td. NFC
Craig Topper [Wed, 7 Jun 2023 15:49:45 +0000 (08:49 -0700)]
[RISCV] Use inheritance to reduce repeated code in RISCVInstrInfoV.td. NFC

Reviewed By: pcwang-thead

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

13 months ago[MLIR] Removes CMake work-arounds.
Mark de Wever [Sun, 4 Jun 2023 15:42:38 +0000 (17:42 +0200)]
[MLIR] Removes CMake work-arounds.

CMake older than 3.20.0 is no longer supported.
This removes work-arounds for no longer supported versions.

Reviewed By: mehdi_amini

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

13 months ago[compiler-rt] Removes CMake work-arounds.
Mark de Wever [Sun, 4 Jun 2023 15:44:30 +0000 (17:44 +0200)]
[compiler-rt] Removes CMake work-arounds.

CMake older than 3.20.0 is no longer supported.
This removes work-arounds for no longer supported versions.

Reviewed By: phosek

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

13 months ago[gn] port 66a562d22e7 (libc++ _LIBCPP_HAS_NO_FILESYSTEM)
Nico Weber [Wed, 7 Jun 2023 15:37:07 +0000 (11:37 -0400)]
[gn] port 66a562d22e7 (libc++ _LIBCPP_HAS_NO_FILESYSTEM)

13 months agoRevert "[flang][hlfir] allow recursive intrinsic lowering"
Tom Eccles [Wed, 7 Jun 2023 15:23:52 +0000 (15:23 +0000)]
Revert "[flang][hlfir] allow recursive intrinsic lowering"

This reverts commit 6bcfab3161ea3a90b26dce3f85ba052933060b73.

Reverting because this breaks the build with MSVC

13 months ago[TableGen] Emit separate computeRequiredFeatures() function
Pavel Kosov [Wed, 7 Jun 2023 13:05:46 +0000 (16:05 +0300)]
[TableGen] Emit separate computeRequiredFeatures() function

A function is already emitted in *GenInstrInfo.inc that takes Opcode
number and a set of supported Features and reports fatal error if some
of the required features are missing.

The information about features required by the particular opcode can be
reused by llvm-exegesis, so move its computation info a separate
computeRequiredFeatures() function. Then verifyInstructionPredicates()
can just compare the sets of available and required features computed by
the other functions.

This commit moves the definition of FeatureBitsets[] as well as CEFBS_*
enumerator values (that are indices into FeatureBitsets[] array) inside
the computeRequiredFeatures() function because these are implementation
details of that function. The inclusion of potentially huge
computeRequiredFeatures() function is now controlled by a dedicated
macro that is set for simplicity by TableGen-erated code itself if
`defined(ENABLE_INSTR_PREDICATE_VERIFIER) && !defined(NDEBUG)`.

~~

Huawei RRI, OS Lab

Reviewed By: courbet

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

13 months ago[Option] Support special argument "--"
Fangrui Song [Wed, 7 Jun 2023 15:06:05 +0000 (08:06 -0700)]
[Option] Support special argument "--"

Many command line option implementations, including getopt_long and our
Support/CommandLine.cpp, support `--` as an end-of-option indicator. All
the subsequent arguments are then treated as positional arguments.

D1387 added KIND_REMAINING_ARGS and 76ff1d915c9c42823a3f2b08ff936cf7a48933c5 dropped special handling of `--`.
Users need to add `def DASH_DASH : Option<["--"], "", KIND_REMAINING_ARGS>;` and
append `OPT_DASH_DASH` to the `OPT_INPUT` list., which is not ergonomic.

Restore this feature under an option and modify llvm-strings to utilize the
feature as an example. In the future, we probably should enable this feature by
default and exclude some tools that handle `DASH_DASH` differently (clang,
clang-scan-deps, etc. I suspect that many are workarounds for LLVMOption not
supporting `--` as a built-in feature).

Reviewed By: serge-sans-paille

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

13 months ago[libc++] Roll up fstream support into filesystem support
Louis Dionne [Wed, 31 May 2023 18:20:24 +0000 (11:20 -0700)]
[libc++] Roll up fstream support into filesystem support

LIBCXX_ENABLE_FILESYSTEM should represent whether the platform has
support for a filesystem, not just whether we support <filesystem>.
This patch slightly generalizes the setting to also encompass whether
we provide <fstream>, since that only makes sense when a filesystem is
supported.

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

13 months ago[ASAN] Fix validation size for dirent on FreeBSD
Justin Cady [Wed, 7 Jun 2023 14:59:07 +0000 (10:59 -0400)]
[ASAN] Fix validation size for dirent on FreeBSD

Typically the size required to represent a dirent is stored in `d_reclen`. But
this not always the case for FreeBSD (for example, when walking a directory
over NFS).

This leads to ASAN false positives for `scandir` and similar functions. Because
ASAN uses `d_reclen` for the range to validate, it can overrun when `d_reclen` is
incorrect (too large).

This change adds `__sanitizer_dirsiz` which fixes the dirent size calculation
for FreeBSD. Other platforms continue to use `d_reclen`.

Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D151583

13 months ago[clang][DeclPrinter] Fix AST print of out-of-line record definitions
Timo Stripf [Wed, 7 Jun 2023 14:57:31 +0000 (10:57 -0400)]
[clang][DeclPrinter] Fix AST print of out-of-line record definitions

DeclPrinter::VisitCXXRecordDecl did not output qualifiers for records.
As result, the output of out-of-line record definitions was incorrect.

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

13 months ago[DebugMetadata] Simplify handling subprogram's retainedNodes field. NFCI (1/7)
Kristina Bessonova [Mon, 13 Mar 2023 12:27:45 +0000 (13:27 +0100)]
[DebugMetadata] Simplify handling subprogram's retainedNodes field. NFCI (1/7)

RFC https://discourse.llvm.org/t/rfc-dwarfdebug-fix-and-improve-handling-imported-entities-types-and-static-local-in-subprogram-and-lexical-block-scopes/68544

Currently, `retainedNodes` tracks function-local variables and labels.
To support function-local import, types and static variables (which are globals
in LLVM IR), subsequent patches use the same field. So this patch makes
preliminary refactoring of the code tracking local entities to apply future
functional changes lucidly and cleanly.

No functional changes intended.

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

13 months ago[flang][hlfir] allow recursive intrinsic lowering
Tom Eccles [Tue, 6 Jun 2023 15:15:25 +0000 (15:15 +0000)]
[flang][hlfir] allow recursive intrinsic lowering

We need to allow recursive application of intrinsic lowering patterns,
otherwise we cannot lower nested calls of the same intrinsic e.g.
matmul(matmul(a, b), c).

matmul(matmul(a, b), matmul(c, d)) requires hlfir.associate of hlfir
expr with more than one use (TODO).

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

13 months ago[flang][hlfir] relax the strictness of intrinsic verifiers
Tom Eccles [Fri, 2 Jun 2023 16:53:20 +0000 (16:53 +0000)]
[flang][hlfir] relax the strictness of intrinsic verifiers

The verifiers for hlfir.matmul and hlfir.transpose try to ensure that
the shape of the result value makes sense given the shapes of the input
argument(s).

It there are some cases in the gfortran tests where lowering knows a bit
more about shape information than (HL)FIR. I think the cases here will be
solved when hlfir.shape_meet is implemented.

But in the meantime, and to improve robustness, I've relaxed the
verifier to allow the return type to have more precise shape information
than can be deduced from the argument type(s).

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

13 months ago[gn] port 1794532bb94
Nico Weber [Wed, 7 Jun 2023 14:17:48 +0000 (10:17 -0400)]
[gn] port 1794532bb94

13 months ago[gn] port d19a3834dce5
Nico Weber [Wed, 7 Jun 2023 14:15:43 +0000 (10:15 -0400)]
[gn] port d19a3834dce5

13 months ago[LV] Add option to tune the cost model, NFC
zhongyunde [Wed, 7 Jun 2023 13:50:54 +0000 (21:50 +0800)]
[LV] Add option to tune the cost model, NFC

For Neon, the default nonconst stride cost is conservative,
and it is a local variable, which is not convenience to
to tune the loop vectorize.
So I try to use a option, which is similar to SVEGatherOverhead brought in D115143.
Fix https://github.com/llvm/llvm-project/issues/63082.

Reviewed By: dmgreen, fhahn
Differential Revision: https://reviews.llvm.org/D152253

13 months agoReland "D144999 [MC][MachO]Only emits compact-unwind format for "canonical" personali...
Vy Nguyen [Tue, 6 Jun 2023 18:00:47 +0000 (14:00 -0400)]
Reland "D144999 [MC][MachO]Only emits compact-unwind format for "canonical" personality symbols. For the rest, use DWARFs."

Reasons for rolling forward:
    - the crash reported from Chromium was fixed in D151824 (not related to this patch at all)
    - since D152824 was committed, it should now be safe to roll this forward.

New change:
    - add an additional _ in name check

This reverts commit 4980eead4d0b4666d53dad07afb091375b3a13a0.

13 months ago[Clang] Convert some tests to opaque pointers (NFC)
Nikita Popov [Wed, 7 Jun 2023 13:16:35 +0000 (15:16 +0200)]
[Clang] Convert some tests to opaque pointers (NFC)

13 months ago[clang][CodeGen] Fix GPU-specific attributes being dropped by bitcode linking
pvanhout [Tue, 6 Jun 2023 11:32:00 +0000 (13:32 +0200)]
[clang][CodeGen] Fix GPU-specific attributes being dropped by bitcode linking

Device libs make use of patterns like this:
```
__attribute__((target("gfx11-insts")))
static unsigned do_intrin_stuff(void)
{
  return __builtin_amdgcn_s_sendmsg_rtnl(0x0);
}
```
For functions that are assumed to be eliminated if the currennt GPU target doesn't support them.
At O0 such functions aren't eliminated by common optimizations but often by AMDGPURemoveIncompatibleFunctions instead, which sees the "+gfx11-insts" attribute on, say, GFX9 and knows it's not valid, so it removes the function.

D142907 accidentally made it so such attributes were dropped during bitcode linking, making it impossible for RemoveIncompatibleFunctions to catch the functions and causing ISel to catch fire eventually.

This fixes the issue and adds a new test to ensure we don't accidentally fall into this trap again.

Fixes SWDEV-403642

Reviewed By: arsenm, yaxunl

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

13 months ago[TableGen] Add !setdagarg and !setdagname
Michael Liao [Wed, 31 May 2023 03:34:47 +0000 (23:34 -0400)]
[TableGen] Add !setdagarg and !setdagname

- This patch proposes to add `!setdagarg` and `!setdagname` bang
  operators to produce a new DAG node after replacing the specified
  argument value/name from the given input DAG node. E.g.,
  `!setdagarg((foo 1, 2), 0, "x")` produces `(foo "x", 2)` and
  `!setdagname((foo 1:$a, 2:$b), 1, "c")` produces `(foo 1:$a, 2:$c)`.

Reviewed By: simon_tatham

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

13 months ago[X86][FP16] Do not generate VBROADCAST for fp16
Phoebe Wang [Wed, 7 Jun 2023 08:15:06 +0000 (16:15 +0800)]
[X86][FP16] Do not generate VBROADCAST for fp16

We cannot lower VBROADCAST i16 under AVX1.

Fixes #63114

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

13 months agoPreISelIntrinsicLowering: Identify load.relative with intrinsic id
Matt Arsenault [Wed, 7 Jun 2023 12:16:51 +0000 (08:16 -0400)]
PreISelIntrinsicLowering: Identify load.relative with intrinsic id

13 months agoAMDGPU: Add MF independent version of getImplicitParameterOffset
Matt Arsenault [Wed, 7 Jun 2023 11:56:16 +0000 (07:56 -0400)]
AMDGPU: Add MF independent version of getImplicitParameterOffset

13 months agoAMDGPU: Use available subtarget member
Matt Arsenault [Wed, 7 Jun 2023 11:47:52 +0000 (07:47 -0400)]
AMDGPU: Use available subtarget member

13 months ago[Clang][OpenMP] Fix -Wcovered-switch-default in CGOpenMPRuntime.cpp (NFC)
Jie Fu [Wed, 7 Jun 2023 12:23:48 +0000 (20:23 +0800)]
[Clang][OpenMP] Fix -Wcovered-switch-default in CGOpenMPRuntime.cpp (NFC)

/data/llvm-project/clang/lib/CodeGen/CGOpenMPRuntime.cpp:1621:3: error: default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default]
  default:
  ^
/data/llvm-project/clang/lib/CodeGen/CGOpenMPRuntime.cpp:1643:3: error: default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default]
  default:
  ^
2 errors generated.

13 months ago[AArch64][SVE] Add a commutative VSelectCommPredOrPassthruPatFrags
David Green [Wed, 7 Jun 2023 12:18:16 +0000 (13:18 +0100)]
[AArch64][SVE] Add a commutative VSelectCommPredOrPassthruPatFrags

This adds a commutative version of VSelectPredOrPassthruPatFrags (renamed from
EitherVSelectOrPassthruPatFrags) that checks both variants for commutative
operations like min/max. I have not attempted to handle fp operation that
require fast-math flags.

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

13 months ago[Clang][OpenMP][IRBuilder] Move registerTargetGlobalVariable & getAddrOfDeclareTarget...
Andrew Gozillon [Wed, 7 Jun 2023 11:36:44 +0000 (06:36 -0500)]
[Clang][OpenMP][IRBuilder] Move registerTargetGlobalVariable & getAddrOfDeclareTargetVar into the OMPIRBuilder

This change tries to move registerTargetglobalVariable and
getAddrOfDeclareTargetVar out of Clang's CGOpenMPRuntime
and into the OMPIRBuilder for shared use with MLIR's OpenMPDialect
and Flang (or other languages that may want to utilise it).

This primarily does this by trying to hoist the Clang specific
types into arguments or callback functions in the form of
lambdas, replacing it with LLVM equivelants and
utilising shared OMPIRBuilder enumerators for
the clauses, rather than Clang's own variation.

Reviewers: jsjodin, jdoerfert

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

13 months ago[compiler-rt] Do not redefine builtins in MinGW configs either
Martin Storsjö [Wed, 7 Jun 2023 11:43:56 +0000 (14:43 +0300)]
[compiler-rt] Do not redefine builtins in MinGW configs either

This fixes broken mingw builds since
0a71e25e2448ee471b1ebe74e910c5de9b9c82b4. Clang-cl style builds
were broken similarly, but were fixed in
caa2c1bacbd76c017ebbb4fd13861f0f66770299, with the comment
"Do not redefine builtins on Windows", even if the fix only affected
Clang-cl style builds.

13 months ago[flang][hlfir] Add hlfir.dot_product intrinsic
Jacob Crawley [Mon, 5 Jun 2023 15:23:50 +0000 (15:23 +0000)]
[flang][hlfir] Add hlfir.dot_product intrinsic

Adds a new HLFIR operation for the DOT_PRODUCT intrinsic according to
the design set out in flang/docs/HighLevel.md. This patch includes all
the necessary changes to create a new HLFIR operation and lower it into
the fir runtime call.

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

13 months ago[libc] Silence warning about returning from noreturn function
Joseph Huber [Wed, 7 Jun 2023 11:22:42 +0000 (06:22 -0500)]
[libc] Silence warning about returning from noreturn function

The `exit` entrypoint calls into `quick_exit` which is marked noreturn
in some cases. This will cause errors because we then have control flow
externally. This warning can be silenced by using a
`__builtin_unreachable` instruction accordingly.

Reviewed By: sivachandra, lntue

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

13 months ago[sanitizer_common] Use interception macros for s390 __tls_get_addr declarations
Marco Elver [Wed, 7 Jun 2023 11:07:44 +0000 (13:07 +0200)]
[sanitizer_common] Use interception macros for s390 __tls_get_addr declarations

NFC.

13 months ago[clang] Show error if defaulted comparions operator function is volatile or has ref...
Jens Massberg [Fri, 21 Apr 2023 14:41:43 +0000 (16:41 +0200)]
[clang] Show error if defaulted comparions operator function is volatile or has ref-qualifier &&.

This patch implemed the change proposed in [P2002R1] to 11.11.1 [class.compare.default] paragraph 1.

A defaulted compariosn operator function must be non-volatile and must either have no ref-qualifier or the ref-qualifier &.

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

13 months ago[AMDGPU][NFC] Add a getRegBitWidth() helper for TargetRegisterClass operands.
Ivan Kosarev [Wed, 7 Jun 2023 10:05:05 +0000 (11:05 +0100)]
[AMDGPU][NFC] Add a getRegBitWidth() helper for TargetRegisterClass operands.

Reviewed By: foad

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

13 months ago[clangd] Add semantic token for labels
Christian Kandeler [Fri, 3 Feb 2023 11:37:58 +0000 (12:37 +0100)]
[clangd] Add semantic token for labels

Reviewed By: kadircet

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

13 months ago[CGP] Add test to show the missed case in remove llvm.assume
Serguei Katkov [Wed, 7 Jun 2023 09:47:07 +0000 (16:47 +0700)]
[CGP] Add test to show the missed case in remove llvm.assume

13 months ago[mlir][transform] Add builder to ApplyPatternsOp
Matthias Springer [Wed, 7 Jun 2023 09:52:56 +0000 (11:52 +0200)]
[mlir][transform] Add builder to ApplyPatternsOp

Add a builder that takes a callback to construct the body of the op.

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

13 months ago[AMDGPU] Turn off pass to rewrite partially used virtual superregisters after RenameI...
Valery Pykhtin [Tue, 6 Jun 2023 17:52:09 +0000 (19:52 +0200)]
[AMDGPU] Turn off pass to rewrite partially used virtual superregisters after RenameIndependentSubregs pass with registers of minimal size.

There is a failure with this pass in the case when target register class for a subregister isn't known from instruction description (for ex. COPY).
Currently in this situation the RC is obtained using TargetRegisterInfo::getSubRegisterClass but in general it's not working.

In order to fix this two things should be done:
1. Stop processing a subregister if the target register class is unknown (conservative approach)
2. Improve deduction of subregister' target register class (i.e by processing COPY chain)

I was going to implement point 1 but my tests use implicit operands for S_NOP and they don't have associated target register class and all tests fail.
Therefore I decided to turn off the pass now, implement point 1 and fix my tests.

Reviewed By: arsenm, #amdgpu

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

13 months ago[X86] Add test case for Issue #63108
Simon Pilgrim [Wed, 7 Jun 2023 09:19:07 +0000 (10:19 +0100)]
[X86] Add test case for Issue #63108

13 months ago[include-cleaner] Report all specializations if the primary template is introduced...
Haojian Wu [Tue, 6 Jun 2023 14:09:46 +0000 (16:09 +0200)]
[include-cleaner] Report all specializations if the primary template is introduced by a using-decl.

This will fix unused-include false positive.

```
// primary.h
namespace ns {
template<class T1, class T2> class Z {}; // primary template
}

// partial.h
namespace ns {
template<class T> class Z<T, T*> {};     // partial specialization
}

// main.cpp

using ns::Z; // refs to the primary
void k() {
  Z<int, int*> z; // use the partial specialization
}
```

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

13 months ago[mlir][vector][transform] Add ApplyCastAwayVectorLeadingOneDimPatternsOp
Matthias Springer [Wed, 7 Jun 2023 07:50:24 +0000 (09:50 +0200)]
[mlir][vector][transform] Add ApplyCastAwayVectorLeadingOneDimPatternsOp

Expose the respective patterns as a transform op.

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

13 months ago[clang] Fix assertion while parsing an invalid for loop
Corentin Jabot [Fri, 2 Jun 2023 17:15:03 +0000 (19:15 +0200)]
[clang] Fix assertion while parsing an invalid for loop

with multiple declarations followed by a colon.

Fixes #63010

Reviewed By: shafik

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

13 months agoRevert "[compiler-rt] Allow 3 simultaneous interceptors on Linux"
Marco Elver [Wed, 7 Jun 2023 08:15:49 +0000 (10:15 +0200)]
Revert "[compiler-rt] Allow 3 simultaneous interceptors on Linux"

This reverts commit 57882fe76e1826593cd0e53f73484b184c5007c4.
This reverts commit 74b0ac571b5facee3c8038d21ed71d7a29ee1098.

Breaks various build bots.

13 months ago[AsmPrinter][AMDGPU] Generate uwtable entries in .eh_frame
Juan Manuel MARTINEZ CAAMAÑO [Wed, 7 Jun 2023 07:54:16 +0000 (09:54 +0200)]
[AsmPrinter][AMDGPU] Generate uwtable entries in .eh_frame

Consider only targets where `MCAsmInfo::ExceptionsType == ExceptionHandling::None`
and that support CFI (when `MCAsmInfo::UsesCFIForDebug` is set to true):
currently, only AMDGPU.

This patch enables the emission of CFI information in the .eh_frame
section when the uwtable attribute is present on a function.

Before, we could generate CFI information for debugging puproses only.

This patch prepares AMDGPU to support collecting GPU stack traces in the future.

I did a first implementation (https://reviews.llvm.org/D139024)
but at the time I had not realized that no other platform used
`UsesCFIForDebug`.

Reviewed By: scott.linder

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

13 months ago[NFC][RFC][TableGen] Split GlobalISelEmitter.cpp
pvanhout [Thu, 25 May 2023 12:19:08 +0000 (14:19 +0200)]
[NFC][RFC][TableGen] Split GlobalISelEmitter.cpp

This patch splits the GlobalISelEmitter.cpp file, which imports DAG ISel patterns for GISel, into separate "GISelMatchTable.h/cpp" files.

The main motive is readability & maintainability. GlobalISelEmitter.cpp was about 6400 lines of mixed code, some bits implementing the match table codegen, some others dedicated to importing DAG patterns.

Now it's down to  2700 + a 2150 header + 2000 impl.
It's a tiny bit more lines overall but that's to be expected - moving
inline definitions to out-of-line, adding comments in the .cpp, etc. all of that takes additional space, but I think the tradeoff is worth it.

I did as little unrelated code changes as possible, I would say the biggest change is the introduction of the `gi` namespace used to prevent name conflicts/ODR violations with type common names such as `Matcher`.
It was previously not an issue because all of the code was in an anonymous namespace.

This moves all of the "match table" code out of the file, so predicates,
rules, and actions are all separated now. I believe this helps separating concerns, now `GlobalISelEmitter.cpp` is more focused on importing DAG patterns into GI, instead of also containing the whole match table internals as well.

Note: the new files have a "GISel" prefix to make them distinct from the other "GI" files in the same folder, which are for the combiner.

Reviewed By: aemerson

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

13 months ago[CMake] Add option to link LLVM/subproject executables against LLVM libc
Aiden Grossman [Sun, 28 May 2023 02:34:30 +0000 (02:34 +0000)]
[CMake] Add option to link LLVM/subproject executables against LLVM libc

This patch adds in CMake option LLVM_ENABLE_LLVM_LIBC which when set to
true automatically builds LLVM libc in overlay mode and links all
generated executables against the libc overlay. This is intended to
somewhat mirror the LLVM_ENABLE_LIBCXX flag.

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

13 months agoFix "[compiler-rt] Allow 3 simultaneous interceptors on Linux"
Marco Elver [Wed, 7 Jun 2023 07:17:43 +0000 (09:17 +0200)]
Fix "[compiler-rt] Allow 3 simultaneous interceptors on Linux"

No need to "error" on unsupported architectures, since we technically
only care where the macro is used. If the macro is undefined, and used,
the compiler will producer an error anyway.

This fixes build on Windows, where none of these macros should be used.

13 months ago[compiler-rt] Allow 3 simultaneous interceptors on Linux
Marco Elver [Tue, 30 May 2023 17:27:59 +0000 (19:27 +0200)]
[compiler-rt] Allow 3 simultaneous interceptors on Linux

Rework Linux (and *BSD) interceptors to allow for up to 3 (2 for *BSD)
simultaneous interceptors. See code comments for details.

The main motivation is to support new sampling sanitizers (in the spirit
of GWP-ASan), that have to intercept few functions. Unfortunately, the
reality is that there are user interceptors that exist in the wild.

To support foreign user interceptors, foreign dynamic analysis
interceptors, and compiler-rt interceptors all at the same time,
including any combination of them, this change enables up to 3
interceptors on Linux (2 on *BSD).

Reviewed By: dvyukov, MaskRay, vitalybuka

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

13 months ago[mlir][linalg] Add option to pad Linalg ops to a specified multiple
Matthias Springer [Wed, 7 Jun 2023 06:43:58 +0000 (08:43 +0200)]
[mlir][linalg] Add option to pad Linalg ops to a specified multiple

A multiple (int64_t) can optionally be specified for every padding dimension.

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

13 months ago[mlir][linalg][NFC] Simplify padOperandToSmallestStaticBoundingBox
Matthias Springer [Wed, 7 Jun 2023 06:43:21 +0000 (08:43 +0200)]
[mlir][linalg][NFC] Simplify padOperandToSmallestStaticBoundingBox

The implementation is based on `ValueBoundsOpInterface` to compute upper bounds for tensor dim sizes. It is not necessary to skip over certain ops and reify shape dims; `ValueBoundsOpInterface` already takes care of that.

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

13 months ago[LoopIdiom] Freeze BitPos if !isGuaranteedNotToBeUndefOrPoison
luxufan [Wed, 7 Jun 2023 06:01:59 +0000 (14:01 +0800)]
[LoopIdiom] Freeze BitPos if !isGuaranteedNotToBeUndefOrPoison

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

Reviewed By: nikic

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

13 months ago[CodeGen] Disable default copy assignment operator for struct VectorInfo
Bing1 Yu [Wed, 7 Jun 2023 06:32:36 +0000 (14:32 +0800)]
[CodeGen] Disable default copy assignment operator for struct VectorInfo

struct VectorInfo manages resources such as dynamically allocated memory, it's generally a good practice to either implement a custom copy constructor or disable the default one

Reviewed By: kazu

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

13 months ago[CodeGen] Disable default copy ctor and copy assignment operator for class Array
Bing1 Yu [Wed, 7 Jun 2023 06:31:42 +0000 (14:31 +0800)]
[CodeGen] Disable default copy ctor and copy assignment operator for class Array

class Array manages resources such as dynamically allocated memory, it's generally a good practice to either implement a custom copy constructor or disable the default one.

Reviewed By: pengfei

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

13 months ago[CodeGen] Disable default copy ctor and copy assignment operator for VLIWPacketizerList
Bing1 Yu [Wed, 7 Jun 2023 06:30:48 +0000 (14:30 +0800)]
[CodeGen] Disable default copy ctor and copy assignment operator for VLIWPacketizerList

Reviewed By: pengfei

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

13 months ago[CodeGen] Disable default copy ctor and copy assignment operator for class Scoreboard
Bing1 Yu [Wed, 7 Jun 2023 06:29:48 +0000 (14:29 +0800)]
[CodeGen] Disable default copy ctor and copy assignment operator for class Scoreboard

Reviewed By: pengfei

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

13 months ago[CodeGen] Disable default copy ctor and copy assignment operator for InterferenceCache
Bing1 Yu [Wed, 7 Jun 2023 06:28:39 +0000 (14:28 +0800)]
[CodeGen] Disable default copy ctor and copy assignment operator for InterferenceCache

Reviewed By: pengfei

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

13 months ago[CodeGen] Disable default copy ctor and copy assignment operator for class Circuits
Bing1 Yu [Wed, 7 Jun 2023 06:27:49 +0000 (14:27 +0800)]
[CodeGen] Disable default copy ctor and copy assignment operator for class Circuits

Reviewed By: aprantl

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

13 months ago[CodeGen] Disable default copy ctor and copy assignment operator for VLIWResourceModel
Bing1 Yu [Wed, 7 Jun 2023 06:26:37 +0000 (14:26 +0800)]
[CodeGen] Disable default copy ctor and copy assignment operator for VLIWResourceModel

Reviewed By: JamesNagurne

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

13 months ago[RISCV] Fix sched class for MC layer version of vmsgt.vx.
Craig Topper [Wed, 7 Jun 2023 06:21:23 +0000 (23:21 -0700)]
[RISCV] Fix sched class for MC layer version of vmsgt.vx.

13 months agoSet isRequired true for CFGViewer/CFGPrinter passes
Wenju He [Wed, 7 Jun 2023 06:12:22 +0000 (14:12 +0800)]
Set isRequired true for CFGViewer/CFGPrinter passes

This PR allows function's cfg to be viewed/printed even if the function
has optnone attribute.

Reviewed By: MaskRay

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

13 months ago[RISCV] Fix sched class for MC layer version of vrsub.vx.
Craig Topper [Wed, 7 Jun 2023 05:52:27 +0000 (22:52 -0700)]
[RISCV] Fix sched class for MC layer version of vrsub.vx.

13 months ago[LoongArch] Define `ual` feature and override `allowsMisalignedMemoryAccesses`
Weining Lu [Wed, 7 Jun 2023 03:20:30 +0000 (11:20 +0800)]
[LoongArch] Define `ual` feature and override `allowsMisalignedMemoryAccesses`

Some CPUs do not allow memory accesses to be unaligned, e.g. 2k1000la
who uses the la264 core on which misaligned access will trigger an
exception.

In this patch, a backend feature called `ual` is defined to decribe
whether the CPU supports unaligned memroy accesses. And this feature
can be toggled by clang options `-m[no-]unaligned-access` or the
aliases `-m[no-]strict-align`. When this feature is on,
`allowsMisalignedMemoryAccesses` sets the speed number to 1 and returns
true that allows the codegen to generate unaligned memory access insns.

Clang options `-m[no-]unaligned-access` are moved from `m_arm_Features_Group`
to `m_Group` because now more than one targets use them. And a test
is added to show that they remain unused on a target that does not
support them. In addition, to keep compatible with gcc, a new alias
`-mno-strict-align` is added which is equal to `-munaligned-access`.

The feature name `ual` is consistent with linux kernel [1] and the
output of `lscpu` or `/proc/cpuinfo` [2].

There is an `LLT` variant of `allowsMisalignedMemoryAccesses`, but
seems that curently it is only used in GlobalISel which LoongArch
doesn't support yet. So this variant is not implemented in this patch.

[1]: https://github.com/torvalds/linux/blob/master/arch/loongarch/include/asm/cpu.h#L77
[2]: https://github.com/torvalds/linux/blob/master/arch/loongarch/kernel/proc.c#L75

Reviewed By: xen0n

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

13 months ago[RISCV] Split scheduler classes for vector min/max from compares.
Craig Topper [Wed, 7 Jun 2023 05:25:22 +0000 (22:25 -0700)]
[RISCV] Split scheduler classes for vector min/max from compares.

Compares write a mask result. Min/max write a full result. This
makes them sufficiently different to have their own classes.

Reviewed By: pcwang-thead

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

13 months ago[libc] Fix undefined behavior of left shifting signed integer in exp2f.cpp.
Tue Ly [Wed, 7 Jun 2023 04:32:27 +0000 (00:32 -0400)]
[libc] Fix undefined behavior of left shifting signed integer in exp2f.cpp.

Fix undefined behavior of left shifting signed integer in exp2f.cpp.

Reviewed By: sivachandra

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

13 months ago[NFC][Driver] Change Multilib flag representation
Michael Platings [Tue, 6 Jun 2023 13:03:54 +0000 (14:03 +0100)]
[NFC][Driver] Change Multilib flag representation

This new representation means that a valid command line option may
potentially be used directly as a multilib flag without any translation.

To indicate that a flag is required not to be present, its first
character is replaced with '!', which is intended for consistency with
the logical not operator in many programming languages.

Reviewed By: simon_tatham

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

13 months ago[NFC][Driver] Change MultilibBuilder interface
Michael Platings [Wed, 24 May 2023 14:20:01 +0000 (15:20 +0100)]
[NFC][Driver] Change MultilibBuilder interface

Decouple the interface of the MultilibBuilder flag method from how flags
are stored internally. Likewise change the addMultilibFlag function.

Currently a multilib flag like "-fexceptions" means a multilib is
*incompatible* with the -fexceptions command line option, which is
counter-intuitive. This change is a step towards changing this scheme.

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

13 months ago[ValueTracking] Implied conditions for lshr
Joshua Cao [Wed, 7 Jun 2023 03:27:24 +0000 (20:27 -0700)]
[ValueTracking] Implied conditions for lshr

`V1 >> V2 u<= V1` for any V1, V2

This works for lshr and any div's that are changed to lshr's

This fixes issues in clang and rustc:
https://github.com/llvm/llvm-project/issues/62441
https://github.com/rust-lang/rust/issues/110971

Reviewed By: goldstein.w.n

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

13 months ago[InstSimplify] Add tests for shl implied conditions
Joshua Cao [Wed, 7 Jun 2023 03:26:28 +0000 (20:26 -0700)]
[InstSimplify] Add tests for shl implied conditions

13 months ago[M68k,MSP430,VE,Xtensa] Migrate to new encodeInstruction that uses SmallVectorImpl...
Fangrui Song [Wed, 7 Jun 2023 04:02:51 +0000 (21:02 -0700)]
[M68k,MSP430,VE,Xtensa] Migrate to new encodeInstruction that uses SmallVectorImpl<char>. NFC

13 months ago[flang][hlfir] Enable assignments with allocatable components.
Slava Zakharin [Tue, 6 Jun 2023 23:12:49 +0000 (16:12 -0700)]
[flang][hlfir] Enable assignments with allocatable components.

The TODO was left there to verify that Assign() runtime handles
overlaps of allocatable components. It did not, and this change-set
fixes it. Note that the same Assign() issue can be reproduced
without HLFIR. In the following example the LHS would be reallocated
before value of RHS (essentially, the same memory) is read:
```
program main
  type t1
     integer, allocatable :: a(:)
  end type t1
  type(t1) :: x, y
  allocate(x%a(10))
  do i =1,10
     x%a(i) = 2*i
  end do
  x = x
  print *, x%a
  deallocate(x%a)
end program main
```

The test's output would be incorrect (though, this depends on the memory
reuse by malloc):
0 0 0 0 10 12 14 16 18 20

It is very hard to add a Flang unittest exploiting derived types.

Reviewed By: klausler

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

13 months ago[Hexagon,Lanai,LoongArch,Sparc] Migrate to new encodeInstruction that uses SmallVecto...
Fangrui Song [Wed, 7 Jun 2023 03:21:00 +0000 (20:21 -0700)]
[Hexagon,Lanai,LoongArch,Sparc] Migrate to new encodeInstruction that uses SmallVectorImpl<char>. NFC

13 months ago[LoongArch] Define the LAELF v20230519 relocs
WANG Xuerui [Wed, 7 Jun 2023 03:16:02 +0000 (11:16 +0800)]
[LoongArch] Define the LAELF v20230519 relocs

The LoongArch ELF psABI document has changed location and versioning
scheme; this revision is v2.10 in the old scheme. Notably this revision
brings initial capability of linker relaxation to LoongArch.

Reviewed By: SixWeining, MaskRay

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

13 months ago[LICM] [Coroutines] Don't hoist threadlocals within presplit coroutines
Chuanqi Xu [Wed, 7 Jun 2023 02:16:19 +0000 (10:16 +0800)]
[LICM] [Coroutines] Don't hoist threadlocals within presplit coroutines

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

This is the following of https://reviews.llvm.org/D135550, which is
discussed in
https://discourse.llvm.org/t/rfc-unify-memory-effect-attributes/65579.
In my imagination, we could fix the issue fundamentally after we
introduces new memory kind thread id. But I am not very sure if we can
fix the issue fundamentally in time.

Besides that, I think the correctness is the most important. So it
should not be bad to land this given it is innocent.

Reviewed By: nikic

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

13 months ago[AMDGPU][IGLP]: Add rules to SchedGroups
Jeffrey Byrnes [Fri, 28 Apr 2023 14:40:00 +0000 (07:40 -0700)]
[AMDGPU][IGLP]: Add rules to SchedGroups

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

Change-Id: Icd7aaaa0b257a25713c22ead0813777cef7d5859

13 months ago[gn build] Port 1794532bb942
LLVM GN Syncbot [Wed, 7 Jun 2023 02:14:26 +0000 (02:14 +0000)]
[gn build] Port 1794532bb942

13 months ago[InstrProf] Move BPFunctionNode test to ProfileDataTests
Ellis Hoag [Wed, 7 Jun 2023 01:04:11 +0000 (18:04 -0700)]
[InstrProf] Move BPFunctionNode test to ProfileDataTests

In https://reviews.llvm.org/D147812 I created
`BalancedPartitioningTest.cpp` and inadvertently drastically increased the
number of files needed to compile `SupportTests`. Instead lets move the
`BPFunctionNode` test to `unittests/ProfileData` so we can remove the
extra dependency.

Reviewed By: thakis

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

13 months ago[Coroutines] [LICM] Precommit test for D151774
Chuanqi Xu [Wed, 7 Jun 2023 02:10:17 +0000 (10:10 +0800)]
[Coroutines] [LICM] Precommit test for D151774

This is required in the review.

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

13 months ago[RISCV] Remove overly restrictive assert from negateFMAOpcode.
Craig Topper [Wed, 7 Jun 2023 01:34:15 +0000 (18:34 -0700)]
[RISCV] Remove overly restrictive assert from negateFMAOpcode.

It's possible that both multiplicands are being negated. This won't
change the opcode, but we can delete the two negates. Allow this
case to get through negateFMAOpcode.

I think D152260 will also fix this test case, but in the future
it may be possible for an fneg to appear after we've already converted
to RISCVISD opcodes in which case D152260 won't help.

Reviewed By: fakepaper56

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

13 months ago[NFC] Remove unneeded semicolon after function definition
Jim Lin [Tue, 6 Jun 2023 02:24:18 +0000 (10:24 +0800)]
[NFC] Remove unneeded semicolon after function definition

13 months ago[RISCV] Fix UBSan failure on signed integer overflow.
Craig Topper [Wed, 7 Jun 2023 01:27:33 +0000 (18:27 -0700)]
[RISCV] Fix UBSan failure on signed integer overflow.

13 months agoRevert "[TypePromotion] Don't treat bitcast as a Source"
Paul Kirth [Wed, 7 Jun 2023 00:45:49 +0000 (00:45 +0000)]
Revert "[TypePromotion] Don't treat bitcast as a Source"

This reverts commit 27aea17fe061f9778bb1e8ff5fdf9fc0fb03abe1.
For details, see: https://reviews.llvm.org/D152112

Fuchsia CI failure: https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-linux-arm64/b8779118297575483793/overview

13 months ago[gn build] Port 44268271f61e
LLVM GN Syncbot [Wed, 7 Jun 2023 00:45:47 +0000 (00:45 +0000)]
[gn build] Port 44268271f61e

13 months ago[lldb/test] Fix target-label.test on Fuchsia
Med Ismail Bennani [Wed, 7 Jun 2023 00:40:41 +0000 (17:40 -0700)]
[lldb/test] Fix target-label.test on Fuchsia

This shell test also checks some SBAPI functionalities and thus requires
python support.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
13 months agoRevert "Revert "[RISCV] Add special case to selectImm for constants that can be creat...
Florian Mayer [Wed, 7 Jun 2023 00:39:05 +0000 (17:39 -0700)]
Revert "Revert "[RISCV] Add special case to selectImm for constants that can be created with (ADD (SLLI C, 32), C).""

Revert broke even more stuff.

This reverts commit d5fbec30939f2c9f82475cf42c638619514b5c67.

13 months agoRevert "[RISCV] Add special case to selectImm for constants that can be created with...
Florian Mayer [Wed, 7 Jun 2023 00:30:07 +0000 (17:30 -0700)]
Revert "[RISCV] Add special case to selectImm for constants that can be created with (ADD (SLLI C, 32), C)."

Triggers UBSan error.

This reverts commit 58b2d652af49ee9d9ff2af6edd7f67f23b26bfee.

13 months agoRevert "[Sanitizers] Remove BuildId from sanitizers stacktrace on
Florian Mayer [Wed, 7 Jun 2023 00:25:55 +0000 (17:25 -0700)]
Revert "[Sanitizers] Remove BuildId from sanitizers stacktrace on

Breaks tests.

This reverts commit fdb1a891b64c27522a2386a8025f8ad5c7e02bfb.

13 months ago[scudo] Enable MTE in Trusty
Marco Nelissen [Wed, 7 Jun 2023 00:15:02 +0000 (00:15 +0000)]
[scudo] Enable MTE in Trusty

Trusty now has MTE support.
Back-ported from https://r.android.com/2332745.

Reviewed By: Chia-hungDuan

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

13 months ago[gn build] Port 1117b9a284aa
Nico Weber [Tue, 6 Jun 2023 23:57:23 +0000 (19:57 -0400)]
[gn build] Port 1117b9a284aa

13 months ago[Sanitizers] Remove BuildId from sanitizers stacktrace on Darwin
usama hameed [Tue, 6 Jun 2023 22:53:18 +0000 (15:53 -0700)]
[Sanitizers] Remove BuildId from sanitizers stacktrace on Darwin

On Darwin, we do not want to show the BuildId appended at the end of stack
frames in Sanitizers. The BuildId/UUID can be seen by using the
print_module_map=1 sanitizer option.

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

rdar://108324403

13 months ago[Fuchsia] Add llvm-strings to Fuchsia clang build.
Haowei Wu [Tue, 6 Jun 2023 23:09:33 +0000 (16:09 -0700)]
[Fuchsia] Add llvm-strings to Fuchsia clang build.

This patch adds 'llvm-strings' to Fuchsia clang build.

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

13 months ago[mlir][sparse][gpu] add sm8.0+ tensor core 2:4 sparsity support
Kun Wu [Tue, 6 Jun 2023 23:12:45 +0000 (23:12 +0000)]
[mlir][sparse][gpu] add sm8.0+ tensor core 2:4 sparsity support

Reviewed By: aartbik

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

13 months ago[lldb] Disable some tests on windows
Med Ismail Bennani [Tue, 6 Jun 2023 23:05:26 +0000 (16:05 -0700)]
[lldb] Disable some tests on windows

This patch skips both `test_completion_target_create_from_root_dir`
introduced in `e896612` and  `target-label.test` introduced in `1e82b20`
since I don't have a windows machine to try to accomodate the filesystem
path style differences for these tests to pass.

Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
13 months agoRevert "Reland [compiler-rt][CMake] Properly set COMPILER_RT_HAS_LLD"
Arthur Eubanks [Tue, 6 Jun 2023 22:59:26 +0000 (15:59 -0700)]
Revert "Reland [compiler-rt][CMake] Properly set COMPILER_RT_HAS_LLD"

This reverts commit fffa05a2bcb548d5189e8c2e52d2ed2e7ebb2498.

This seems to cause hwasan tests to run in environments it didn't run in before.

13 months ago[BOLT][NFC] Fix debug messages
Amir Ayupov [Tue, 6 Jun 2023 22:49:00 +0000 (15:49 -0700)]
[BOLT][NFC] Fix debug messages

Fix debug printing, making it easier to compare two debug logs side by side:
- `BinaryFunction::addRelocation`: print function name instead of `this` ptr,
- `DataAggregator::doTrace`: remove duplicated function name.

Reviewed By: #bolt, maksfb

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

13 months ago[lldb] Fix "NameError: name 'self' is not defined" when using crashlog -c
Jonas Devlieghere [Tue, 6 Jun 2023 22:18:14 +0000 (15:18 -0700)]
[lldb] Fix "NameError: name 'self' is not defined" when using crashlog -c

This fixes a regression introduced by 27f27d15f6c9 that results in a
NameError: (name 'self' is not defined) when using crashlog with the -c
option.

rdar://110007391

13 months ago[Driver] Change some Separate CC1 options to use the Joined = form
Fangrui Song [Tue, 6 Jun 2023 22:12:45 +0000 (15:12 -0700)]
[Driver] Change some Separate CC1 options to use the Joined = form

13 months agoclang/HIP: Inline frexp/frexpf implementations
Matt Arsenault [Tue, 22 Nov 2022 05:42:55 +0000 (00:42 -0500)]
clang/HIP: Inline frexp/frexpf implementations

Don't bother calling ocml. This stops setting the
appropriate fast math flags, and requires this junk
for passing to a private pointer.

13 months agoFix LLVM Sphinx build; NFC
Aaron Ballman [Tue, 6 Jun 2023 21:29:15 +0000 (17:29 -0400)]
Fix LLVM Sphinx build; NFC

Addresses the issue found by:
https://lab.llvm.org/buildbot/#/builders/30/builds/35968