platform/upstream/llvm.git
3 years ago[mlir] Move memref-tests from standard to memref folder.
Thomas Schmeyer [Fri, 16 Apr 2021 15:33:06 +0000 (17:33 +0200)]
[mlir] Move memref-tests from standard to memref folder.

Split memref-test from standard test and move them to the folder MemRef.

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

3 years ago[AArch64] Fix calling windows varargs with floats in fixed args from non-windows...
Martin Storsjö [Tue, 20 Apr 2021 21:05:01 +0000 (00:05 +0300)]
[AArch64] Fix calling windows varargs with floats in fixed args from non-windows functions

When inspecting the calling convention, for calling windows functions
from a non-windows function, inspect the calling convention of
the called function, not the caller.

Also remove an unnecessary parameter to AArch64CallLowering
OutgoingArgHandler.

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

3 years ago[clang][deps] Include "-cc1" in the arguments
Jan Svoboda [Wed, 21 Apr 2021 11:25:31 +0000 (13:25 +0200)]
[clang][deps] Include "-cc1" in the arguments

To simplify tools consuming dependency scanning results, prepend the "-cc1" argument by default.

Reviewed By: Bigcheese

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

3 years ago[mlir][linalg] remove interchange option on linalg to loop lowering.
Tobias Gysi [Thu, 22 Apr 2021 08:22:37 +0000 (08:22 +0000)]
[mlir][linalg] remove interchange option on linalg to loop lowering.

The interchange option attached to the linalg to loop lowering affects only the loops and does not update the memory accesses generated in to body of the operation. Instead of performing the interchange during the loop lowering use the interchange pattern.

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

3 years agoclang-format: [JS] do not merge side-effect imports.
Martin Probst [Thu, 22 Apr 2021 05:54:11 +0000 (07:54 +0200)]
clang-format: [JS] do not merge side-effect imports.

The if condition was testing the current element, but
forgot to check the previous element (doh), so it
would fail depending on sort order of the imports.

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

3 years ago[AMDGPU] SIWholeQuadMode: don't add duplicate implicit $exec operands
Jay Foad [Wed, 21 Apr 2021 16:38:32 +0000 (17:38 +0100)]
[AMDGPU] SIWholeQuadMode: don't add duplicate implicit $exec operands

STRICT_WWM and STRICT_WQM are already defined with Uses = [EXEC], so
there is no need to add another implicit use of $exec when lowering them
to V_MOV_B32 instructions.

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

3 years ago[RISCV] Custom lowering of SET_ROUNDING
Serge Pavlov [Tue, 10 Nov 2020 16:51:34 +0000 (23:51 +0700)]
[RISCV] Custom lowering of SET_ROUNDING

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

3 years ago[LoopVectorize] Don't create unnecessary vscale intrinsic calls
David Sherwood [Mon, 19 Apr 2021 13:56:35 +0000 (14:56 +0100)]
[LoopVectorize] Don't create unnecessary vscale intrinsic calls

In quite a few cases in LoopVectorize.cpp we call createStepForVF
with a step value of 0, which leads to unnecessary generation of
llvm.vscale intrinsic calls. I've optimised IRBuilder::CreateVScale
and createStepForVF to return 0 when attempting to multiply
vscale by 0.

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

3 years ago[CSSPGO][llvm-profdata] Support trimming cold context when merging profiles
Wenlei He [Thu, 15 Apr 2021 05:53:40 +0000 (22:53 -0700)]
[CSSPGO][llvm-profdata] Support trimming cold context when merging profiles

The change adds support for triming and merging cold context when mergine CSSPGO profiles using llvm-profdata. This is similar to the context profile trimming in llvm-profgen, however the flexibility to trim cold context after profile is generated can be useful.

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

3 years ago[libcxx] [test] Fix testing on windows with c++experimental enabled
Martin Storsjö [Tue, 23 Mar 2021 08:55:26 +0000 (10:55 +0200)]
[libcxx] [test] Fix testing on windows with c++experimental enabled

The straightforward `AddLinkFlag('-lc++experimental')` approach doesn't
work on e.g. MSVC. For linking to libc++ itself, a more convoluted logic
is used (see configure_link_flags_cxx_library).

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

3 years ago[clang-tidy] Avoid bugprone-macro-parentheses warnings after goto argument
Georgy Komarov [Tue, 6 Apr 2021 04:57:47 +0000 (07:57 +0300)]
[clang-tidy] Avoid bugprone-macro-parentheses warnings after goto argument

clang-tidy should not generate warnings for the goto argument without
parentheses, because it would be a syntax error.

The only valid case where an argument can be enclosed in parentheses is
"Labels as Values" gcc extension: https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html.
This commit adds support for the label-as-values extension as implemented in clang.

Fixes bugzilla issue 49634.

Reviewed By: aaron.ballman

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

3 years ago[NewPM] Mark some more wrapper passes as ignored
Arthur Eubanks [Thu, 22 Apr 2021 06:51:51 +0000 (23:51 -0700)]
[NewPM] Mark some more wrapper passes as ignored

We shouldn't print IR when seeing these passes.

3 years ago[RISCV] Use TargetConstant for condition code of RISCVISD::SELECT_CC.
Craig Topper [Thu, 22 Apr 2021 06:05:26 +0000 (23:05 -0700)]
[RISCV] Use TargetConstant for condition code of RISCVISD::SELECT_CC.

The value is always an immediate and can never be in a register.
This the kind of thing TargetConstant is for.

Saves a step GenDAGISel to convert a Constant to a TargetConstant.

3 years ago[GVN] Introduce loop load PRE
Max Kazantsev [Thu, 22 Apr 2021 05:50:38 +0000 (12:50 +0700)]
[GVN] Introduce loop load PRE

This patch allows PRE of the following type of loads:

```
preheader:
  br label %loop

loop:
  br i1 ..., label %merge, label %clobber

clobber:
  call foo() // Clobbers %p
  br label %merge

merge:
  ...
  br i1 ..., label %loop, label %exit

```

