Changes

Summary

  1. Add flang-x86_64-windows builder. (details)
Commit c406b636839cf07367241c224da3c0207c1396a3 by llvm-zorg
Add flang-x86_64-windows builder.

Add a buildbot to compile flang using msvc. Due to msvc doing some things differently than other compilers, the msvc flang build breaks regularly. This builder will notify committers if their change causes the build to break.

However, the tests never completed successfully on Windows, partially because many tests require a UNIX shell (see D89368). To not constantly fail, tests failures only trigger a warning, until all tests are fixed as well.

Currently running here: http://meinersbur.de:8011/#/builders/146

Reviewed By: gkistanova

Differential Revision: https://reviews.llvm.org/D103199
The file was modifiedbuildbot/osuosl/master/config/workers.py (diff)
The file was modifiedbuildbot/osuosl/master/config/builders.py (diff)

Summary

  1. test: clean up some of the RISCV tests (NFC) (details)
  2. [libcxx][iwyu] 🎨 adds more headers to IWYU (details)
  3. [libcxx][module-map] 🎨 updates module map to account for ranges headers (details)
  4. [mlir][sparse] Add Matricized Tensor Times Khatri-Rao Product (MTTKRP) integration test (details)
  5. [clang] Fix a race condition in the build of clangInterpreter (details)
  6. [lld-macho] Implement ICF (details)
  7. [gn build] Port f27e4548fc42 (details)
  8. [AIX] Remove --as-needed passing into aix linker (details)
  9. [NFC] LoopVectorizationCostModel::getMaximizedVFForTarget(): clarify debug msg (details)
  10. [X86] AMD Zen 3: don't confuse shift and shuffle, NFC (details)
  11. [llvm-symbolizer][docs] Update example for --verbose in the guide (details)
  12. [lld-macho] Rework mergeFlag to behave closer to what ld64 does. (details)
  13. [lld][WebAssembly] Add new `--import-undefined` option (details)
  14. [MCA] [RegisterFile] Allow for skipping Defs with RegID of 0 (rather than assert(RegID) like we do before this patch). (details)
  15. [LoopUnroll] Fold all exits based on known trip count/multiple (details)
  16. [lldb-vscode] only report long running progress events (details)
Commit e70d4994ea9eb44ba5a86c5073ac83cf500aabdd by Saleem Abdulrasool
test: clean up some of the RISCV tests (NFC)

This addresses some post-commit comments from jrtc27 to make the tests
easier to process.
The file was modifiedllvm/test/CodeGen/RISCV/fixups-diff.ll
The file was modifiedllvm/test/CodeGen/RISCV/fixups-relax-diff.ll
Commit a22c55c69bcdef193715fd6e1f92a329649bc153 by cjdb
[libcxx][iwyu] 🎨 adds more headers to IWYU

A few slipped through the cracks because D104175 and D104170 didn't
concern themselves with newer commits.

Differential Revision: https://reviews.llvm.org/D104414
The file was modifiedlibcxx/include/__ranges/ref_view.h
The file was modifiedlibcxx/include/__ranges/subrange.h
The file was modifiedlibcxx/include/__ranges/empty_view.h
Commit d827af03bc1d12e813ef207d2a897998ebf64ca1 by cjdb
[libcxx][module-map] 🎨 updates module map to account for ranges headers

Corresponding module map update for D104414, split out for rollback
reasons.

Differential Revision: https://reviews.llvm.org/D104415
The file was modifiedlibcxx/include/module.modulemap
Commit 22911585bb3811767a616c20946290b8e9a988d9 by gusss
[mlir][sparse] Add Matricized Tensor Times Khatri-Rao Product (MTTKRP) integration test

See this documentation from taco:
http://tensor-compiler.org/docs/data_analytics/index.html

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D104417
The file was addedmlir/test/Integration/data/mttkrp_b.tns
The file was modifiedmlir/test/CMakeLists.txt
The file was addedmlir/test/Integration/Dialect/SparseTensor/CPU/sparse_mttkrp.mlir
Commit 734d688fbce8a453aa61764b9b5a43b26455dc0d by stilis
[clang] Fix a race condition in the build of clangInterpreter

The library depends on Attributes.inc, so it has to depend on the intrinsics_gen target

Reviewed By: v.g.vassilev

Differential Revision: https://reviews.llvm.org/D104311
The file was modifiedclang/lib/Interpreter/CMakeLists.txt
Commit f27e4548fc42876f66dac260ca3b6df0d5fd5fd6 by gkm
[lld-macho] Implement ICF

