SuccessChanges

Summary

  1. [lldb/Test] Fix skipTestIfFn for fucntions that return a value (details)
  2. [SimpleLoopUnswitch][NFC] Add option to always drop make.implicit metadata in non-trivial unswitching and save compile time (details)
  3. [PGO] Move __profc_ and __profvp_ from their own comdat groups to __profd_'s comdat group (details)
  4. Add test utility 'split-file' (details)
  5. [AMDGPU] Make GCNRegBankReassign assign based on subreg banks (details)
  6. [PowerPC] mark r+i as legal address mode for vector type after pwr9 (details)
  7. [X86][AVX512] Fix build fail after D81548 (details)
  8. [PGO] Use multiple comdat groups for COFF (details)
  9. [YAMLParser] Fix a typo: iff -> if. NFC. (details)
Commit d6a5cce0e7d65562f081569a61595e53cdb8d5d0 by Jonas Devlieghere
[lldb/Test] Fix skipTestIfFn for fucntions that return a value

Sometimes the decorator is used on a common function rather than the
test method, which can return a value. This fails with decorators that
use skipTestIfFn under the hood.
The file was modifiedlldb/packages/Python/lldbsuite/test/decorators.py
Commit 7647c2716e383c091b7063e150d48d5821bcaa67 by mkazantsev
[SimpleLoopUnswitch][NFC] Add option to always drop make.implicit metadata in non-trivial unswitching and save compile time

We might want this if we find out that using of MustExecute analysis is too expensive.
By default we do the analysis because its complexity does not exceed the complexity
of whole loop copying in unswitching. Follow-up for D84925.

Differential Revision: https://reviews.llvm.org/D85001
Reviewed By: asbirlea
The file was modifiedllvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
Commit e56626e43826c9d7c35113635d62b57c905ef3c0 by i
[PGO] Move __profc_ and __profvp_ from their own comdat groups to __profd_'s comdat group

D68041 placed `__profc_`,  `__profd_` and (if exists) `__profvp_` in different comdat groups.
There are some issues:

* Cost: one or two additional section headers (`.group` section(s)): 64 or 128 bytes on ELF64.
* `__profc_`,  `__profd_` and (if exists) `__profvp_` should be retained or
  discarded. Placing them into separate comdat groups is conceptually inferior.
* If the prevailing group does not include `__profvp_` (value profiling not
  used) but a non-prevailing group from another translation unit has `__profvp_`
  (the function is inlined into another and triggers value profiling), there
  will be a stray `__profvp_` if --gc-sections is not enabled.
  This has been fixed by 3d6f53018f845e893ad34f64ff2851a2e5c3ba1d.

Actually, we can reuse an existing symbol (we choose `__profd_`) as the group
signature to avoid a string in the string table (the sole reason that D68041
could improve code size is that `__profv_` was an otherwise unused symbol which
wasted string table space). This saves one or two section headers.

For a -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_INSTRUMENTED=IR build, `ninja
clang lld`, the patch has saved 10.5MiB (2.2%) for the total .o size.

Reviewed By: davidxl

Differential Revision: https://reviews.llvm.org/D84723
The file was modifiedllvm/test/Instrumentation/InstrProfiling/linkage.ll
The file was modifiedllvm/test/Instrumentation/InstrProfiling/PR23499.ll
The file was modifiedllvm/test/Instrumentation/InstrProfiling/comdat.ll
The file was modifiedllvm/test/Instrumentation/InstrProfiling/icall.ll
The file was modifiedllvm/test/Transforms/PGOProfile/comdat_internal.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
Commit bcea3a7a288e0b5ac977f90c46e4eef7946467e7 by i
Add test utility 'split-file'

See https://lists.llvm.org/pipermail/llvm-dev/2020-July/143373.html
"[llvm-dev] Multiple documents in one test file" for some discussions.

This patch has explored several alternatives. The current semantics are similar to
what @dblaikie proposed.
`split-file filename output` splits the input file into multiple parts separated by
regex `^(.|//)--- filename` and write each part to the file `output/filename`
(`filename` can include path separators).

Use case A (organizing input of different formats (e.g. linker
script+assembly) in one file).

```
# RUN: split-file %s %t
# RUN: llvm-mc %t/asm -o %t.o
# RUN: ld.lld -T %t/lds %t.o -o %t
This is sometimes better than the %S/Inputs/ approach because the user
can see the auxiliary files immediately and don't have to open another file.

# asm
...
# lds
...
```