Into
```
preheader:
  %x0 = load %p
  br label %loop

loop:
  %x.pre = phi(x0, x2)
  br i1 ..., label %merge, label %clobber

clobber:
  call foo() // Clobbers %p
  %x1 = load %p
  br label %merge

merge:
  x2 = phi(x.pre, x1)
  ...
  br i1 ..., label %loop, label %exit

```

So instead of loading from %p on every iteration, we load only when the actual clobber happens.
The typical pattern which it is trying to address is: hot loop, with all code inlined and
provably having no side effects, and some side-effecting calls on cold path.

The worst overhead from it is, if we always take clobber block, we make 1 more load
overall (in preheader). It only matters if loop has very few iteration. If clobber block is not taken
at least once, the transform is neutral or profitable.

There are several improvements prospect open up:
- We can sometimes be smarter in loop-exiting blocks via split of critical edges;
- If we have block frequency info, we can handle multiple clobbers. The only obstacle now is that
  we don't know if their sum is colder than the header.

Differential Revision: https://reviews.llvm.org/D99926
Reviewed By: reames

3 years ago[AMDGPU][OpenMP] Add amdgpu-arch tool to list AMD GPUs installed
Pushpinder Singh [Wed, 21 Apr 2021 14:04:44 +0000 (14:04 +0000)]
[AMDGPU][OpenMP] Add amdgpu-arch tool to list AMD GPUs installed

This patch adds new clang tool named amdgpu-arch which uses
HSA to detect installed AMDGPU and report back latter's march.
This tool is built only if system has HSA installed.

The value printed by amdgpu-arch is used to fill -march when
latter is not explicitly provided in -Xopenmp-target.

Reviewed By: JonChesterfield, gregrodgers

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

3 years ago[CodeGen] Do not split functions with attr "implicit-section-name".
Snehasish Kumar [Wed, 21 Apr 2021 21:41:12 +0000 (14:41 -0700)]
[CodeGen] Do not split functions with attr "implicit-section-name".

The #pragma clang section can be used at a coarse granularity to specify
the section used for bss/data/text/rodata for global objects. When split
functions is enabled, the function may be split into two parts violating
user expectations.

Reference:
https://clang.llvm.org/docs/LanguageExtensions.html#specifying-section-names-for-global-objects-pragma-clang-section

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

3 years agoscudo: Obtain tag from pointer instead of loading it from memory. NFCI.
Peter Collingbourne [Thu, 22 Apr 2021 02:13:36 +0000 (19:13 -0700)]
scudo: Obtain tag from pointer instead of loading it from memory. NFCI.

Since we already have a tagged pointer available to us, we can just
extract the tag from it and avoid an LDG instruction.

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

3 years ago[Debug-Info] implement -gstrict-dwarf
Chen Zheng [Tue, 20 Apr 2021 02:03:44 +0000 (22:03 -0400)]
[Debug-Info] implement -gstrict-dwarf

This patch implements -gstrict-dwarf option in clang FE.

Reviewed By: dblaikie, probinson, aprantl

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

3 years ago[RISCV] Custom lowering of FLT_ROUNDS_
Serge Pavlov [Thu, 5 Nov 2020 06:59:52 +0000 (13:59 +0700)]
[RISCV] Custom lowering of FLT_ROUNDS_

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

3 years ago[mlir][linalg] Add pattern to push reshape after elementwise operation
thomasraoux [Fri, 16 Apr 2021 20:38:15 +0000 (13:38 -0700)]
[mlir][linalg] Add pattern to push reshape after elementwise operation

This help expose more fusion opportunities.

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

3 years ago[RISCV] Teach lowerSPLAT_VECTOR_PARTS to detect cases where Hi is sign extended from Lo.
Craig Topper [Thu, 22 Apr 2021 03:15:39 +0000 (20:15 -0700)]
[RISCV] Teach lowerSPLAT_VECTOR_PARTS to detect cases where Hi is sign extended from Lo.

This recognizes the case when Hi is (sra Lo, 31). We can use
SPLAT_VECTOR_I64 rather than splatting the high bits and
combining them in the vector register.

3 years ago[Coroutine] Collect CoroBegin if all of terminators are dominated by one coro.destroy
Chuanqi Xu [Thu, 22 Apr 2021 03:20:20 +0000 (11:20 +0800)]
[Coroutine] Collect CoroBegin if all of terminators are dominated by one coro.destroy

Summary: The original logic seems to be we could collecting a CoroBegin
if one of the terminators could be dominated by one of coro.destroy,
which doesn't make sense.
This patch rewrites the logics to collect CoroBegin if all of
terminators are dominated by one coro.destroy. If there is no such
coro.destroy, we would call hasEscapePath to evaluate if we should
collect it.

Test Plan: check-llvm

Reviewed by: lxfind

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

3 years agoWordsmith the semantics of invariant.load
Evgeniy Brevnov [Thu, 22 Apr 2021 03:04:49 +0000 (10:04 +0700)]
Wordsmith the semantics of invariant.load

Don't phrase the semantics in terms of the optimizer.  Instead have a
more straightforward execution based semantic.

Reviewed By: ebrevnov

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

3 years ago[lldb] Disable TestSimulatorPlatform.py because it's causing a SIGHUP
Jonas Devlieghere [Thu, 22 Apr 2021 02:56:38 +0000 (19:56 -0700)]
[lldb] Disable TestSimulatorPlatform.py because it's causing a SIGHUP