ICF = Identical C(ode|OMDAT) Folding

This is the LLD ELF/COFF algorithm, adapted for MachO. So far, only `-icf all` is supported. In order to support `-icf safe`, we will need to port address-significance tables (`.addrsig` directives) to MachO, which will come in later diffs.

`check-{llvm,clang,lld}` have 0 regressions for `lld -icf all` vs. baseline ld64.

We only run ICF on `__TEXT,__text` for reasons explained in the block comment in `ConcatOutputSection.cpp`.

Here is the perf impact for linking `chromium_framekwork` on a Mac Pro (16-core Xeon W) for the non-ICF case vs. pre-ICF:
```
    N           Min           Max        Median           Avg        Stddev
x  20          4.27          4.44          4.34         4.349   0.043029977
+  20          4.37          4.46         4.405        4.4115   0.025188761
Difference at 95.0% confidence
        0.0625 +/- 0.0225658
        1.43711% +/- 0.518873%
        (Student's t, pooled s = 0.0352566)
```

Reviewed By: #lld-macho, int3

Differential Revision: https://reviews.llvm.org/D103292
The file was addedlld/test/MachO/icf-options.s
The file was addedlld/test/MachO/icf.s
The file was modifiedlld/MachO/CMakeLists.txt
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/MachO/ConcatOutputSection.h
The file was modifiedlld/MachO/Driver.cpp
The file was modifiedlld/MachO/UnwindInfoSection.h
The file was modifiedlld/test/MachO/Inputs/MacOSX.sdk/usr/lib/libSystem.tbd
The file was addedlld/MachO/ICF.h
The file was addedlld/MachO/ICF.cpp
The file was modifiedlld/MachO/UnwindInfoSection.cpp
The file was modifiedlld/MachO/InputSection.h
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/InputFiles.cpp
The file was modifiedlld/MachO/Symbols.cpp
The file was addedlld/test/MachO/icf-scale.s
The file was modifiedlld/MachO/ConcatOutputSection.cpp
The file was modifiedlld/MachO/InputSection.cpp
The file was modifiedlld/MachO/Options.td
The file was modifiedlld/MachO/Config.h
Commit 00553a32330822fd936dcfd4830556468aaf918c by llvmgnsyncbot
[gn build] Port f27e4548fc42
The file was modifiedllvm/utils/gn/secondary/lld/MachO/BUILD.gn
Commit 4e2aee8d3bab6010420d9be96480f1d8ae0f35c1 by jasonliu
[AIX] Remove --as-needed passing into aix linker

Summary:
AIX does not support --as-needed linker options. Remove that option from
aix linker when -lunwind is needed.
For unwinder library, nothing special is needed because by default aix
linker has the as-needed effect for library that's an archive (which is
the case for libunwind on AIX).

Reviewed By: daltenty

Differential Revision: https://reviews.llvm.org/D104314
The file was modifiedclang/test/Driver/aix-ld.c
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
Commit 37dfc467ac807bde4f221edbf304d9a46c9789b2 by lebedev.ri
[NFC] LoopVectorizationCostModel::getMaximizedVFForTarget(): clarify debug msg

This really isn't talking about vectors in general,
but only about either fixed or scalable vectors,
and it's pretty confusing to see it state
that there aren't any vectors :)
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Commit 69caacc626f7dbbb9223b370952fcf5660e242dc by lebedev.ri
[X86] AMD Zen 3: don't confuse shift and shuffle, NFC

These proc res groups occupy the exact same pipes,
so this doesn't affect the modelling,
but it's confusing nontheless.
The file was modifiedllvm/lib/Target/X86/X86ScheduleZnver3.td
Commit d02bf362dcf8d1488dfcf970c12c6047885a5f06 by andrew.ng
[llvm-symbolizer][docs] Update example for --verbose in the guide

Differential Revision: https://reviews.llvm.org/D104128
The file was modifiedllvm/docs/CommandGuide/llvm-symbolizer.rst
Commit 366df11a35392c946678f1af94038945c23f06c8 by vyng
[lld-macho] Rework mergeFlag to behave closer to what ld64 does.

Details:
I've been getting a few weird errors similar to the following from our internal tests:

```
ld64.lld.darwinnew: error: Cannot merge section __eh_frame (type=0x0) into __eh_frame (type=0xB): inconsistent types
ld64.lld.darwinnew: error: Cannot merge section __eh_frame (flags=0x0) into __eh_frame (flags=0x6800000B): strict flags differ
ld64.lld.darwinnew: error: Cannot merge section __eh_frame (type=0x0) into __eh_frame (type=0xB): inconsistent types
ld64.lld.darwinnew: error: Cannot merge section __eh_frame (flags=0x0) into __eh_frame (flags=0x6800000B): strict flags differ
```

Differential Revision: https://reviews.llvm.org/D103971
The file was modifiedlld/MachO/ConcatOutputSection.cpp
The file was modifiedlld/test/MachO/builtin-rename.s
The file was modifiedlld/MachO/ConcatOutputSection.h
Commit 758633f92226ad25c9007a8a05f01cb848b97ab8 by sbc
[lld][WebAssembly] Add new `--import-undefined` option

This change revisits https://reviews.llvm.org/D79248 which originally
added support for the --unresolved-symbols flag.

At the time I thought it would make sense to add a third option to this
flag called `import-functions` but it turns out (as was suspects by on
the reviewers IIRC) that this option can be authoganal.

Instead I've added a new option called `--import-undefined` that only
operates on symbols that can be imported (for example, function symbols
can always be imported as opposed to data symbols we can only be
imported when compiling with PIC).

This option gives us the full expresivitiy that emscripten needs to be
able allow reporting of undefined data symbols as well as the option to
disable that.

This change does remove the `--unresolved-symbols=import-functions`
option, which is been in the codebase now for about a year but I would
be extremely surprised if anyone was using it.

Differential Revision: https://reviews.llvm.org/D103290
The file was modifiedlld/wasm/Config.h
The file was modifiedlld/docs/WebAssembly.rst
The file was modifiedlld/wasm/Driver.cpp
The file was modifiedlld/wasm/Writer.cpp
The file was modifiedlld/wasm/Options.td
The file was modifiedlld/test/wasm/unresolved-symbols.s
The file was modifiedlld/wasm/Relocations.cpp
Commit dc11d4e6be2455e666319e01bc1c79a3ba750fbf by pholland2
[MCA] [RegisterFile] Allow for skipping Defs with RegID of 0 (rather than assert(RegID) like we do before this patch).

This patch will allow developers to remove unwanted instruction Defs (most likely from within a target specific InstrPostProcess) by setting that Def's RegisterID to 0.
Differential Revision: https://reviews.llvm.org/D104433
The file was modifiedllvm/lib/MCA/HardwareUnits/RegisterFile.cpp
Commit f7c54c4603a2df8c0833f5ddc04a5e109bca1c14 by nikita.ppv
[LoopUnroll] Fold all exits based on known trip count/multiple

Fold all exits based on known trip count/multiple information from
SCEV. Previously only the latch exit or the single exit were folded.

This doesn't yet eliminate ULO.TripCount and ULO.TripMultiple
entirely: They're still used to a) decide whether runtime unrolling
should be performed and b) for ORE remarks. However, the core
unrolling logic is independent of them now.

Differential Revision: https://reviews.llvm.org/D104203
The file was modifiedllvm/test/Transforms/LoopUnroll/multiple-exits.ll
The file was modifiedllvm/lib/Transforms/Utils/LoopUnroll.cpp
The file was modifiedllvm/test/Transforms/LoopUnroll/nonlatchcondbr.ll
Commit aa4685c0fb3aab5acb90be5fd3eb5ba8bf1e3211 by walter erquinigo
[lldb-vscode] only report long running progress events

When the number of shared libs is massive, there could be hundreds of
thousands of short lived progress events sent to the IDE, which makes it
irresponsive while it's processing all this data. As these small jobs
take less than a second to process, the user doesn't even see them,
because the IDE only display the progress of long operations. So it's
better not to send these events.

I'm fixing that by sending only the events that are taking longer than 5
seconds to process.
In a specific run, I got the number of events from ~500k to 100, because
there was only 1 big lib to parse.

I've tried this on several small and massive targets, and it seems to
work fine.

Differential Revision: https://reviews.llvm.org/D101128
The file was modifiedlldb/tools/lldb-vscode/ProgressEvent.cpp
The file was modifiedlldb/tools/lldb-vscode/VSCode.cpp
The file was modifiedlldb/tools/lldb-vscode/ProgressEvent.h
The file was modifiedlldb/tools/lldb-vscode/VSCode.h
The file was modifiedlldb/tools/lldb-vscode/lldb-vscode.cpp