Use case B (for utilities which don't have built-in input splitting
feature):

```
// RUN: split-file %s %t
// RUN: llc < %t/1.ll | FileCheck %s --check-prefix=CASE1
// RUN: llc < %t/2.ll | FileCheck %s --check-prefix=CASE2
Combing tests prudently can improve readability.
For example, when testing parsing errors if the recovery mechanism isn't possible,
grouping the tests in one file can more readily see test coverage/strategy.

//--- 1.ll
...
//--- 2.ll
...
```

Since this is a new utility, there is no git history concerns for
UpperCase variable names. I use lowerCase variable names like mlir/lld.

Reviewed By: jhenderson, lattner

Differential Revision: https://reviews.llvm.org/D83834
The file was modifiedllvm/test/tools/llvm-strings/radix.test
The file was modifiedllvm/docs/TestingGuide.rst
The file was modifiedllvm/utils/gn/secondary/llvm/test/BUILD.gn
The file was modifiedllvm/test/CMakeLists.txt
The file was addedllvm/test/tools/split-file/no-leading-lines.test
The file was addedllvm/tools/split-file/.clang-tidy
The file was addedllvm/test/tools/split-file/Inputs/basic-cc.txt
The file was modifiedlld/test/CMakeLists.txt
The file was addedllvm/test/tools/split-file/basic.test
The file was modifiedlld/test/ELF/linkerscript/noload.s
The file was addedllvm/tools/split-file/split-file.cpp
The file was modifiedllvm/utils/gn/secondary/lld/test/BUILD.gn
The file was modifiedllvm/test/tools/gold/X86/multiple-sections.ll
The file was addedllvm/test/tools/split-file/empty.test
The file was addedllvm/utils/gn/secondary/llvm/tools/split-file/BUILD.gn
The file was addedllvm/test/tools/split-file/output-is-special.test
The file was addedllvm/test/tools/split-file/Inputs/basic-bb.txt
The file was addedllvm/test/tools/split-file/error.test
The file was addedllvm/tools/split-file/CMakeLists.txt
The file was modifiedllvm/test/lit.cfg.py
The file was addedllvm/test/tools/split-file/Inputs/basic-aa.txt
The file was addedllvm/test/tools/split-file/help.test
Commit 57899934eab18bbcab3482cc3ef862b0a1617ad0 by carl.ritson
[AMDGPU] Make GCNRegBankReassign assign based on subreg banks

When scavenging consider the sub-register of the source operand
to determine the bank of a candidate register (not just sub0).
Without this it is possible to introduce an infinite loop,
e.g. $sgpr15_sgpr16_sgpr17 can be assigned for a conflict between
$sgpr0 and SGPR_96:sub1.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D84910
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
The file was addedllvm/test/CodeGen/AMDGPU/regbank-reassign-wave64.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/regbank-reassign.mir
The file was modifiedllvm/lib/Target/AMDGPU/GCNRegBankReassign.cpp
Commit 45c46d180e15da9974fb0177f8e4b5a293ac241a by czhengsz
[PowerPC] mark r+i as legal address mode for vector type after pwr9

Reviewed By: steven.zhang

Differential Revision: https://reviews.llvm.org/D84735
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modifiedllvm/test/CodeGen/PowerPC/prefer-dqform.ll
Commit 6bc7ea2d8d8638f5bb753715e9023df514e814e9 by pengfei.wang
[X86][AVX512] Fix build fail after D81548

Test function mask_cmp_128 failed during ISEL
LLVM ERROR: Cannot select: t37: v8i1 = X86ISD::KSHIFTL t48, TargetConstant:i8<4>
due to v8i1 only available under AVX512DQ.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D84922
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/vector-shuffle-v1.ll
Commit b959906cb9e79f844ea4e34aa701f21bad007253 by i
[PGO] Use multiple comdat groups for COFF

D84723 caused multiple definition issues (related to comdat) on Windows:
http://lab.llvm.org:8011/builders/sanitizer-windows/builds/67465
The file was modifiedllvm/test/Instrumentation/InstrProfiling/linkage.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
The file was modifiedllvm/test/Instrumentation/InstrProfiling/PR23499.ll
The file was modifiedllvm/test/Instrumentation/InstrProfiling/comdat.ll
Commit 25abd1994ed209c1bf4139946a42e36a42143a85 by Xing
[YAMLParser] Fix a typo: iff -> if. NFC.
The file was modifiedllvm/include/llvm/Support/YAMLParser.h