Ever since Dave Zarzycki's patch to sort test start times based on prior
test timing data (https://reviews.llvm.org/D98179) the test suite aborts
with a SIGHUP. I don't believe his patch is to blame, but rather
uncovers an preexisting issue by making test runs more deterministic.

I was able to narrow down the issue to TestSimulatorPlatform.py. The
issue also manifests itself on the standalone bot on GreenDragon [1].
This patch disables the test until we can figure this out.

[1] http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake-standalone/

rdar://76995109

3 years ago[mlir][tosa] Add tosa.avg_pool2d lowering
Rob Suderman [Mon, 19 Apr 2021 20:40:33 +0000 (13:40 -0700)]
[mlir][tosa] Add tosa.avg_pool2d lowering

Added the float lowerings for avg pool with corresponding tests.

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

3 years agoAMDGPU: Fix assert when trying to fold reg_sequence of physreg copies
Matt Arsenault [Tue, 20 Apr 2021 19:30:18 +0000 (15:30 -0400)]
AMDGPU: Fix assert when trying to fold reg_sequence of physreg copies

3 years ago[OpenMP] Simplify offloading parallel call codegen
Giorgis Georgakoudis [Wed, 21 Apr 2021 18:41:31 +0000 (11:41 -0700)]
[OpenMP] Simplify offloading parallel call codegen

This revision simplifies Clang codegen for parallel regions in OpenMP GPU target offloading and corresponding changes in libomptarget: SPMD/non-SPMD parallel calls are unified under a single `kmpc_parallel_51` runtime entry point for parallel regions (which will be commonized between target, host-side parallel regions), data sharing is internalized to the runtime. Tests have been auto-generated using `update_cc_test_checks.py`. Also, the revision contains changes to OpenMPOpt for remark creation on target offloading regions.

Reviewed By: jdoerfert, Meinersbur

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

3 years agoDelete le32/le64 targets
Fangrui Song [Thu, 22 Apr 2021 01:44:12 +0000 (18:44 -0700)]
Delete le32/le64 targets

They are unused now.

Note: NaCl is still used and is currently expected to be needed until 2022-06
(https://blog.chromium.org/2020/08/changes-to-chrome-app-support-timeline.html).

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

3 years ago[AArch64][GlobalISel] Fix regbankselect for G_FCMP with vector destinations
Jessica Paquette [Tue, 20 Apr 2021 20:10:30 +0000 (13:10 -0700)]
[AArch64][GlobalISel] Fix regbankselect for G_FCMP with vector destinations

These should always go to a FPR, since they always use the vector registers.

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

3 years ago[AArch64][GlobalISel] Mark some vector G_ABS cases as legal
Jessica Paquette [Wed, 21 Apr 2021 00:48:17 +0000 (17:48 -0700)]
[AArch64][GlobalISel] Mark some vector G_ABS cases as legal

Each of the cases marked as legal here have an imported pattern in
AArch64GenGlobalISel.inc. So, if we mark them as legal, we get selection for
free.

Technically this is only supposed to happen if we have NEON support. But, we
fall back if we don't have that in the legalizer right now. I suppose it'd be
better to have a FIXME so we can write the testcase when the time comes.

(Plus, it'd just fall back in selection if NEON isn't available, so it's not
*wrong*, I guess?)

This fixes some fallbacks in the test suite.

(Also use `isScalar` from LegalityPredicates.cpp while we're here just to tidy
things a little bit.)

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

3 years ago[CSSPGO][llvm-profgen] Always report dangling probes for frames with real samples.
Hongtao Yu [Tue, 20 Apr 2021 01:04:43 +0000 (18:04 -0700)]
[CSSPGO][llvm-profgen] Always report dangling probes for frames with real samples.

Report dangling probes for frames that have real samples collected. Dangling probes are the probes associated to an empty block. When reported, sample count on a dangling probe will not be trusted by the compiler and we will rely on the counts inference algorithm to get the probe a reasonable count. This actually fixes a bug where previously only those dangling probes with samples collected were reported.

This patch also fixes two existing issues. Pseudo probes are stored in `Address2ProbesMap` and their pointers are used in `PseudoProbeInlineTree`. Previously `std::vector` was used to store probes and the pointers to probes may get obsolete as the vector grows. I'm changing `std::vector` to `std::list` instead.

The other issue is that all outlined functions shared the same inline frame previously due to the unchanged `Index` value as the dummy inlineSite identifier.

Good results seen for SPEC2017 in general regarding profile quality.

Reviewed By: wenlei, wlei

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

3 years ago[HWASan] Untag argument to __hwasan_tag_memory.
Matt Morehouse [Thu, 22 Apr 2021 00:06:09 +0000 (17:06 -0700)]
[HWASan] Untag argument to __hwasan_tag_memory.

__hwasan_tag_memory expects untagged pointers, so make sure our pointer
is untagged.

3 years ago[mlir] Linalg : do not forward memrefs to outputs when do bufferization
Eugene Zhulenev [Wed, 21 Apr 2021 22:52:50 +0000 (15:52 -0700)]
[mlir] Linalg : do not forward memrefs to outputs when do bufferization

Example:
```
%0 = linalg.init_tensor : tensor<...>
%1 = linalg.generic ... outs(%0: tensor<...>)
%2 = linalg.generic ... outs(%0: tensor<...>)
```

Memref allocated as a result of `init_tensor` bufferization can be incorrectly overwritten by the second linalg.generic operation

Reviewed By: silvas

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

3 years ago[IR] Add doc about Function::createWithDefaultAttr. NFC
Fangrui Song [Wed, 21 Apr 2021 23:20:50 +0000 (16:20 -0700)]
[IR] Add doc about Function::createWithDefaultAttr. NFC

3 years ago[IR][sanitizer] Set nounwind on module ctor/dtor, additionally set uwtable if -fasync...
Fangrui Song [Wed, 21 Apr 2021 22:58:20 +0000 (15:58 -0700)]
[IR][sanitizer] Set nounwind on module ctor/dtor, additionally set uwtable if -fasynchronous-unwind-tables

On ELF targets, if a function has uwtable or personality, or does not have
nounwind (`needsUnwindTableEntry`), it marks that `.eh_frame` is needed in the module.

Then, a function gets `.eh_frame` if `needsUnwindTableEntry` or `-g[123]` is specified.
(i.e. If -g[123], every function gets `.eh_frame`.
This behavior is strange but that is the status quo on GCC and Clang.)

Let's take asan as an example. Other sanitizers are similar.
`asan.module_[cd]tor` has no attribute. `needsUnwindTableEntry` returns true,
so every function gets `.eh_frame` if `-g[123]` is specified.
This is the root cause that
`-fno-exceptions -fno-asynchronous-unwind-tables -g` produces .debug_frame
while
`-fno-exceptions -fno-asynchronous-unwind-tables -g -fsanitize=address` produces .eh_frame.

This patch

* sets the nounwind attribute on sanitizer module ctor/dtor.
* let Clang emit a module flag metadata "uwtable" for -fasynchronous-unwind-tables. If "uwtable" is set, sanitizer module ctor/dtor additionally get the uwtable attribute.

The "uwtable" mechanism is generic: synthesized functions not cloned/specialized
from existing ones should consider `Function::createWithDefaultAttr` instead of
`Function::create` if they want to get some default attributes which
have more of module semantics.

Other candidates: "frame-pointer" (https://github.com/ClangBuiltLinux/linux/issues/955
https://github.com/ClangBuiltLinux/linux/issues/1238), dso_local, etc.

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

3 years agoFix VSCode/TestOptions.test
Walter Erquinigo [Wed, 21 Apr 2021 22:46:02 +0000 (15:46 -0700)]
Fix VSCode/TestOptions.test

Found by https://lab.llvm.org/buildbot/#/builders/96/builds/6936

3 years ago[libcxx] Stop using use c++ subdirectory for libc++ library
Petr Hosek [Sat, 17 Apr 2021 04:33:18 +0000 (21:33 -0700)]
[libcxx] Stop using use c++ subdirectory for libc++ library

The new layout more closely matches the layout used by other compilers.
This is only used when LLVM_ENABLE_PER_TARGET_RUNTIME_DIR is enabled.

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

3 years ago[CodeView] Add CodeView support for PGO debug information
Michael Holman [Wed, 21 Apr 2021 22:29:19 +0000 (15:29 -0700)]
[CodeView] Add CodeView support for PGO debug information

This change adds debug information about whether PGO is being used or
not.

Microsoft performance tooling (e.g. xperf, WPA) uses this information to
show whether functions are optimized with PGO or not, as well as whether
PGO information is invalid.

This information is useful for validating whether training scenarios are
providing good coverage of real world scenarios, showing if profile data
is out of date, etc.

Reviewed By: rnk

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

3 years agoFix TestVSCode_runInTerminal
Walter Erquinigo [Wed, 21 Apr 2021 22:20:42 +0000 (15:20 -0700)]
Fix TestVSCode_runInTerminal

It failed in https://lab.llvm.org/buildbot/#/builders/68/builds/10912

And it was caused due to https://reviews.llvm.org/rG64f47c1e58a1

3 years ago[lldb-vscode] Distinguish shadowed variables in the scopes request
Walter Erquinigo [Wed, 21 Apr 2021 22:06:44 +0000 (15:06 -0700)]
[lldb-vscode] Distinguish shadowed variables in the scopes request

VSCode doesn't render multiple variables with the same name in the variables view. It only renders one of them. This is a situation that happens often when there are shadowed variables.
The nodejs debugger solves this by adding a number suffix to the variable, e.g. "x", "x2", "x3" are the different x variables in nested blocks.

In this patch I'm doing something similar, but the suffix is " @ <file_name:line>), e.g. "x @ main.cpp:17", "x @ main.cpp:21". The fallback would be an address if the source and line information is not present, which should be rare.

This fix is only needed for globals and locals. Children of variables don't suffer of this problem.

When there are shadowed variables
{F16182150}

Without shadowed variables
{F16182152}

Modifying these variables through the UI works

Reviewed By: clayborg

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

3 years ago[libc++] Move the debug_level feature to the DSL
Louis Dionne [Wed, 21 Apr 2021 21:56:58 +0000 (17:56 -0400)]
[libc++] Move the debug_level feature to the DSL

3 years ago[RISCV] Cleanup up the spec version references around fmaxnum/fminnum.
Craig Topper [Wed, 21 Apr 2021 15:51:00 +0000 (08:51 -0700)]
[RISCV] Cleanup up the spec version references around fmaxnum/fminnum.

This previously made references to 2.3-draft which was a short
lived version number in 2017. It was replaced by date based
versions leading up to ratification.

This patch uses the latest ratified version number and just says
what the behavior is. Nothing here is in flux.

Reviewed By: frasercrmck

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

3 years ago[RISCV] Temporary in vmsge(u).vx pseudo instructions can't be V0.
Craig Topper [Wed, 21 Apr 2021 07:25:42 +0000 (00:25 -0700)]
[RISCV] Temporary in vmsge(u).vx pseudo instructions can't be V0.

This was checked in some asserts, but not enforced by the
instruction matching.

There's still a second bug that we don't check that vt and vd
are different registers, but that will require custom checking.

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

3 years ago[lldb-vscode] redirect stderr/stdout to the IDE's console
Walter Erquinigo [Wed, 21 Apr 2021 21:20:17 +0000 (14:20 -0700)]
[lldb-vscode] redirect stderr/stdout to the IDE's console

In certain occasions times, like when LLDB is initializing and
evaluating the .lldbinit files, it tries to print to stderr and stdout
directly. This confuses the IDE with malformed data, as it talks to
lldb-vscode using stdin and stdout following the JSON RPC protocol. This
ends up terminating the debug session with the user unaware of what's
going on. There might be other situations in which this can happen, and
they will be harder to debug than the .lldbinit case.

After several discussions with @clayborg, @yinghuitan and @aadsm, we
realized that the best course of action is to simply redirect stdout and
stderr to the console, without modifying LLDB itself. This will prove to
be resilient to future bugs or features.

I made the simplest possible redirection logic I could come up with. It
only works for POSIX, and to make it work with Windows should be merely
changing pipe and dup2 for the windows equivalents like _pipe and _dup2.
Sadly I don't have a Windows machine, so I'll do it later once my office
reopens, or maybe someone else can do it.

I'm intentionally not adding a stop-redirecting logic, as I don't see it
useful for the lldb-vscode case (why would we want to do that, really?).

I added a test.

Note: this is a simpler version of D80659. I first tried to implement a
RIIA version of it, but it was problematic to manage the state of the
thread and reverting the redirection came with some non trivial
complexities, like what to do with unflushed data after the debug
session has finished on the IDE's side.

3 years ago[mlir][mlir-lsp-server] Add some initial documentation on the MLIR LSP server
River Riddle [Wed, 21 Apr 2021 21:33:30 +0000 (14:33 -0700)]
[mlir][mlir-lsp-server] Add some initial documentation on the MLIR LSP server

This covers some of the basic documentation, but is still missing some documentation/examples of features provided by the server. Feature documentation will be added in a followup.

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

3 years ago[mlir] Add a vscode language extension for MLIR
River Riddle [Wed, 21 Apr 2021 21:33:18 +0000 (14:33 -0700)]
[mlir] Add a vscode language extension for MLIR

This utilizes the mlir-lsp server to provide language services for MLIR files opened in vscode. The extension currently supports syntax highlighting, as well as tracking definitions/uses/source locations for SSA values and blocks.

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

3 years ago[mlir][mlir-lsp] Add a new C++ LSP server for MLIR named mlir-lsp-server
River Riddle [Wed, 21 Apr 2021 21:33:04 +0000 (14:33 -0700)]
[mlir][mlir-lsp] Add a new C++ LSP server for MLIR named mlir-lsp-server

This commits adds a basic LSP server for MLIR that supports resolving references and definitions. Several components of the setup are simplified to keep the size of this commit down, and will be built out in later commits. A followup commit will add a vscode language client that communicates with this server, paving the way for better IDE experience when interfacing with MLIR files.

The structure of this tool is similar to mlir-opt and mlir-translate, i.e. the implementation is structured as a library that users can call into to implement entry points that contain the dialects/passes that they are interested in.

Note: This commit contains several files, namely those in `mlir-lsp-server/lsp`, that have been copied from the LSP code in clangd and adapted for use in MLIR. This copying was decided as the best initial path forward (discussed offline by several stake holders in MLIR and clangd) given the different needs of our MLIR server, and the one for clangd. If a strong desire/need for unification arises in the future, the existence of these files in mlir-lsp-server can be reconsidered.

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

3 years agoAdd a new AsmParserState class to capture detailed source information for .mlir files
River Riddle [Wed, 21 Apr 2021 21:32:50 +0000 (14:32 -0700)]
Add a new AsmParserState class to capture detailed source information for .mlir files

This information isn't useful for general compilation, but is useful for building tools that process .mlir files. This class will be used in a followup to start building an LSP language server for MLIR.

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

3 years ago[MC] Use COMDAT for LSDA only if IR comdat type is any
Petr Hosek [Tue, 20 Apr 2021 23:14:02 +0000 (16:14 -0700)]
[MC] Use COMDAT for LSDA only if IR comdat type is any

This fixed issue introduced in 16af97393346ad636298605930a8b503a55eb40a
and 796feb61637c407aefcc0d462f24a1cc41f350d8.

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

3 years agoFix TestVSCode_launch test
Walter Erquinigo [Wed, 21 Apr 2021 21:33:02 +0000 (14:33 -0700)]
Fix TestVSCode_launch test

Broken in https://lab.llvm.org/buildbot/#/builders/96/builds/6933

We don't really need to run this test on arm, but would be worth fixing
it later.

3 years ago[MemCpyOpt] Allow variable lengths in memcpy optimizer
Olle Fredriksson [Wed, 21 Apr 2021 20:48:28 +0000 (22:48 +0200)]
[MemCpyOpt] Allow variable lengths in memcpy optimizer

This makes the memcpy-memcpy and memcpy-memset optimizations work for
variable sizes as long as they are equal, relaxing the old restriction
that they are constant integers. If they're not equal, the old
requirement that they are constant integers with certain size
restrictions is used.

The implementation works by pushing the length tests further down in the
code, which reveals some places where it's enough that the lengths are
equal (but not necessarily constant).

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

3 years agoRe-land "[Driver] Support default libc++ library location on Darwin"
Jonas Devlieghere [Wed, 21 Apr 2021 20:59:54 +0000 (13:59 -0700)]
Re-land "[Driver] Support default libc++ library location on Darwin"

This reverts commit 05eeed9691aeb3e0316712195b998e9078cdceb0 and after
fixing the impacted lldb tests in 5d1c43f333c2327be61604dc90ea675f0d1e6913.

  [Driver] Support default libc++ library location on Darwin

  Darwin driver currently uses libc++ headers that are part of Clang
  toolchain when available (by default ../include/c++/v1 relative to
  executable), but it completely ignores the libc++ library itself
  because it doesn't pass the location of libc++ library that's part
  of Clang (by default ../lib relative to the exceutable) to the linker
  always using the system copy of libc++.

  This may lead to subtle issues when the compilation fails because the
  headers that are part of Clang toolchain are incompatible with the
  system library. Either the driver should ignore both headers as well as
  the library, or it should always try to use both when available.

  This patch changes the driver behavior to do the latter which seems more
  reasonable, it makes it easy to test and use custom libc++ build on
  Darwin while still allowing the use of system version. This also matches
  the Clang driver behavior on other systems.

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

3 years ago[HIP] Add option -fgpu-inline-threshold
Yaxun (Sam) Liu [Wed, 21 Apr 2021 18:34:37 +0000 (14:34 -0400)]
[HIP] Add option -fgpu-inline-threshold

Add option -fgpu-inline-threshold for inline threshold for device compilation only.

Reviewed by: Artem Belevich

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

3 years ago[libc++] Move macOS testing out of the 2nd CI stage
Louis Dionne [Wed, 21 Apr 2021 21:12:01 +0000 (17:12 -0400)]
[libc++] Move macOS testing out of the 2nd CI stage

It's too slow, which delays the posting of CI results to Phabricator
when another step in the same stage fails.

3 years agoscudo: Make prepareTaggedChunk() and resizeTaggedChunk() generic.
Peter Collingbourne [Tue, 20 Apr 2021 21:54:32 +0000 (14:54 -0700)]
scudo: Make prepareTaggedChunk() and resizeTaggedChunk() generic.

Now that we have a more efficient implementation of storeTags(),
we should start using it from resizeTaggedChunk(). With that, plus
a new storeTag() function, resizeTaggedChunk() can be made generic,
and so can prepareTaggedChunk(). Make it so.

Now that the functions are generic, move them to combined.h so that
memtag.h no longer needs to know about chunks.

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

3 years agoscudo: Use DC GZVA instruction in storeTags().
Peter Collingbourne [Tue, 20 Apr 2021 21:53:41 +0000 (14:53 -0700)]
scudo: Use DC GZVA instruction in storeTags().

DC GZVA can operate on multiple granules at a time (corresponding to
the CPU's cache line size) so we can generally expect it to be faster
than STZG in a loop.

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

3 years ago[lldb-vscode] Add postRunCommands
Walter Erquinigo [Mon, 12 Apr 2021 20:00:37 +0000 (13:00 -0700)]
[lldb-vscode] Add postRunCommands

This diff ass postRunCommands, which are the counterpart of the preRunCommands. TThey will be executed right after the target is launched or attached correctly, which means that the targets can assume that the target is running.

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

3 years ago[Evaluator] Bitcast result of pointer stripping
Arthur Eubanks [Wed, 21 Apr 2021 16:41:17 +0000 (09:41 -0700)]
[Evaluator] Bitcast result of pointer stripping

Trying to evaluate a GEP would assert with
  "Ty == cast<PointerType>(C->getType()->getScalarType())->getElementType()"
because the type of the pointer we would evaluate the GEP argument to
would be a different type than the GEP was expecting. We should treat
pointer stripping as a bitcast.

The test adds a redundant GEP that would crash due to type mismatch.

Reviewed By: rnk

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

3 years ago[lldb] Use the compiler from the SDK in simulator tests
Jonas Devlieghere [Wed, 21 Apr 2021 20:18:36 +0000 (13:18 -0700)]
[lldb] Use the compiler from the SDK in simulator tests

Use the clang compiler from the SDK to build the simulator test programs
to ensure we pick up the correct libc++.

3 years ago[flang][msvc] Fix compilation of external-hello-world test with MSVC.
Mehdi Chinoune [Wed, 21 Apr 2021 19:00:55 +0000 (14:00 -0500)]
[flang][msvc] Fix compilation of external-hello-world test with MSVC.

MSVC doesn't accept division by zero.

Reviewed By: Meinersbur

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

3 years ago[SLP]Add a test with broadcast shuffle kind in SLP, NFC.
Alexey Bataev [Wed, 21 Apr 2021 20:00:28 +0000 (13:00 -0700)]
[SLP]Add a test with broadcast shuffle kind in SLP, NFC.

3 years ago[LLParser] Print mismatched types in error message
Arthur Eubanks [Wed, 21 Apr 2021 19:13:53 +0000 (12:13 -0700)]
[LLParser] Print mismatched types in error message

Helps with debugging invalid handcrafted IR.

Reviewed By: rnk

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

3 years ago[LoopIdiom] Added testcase from PR44378; NFC
Dávid Bolvanský [Wed, 21 Apr 2021 19:59:46 +0000 (21:59 +0200)]
[LoopIdiom] Added testcase from PR44378; NFC

3 years ago[lld-macho][nfc] Add accessors for commonly-used PlatformInfo fields
Jez Ng [Wed, 21 Apr 2021 19:43:38 +0000 (15:43 -0400)]
[lld-macho][nfc] Add accessors for commonly-used PlatformInfo fields

As discussed here: https://reviews.llvm.org/D100523#inline-951543

Reviewed By: #lld-macho, thakis, alexshap

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

3 years agoRevert "[InstCombine] Fold multiuse shr eq zero"
Nikita Popov [Wed, 21 Apr 2021 19:15:22 +0000 (21:15 +0200)]
Revert "[InstCombine] Fold multiuse shr eq zero"

This reverts commit 9423f78240a216e3f38b394a41fe3427dee22c26.

A performance regression with this patch has been reported at
https://reviews.llvm.org/rG9423f78240a2#990953. Reverting for now.

3 years ago[scudo] Avoid empty statement warnings
Roland McGrath [Sat, 17 Apr 2021 02:00:25 +0000 (19:00 -0700)]
[scudo] Avoid empty statement warnings

An empty macro that expands to just `... else ;` can get
warnings from some compilers (e.g. GCC's -Wempty-body).

Reviewed By: cryptoad, vitalybuka

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

3 years ago[lldb] Fix RichManglingContext::FromCxxMethodName() leak
Jordan Rupprecht [Mon, 19 Apr 2021 21:32:26 +0000 (14:32 -0700)]
[lldb] Fix RichManglingContext::FromCxxMethodName() leak

`RichManglingContext::FromCxxMethodName` allocates a m_cxx_method_parser, but never deletes it.

This fixes a `-DLLVM_USE_SANITIZER=Leaks` failure.

Reviewed By: teemperor

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

3 years ago[FuncAttrs] Don't infer willreturn for nonexact definitions
sstefan1 [Wed, 21 Apr 2021 19:02:28 +0000 (21:02 +0200)]
[FuncAttrs] Don't infer willreturn for nonexact definitions

Discovered during attributor testing comparing stats with
and without the attributor. Willreturn should not be inferred
for nonexact definitions.

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

3 years ago[compiler-rt] check max address from kernel is <= mmap range size
Emily Shi [Sat, 10 Apr 2021 00:47:54 +0000 (17:47 -0700)]
[compiler-rt] check max address from kernel is <= mmap range size

If these sizes do not match, asan will not work as expected. Previously, we added compile-time checks for non-iOS platforms. We check at run time for iOS because we get the max VM size from the kernel at run time.

rdar://76477969

Reviewed By: delcypher

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

3 years ago[SimplifyLibCalls] Don't change alignment when creating memset
sstefan1 [Tue, 20 Apr 2021 17:55:11 +0000 (19:55 +0200)]
[SimplifyLibCalls] Don't change alignment when creating memset

Fix for PR49984
This was discovered during Attributor testing.
Memset was always created with alignment of 1
and in case when strncpy alignment was changed
it triggered an assertion in the AttrBuilder.
Memset will now be created with appropriate alignment.

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

3 years agoFix FoldReshapeOpWithUnitExtent generating illegal reshape
Ahmed Taei [Mon, 19 Apr 2021 23:52:47 +0000 (16:52 -0700)]
Fix FoldReshapeOpWithUnitExtent generating illegal reshape

This will prevent fusion that spains all dims and generates
(d0, d1, ...) -> () reshape that isn't legal

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

3 years ago[InstSimplify] generalize ctlz-of-shifted-constant
Sanjay Patel [Wed, 21 Apr 2021 18:13:30 +0000 (14:13 -0400)]
[InstSimplify] generalize ctlz-of-shifted-constant

https://alive2.llvm.org/ce/z/zWL_VQ

3 years ago[InstSimplify] add tests for ctlz-of-shift-constant; NFC
Sanjay Patel [Wed, 21 Apr 2021 18:07:34 +0000 (14:07 -0400)]
[InstSimplify] add tests for ctlz-of-shift-constant; NFC

3 years ago[lld/mac] add aarch64 to requirements of encryption-info.s test
Nico Weber [Wed, 21 Apr 2021 18:21:36 +0000 (14:21 -0400)]
[lld/mac] add aarch64 to requirements of encryption-info.s test

3 years ago[libc++][doc] Improve Phabricator links.
Mark de Wever [Wed, 21 Apr 2021 18:12:03 +0000 (20:12 +0200)]
[libc++][doc] Improve Phabricator links.

Removes the "reviews." part of the links as suggested by @ldionne in
D100707.

3 years ago[Polly] Explicitly include all std headers
Krzysztof Parzyszek [Wed, 21 Apr 2021 17:50:40 +0000 (12:50 -0500)]
[Polly] Explicitly include all std headers

There were some recent header changes, and now some std classes
are no longer available in ScopDetection.cpp with the pre-existing
includes.

3 years ago[X86][SSE] getFauxShuffleMask - don't decode OR(SHUFFLE,SHUFFLE) containing UNDEFs...
Simon Pilgrim [Wed, 21 Apr 2021 16:43:23 +0000 (17:43 +0100)]
[X86][SSE] getFauxShuffleMask - don't decode OR(SHUFFLE,SHUFFLE) containing UNDEFs. (PR50049)

PR50049 demonstrated an infinite loop between OR(SHUFFLE,SHUFFLE) <-> BLEND(SHUFFLE,SHUFFLE) patterns.

The UNDEF elements were allowing a combined shuffle mask to be widened which lost the undef element, resulting us needing to use the BLEND pattern (as the undef element would need to be zero for the OR pattern). But then bitcast folds would re-expose the undef element allowing us to use OR again.....

3 years ago[lldb] [test/Register] Initial tests for regsets in core dumps
Michał Górny [Mon, 23 Nov 2020 13:24:54 +0000 (14:24 +0100)]
[lldb] [test/Register] Initial tests for regsets in core dumps

Add initial tests for reading register sets from core dumps.  This
includes a C++ program to write registers and dump core, resulting core
dumps for Linux, FreeBSD and NetBSD, and the tests to verify them.

The tests are split into generic part, verifying user-specified register
values, and coredump-specific tests that verify memory addresses that
differ for every dump.

At this moment, all platforms support GPRs and FPRs up to XMM for amd64
target.  The i386 target does not work on NetBSD at all, and is missing
FPRs entirely on FreeBSD.

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

3 years ago[lld-macho] Support LC_ENCRYPTION_INFO
Jez Ng [Wed, 21 Apr 2021 17:35:12 +0000 (13:35 -0400)]
[lld-macho] Support LC_ENCRYPTION_INFO

This load command records a range spanning from the end of the load
commands to the end of the `__TEXT` segment. Presumably the kernel will encrypt
all this data.

Reviewed By: #lld-macho, thakis

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

3 years ago[OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault.
Alexey Bataev [Fri, 16 Apr 2021 18:29:01 +0000 (11:29 -0700)]
[OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault.

The implicitly generated mappings for allocation/deallocation in mappers
runtime should be mapped as implicit, also no need to clear member_of
flag to avoid ref counter increment. Also, the ref counter should not be
incremented for the very first element that comes from the mapper
function.

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

3 years ago[lsan][docs] Clarify supported platforms
Fangrui Song [Wed, 21 Apr 2021 17:27:55 +0000 (10:27 -0700)]
[lsan][docs] Clarify supported platforms

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

3 years ago[libcxx][iterator] adds `std::indirectly_readable` and `std::indirectly_writable`
Christopher Di Bella [Wed, 21 Apr 2021 16:41:13 +0000 (16:41 +0000)]
[libcxx][iterator] adds `std::indirectly_readable` and `std::indirectly_writable`

Implements parts of:
    * P0896R4 The One Ranges Proposal`

Depends on D99873.

Reviewed By: ldionne, #libc

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

3 years ago[PollyACC] Fix declaration/stub definition mismatch. NFC.
Michael Kruse [Wed, 21 Apr 2021 15:12:23 +0000 (10:12 -0500)]
[PollyACC] Fix declaration/stub definition mismatch. NFC.

external.c defines stub functions that are never used because of how
Polly uses PPCG. Unfortunately, they are declared as functions without
return values or parameters which does not match their declarations.
Since they are never called, this was usually not a problem, but an LTO
build gets confused with differently declared functions, or in case of
pet_options_args, a global variable declaration that is defined as a
function

Resolve by including the declaring headers in external.c which forces
the declaration and definition to match at compile-time.

This fixes llvm.org/50021

3 years ago[libc++] s/_LIBCPP_NO_HAS_CHAR8_T/_LIBCPP_HAS_NO_CHAR8_T/g
Arthur O'Dwyer [Mon, 19 Apr 2021 01:47:08 +0000 (21:47 -0400)]
[libc++] s/_LIBCPP_NO_HAS_CHAR8_T/_LIBCPP_HAS_NO_CHAR8_T/g

This was raised in D94511.

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

3 years ago[libc++] [test] Remove epicyclic workarounds for vector/span; use T[] or std::array.
Arthur O'Dwyer [Tue, 20 Apr 2021 18:14:35 +0000 (14:14 -0400)]
[libc++] [test] Remove epicyclic workarounds for vector/span; use T[] or std::array.

Simplify the test code, and drive-by also test that these algorithms
return the right iterator as their return value.

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

3 years ago[CSSPGO] Exclude pseudo probe from slotindex verification.
Hongtao Yu [Wed, 21 Apr 2021 16:14:50 +0000 (09:14 -0700)]
[CSSPGO] Exclude pseudo probe from slotindex verification.

3 years ago[gn build] add llvm-profgen to gn build
Nico Weber [Wed, 21 Apr 2021 15:49:17 +0000 (11:49 -0400)]
[gn build] add llvm-profgen to gn build

Didn't notice it missing due to https://reviews.llvm.org/D89707#2705110

3 years ago[gn build] Port 97e383aa061b
LLVM GN Syncbot [Wed, 21 Apr 2021 15:39:33 +0000 (15:39 +0000)]
[gn build] Port 97e383aa061b

3 years ago[lld][MachO] Refactor findCommand
Alexander Shaposhnikov [Wed, 21 Apr 2021 15:18:20 +0000 (08:18 -0700)]
[lld][MachO] Refactor findCommand

Refactor findCommand to allow passing multiple types. NFC.

Test plan: make check-lld-macho

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

3 years ago[lldb/test] Clean up TestThreadSpecificBpPlusCondition inferior
Pavel Labath [Wed, 21 Apr 2021 15:31:41 +0000 (17:31 +0200)]
[lldb/test] Clean up TestThreadSpecificBpPlusCondition inferior

The test had a race that could cause two threads to end up with the same
"thread local" value. I believe this would not cause the test to fail,
but it could cause it to succeed even when the functionality is broken.

The new implementation removes this uncertainty, and removes a lot of
cruft left over from the time this test was written using pthreads.

3 years ago[AMDGPU] Lower regbanks reassign threshold to 15000
Stanislav Mekhanoshin [Tue, 20 Apr 2021 22:58:01 +0000 (15:58 -0700)]
[AMDGPU] Lower regbanks reassign threshold to 15000

Let it work on a very small kernels only. Measurements showed
the performance benefit is not worth the compile time.

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

3 years ago[libc++] Add std::ranges::iter_move and std::iter_rvalue_reference_t
Louis Dionne [Tue, 20 Apr 2021 18:40:43 +0000 (14:40 -0400)]
[libc++] Add std::ranges::iter_move and std::iter_rvalue_reference_t

Original patch by @cjdb, modified by @ldionne.

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

3 years ago[flang] iwyu fixes after ba7a92c01e8
Nico Weber [Wed, 21 Apr 2021 15:10:45 +0000 (11:10 -0400)]
[flang] iwyu fixes after ba7a92c01e8

3 years ago[mlir] hopefully final round of iwyu fixes after ba7a92c01e8
Nico Weber [Wed, 21 Apr 2021 15:02:58 +0000 (11:02 -0400)]
[mlir] hopefully final round of iwyu fixes after ba7a92c01e8

3 years ago[lldb/test] Modernize lldb-server test inferior
Pavel Labath [Fri, 16 Apr 2021 19:52:59 +0000 (21:52 +0200)]
[lldb/test] Modernize lldb-server test inferior

Avoid c string manipulation by introducing a StringRef-like
consume_front operation.

3 years ago[mlir] yet more iwyu fixes after ba7a92c01e8
Nico Weber [Wed, 21 Apr 2021 14:54:44 +0000 (10:54 -0400)]
[mlir] yet more iwyu fixes after ba7a92c01e8

3 years ago[mlir] more iwyu fixes after ba7a92c01e8
Nico Weber [Wed, 21 Apr 2021 14:50:59 +0000 (10:50 -0400)]
[mlir] more iwyu fixes after ba7a92c01e8

3 years ago[mlir] some iwyu fixes after ba7a92c01e8
Nico Weber [Wed, 21 Apr 2021 14:48:54 +0000 (10:48 -0400)]
[mlir] some iwyu fixes after ba7a92c01e8

3 years agoclang-format: [JS] do not wrap after `asserts`
Martin Probst [Wed, 21 Apr 2021 13:43:41 +0000 (15:43 +0200)]
clang-format: [JS] do not wrap after `asserts`

`asserts` is a pseudo keyword in TypeScript used in return types.
Wrapping after it triggers automatic semicolon insertion, which
breaks the code semantics/syntax.

`asserts` is different from other pseudo keywords in that it is
specific to TS and only carries meaning in a very specific location.
Thus introducing a token type is probably overkill.

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

3 years ago[TTI] NFC: Change getVectorSplitCost to return InstructionCost
dfukalov [Wed, 21 Apr 2021 13:38:53 +0000 (16:38 +0300)]
[TTI] NFC: Change getVectorSplitCost to return InstructionCost

This patch migrates the TTI cost interfaces to return an InstructionCost.

See this patch for the introduction of the type: https://reviews.llvm.org/D91174
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2020-November/146408.html

Reviewed By: sdesmalen

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