1. [mlir][vector] Extend pattern to trim lead unit dimension to Splat Op (details)
  2. [mlir] Missed clang-format (details)
  3. [lld/mac] Write every weak symbol only once in the output (details)
  4. [BareMetal] Ensure that sysroot always comes after library paths (details)
  5. Fix the module-enabled build by removing a redundant type definition. (details)
  6. [AArch64][GlobalISel] Legalize narrow type G_CTPOPs (details)
  7. [NewPM] Move analysis invalidation/clearing logging to instrumentation (details)
Commit d0453a8933a14c9441b2d89e6f934bd1bc243200 by thomasraoux
[mlir][vector] Extend pattern to trim lead unit dimension to Splat Op

Differential Revision:
The file was modifiedmlir/test/Dialect/Vector/vector-transforms.mlir
The file was modifiedmlir/lib/Dialect/Vector/VectorTransforms.cpp
Commit b90b66bcbe3ec909d386d3d546cd116099619641 by thomasraoux
[mlir] Missed clang-format
The file was modifiedmlir/lib/Dialect/Vector/VectorTransforms.cpp
Commit d5a70db1938c06380bdab033b7d47a7437914f4c by thakis
[lld/mac] Write every weak symbol only once in the output

Before this, if an inline function was defined in several input files,
lld would write each copy of the inline function the output. With this
patch, it only writes one copy.

Reduces the size of Chromium Framework from 378MB to 345MB (compared
to 290MB linked with ld64, which also does dead-stripping, which we
don't do yet), and makes linking it faster:

        N           Min           Max        Median           Avg        Stddev
    x  10     3.9957051     4.3496981     4.1411121      4.156837    0.10092097
    +  10      3.908154      4.169318     3.9712729     3.9846753   0.075773012
    Difference at 95.0% confidence
            -0.172162 +/- 0.083847
            -4.14165% +/- 2.01709%
            (Student's t, pooled s = 0.0892373)

Implementation-wise, when merging two weak symbols, this sets a
"canOmitFromOutput" on the InputSection belonging to the weak symbol not put in
the symbol table. We then don't write InputSections that have this set, as long
as they are not referenced from other symbols. (This happens e.g. for object
files that don't set .subsections_via_symbols or that use .alt_entry.)

Some restrictions:
- not yet done for bitcode inputs
- no "comdat" handling (`kindNoneGroupSubordinate*` in ld64) --
  Frame Descriptor Entries (FDEs), Language Specific Data Areas (LSDAs)
  (that is, catch block unwind information) and Personality Routines
  associated with weak functions still not stripped. This is wasteful,
  but harmless.
- However, this does strip weaks from __unwind_info (which is needed for
  correctness and not just for size)
- This nopes out on InputSections that are referenced form more than
  one symbol (eg from .alt_entry) for now

Things that work based on symbols Just Work:
- map files (change in MapFile.cpp is no-op and not needed; I just
  found it a bit more explicit)
- exports

Things that work with inputSections need to explicitly check if
an inputSection is written (e.g. unwind info).

This patch is useful in itself, but it's also likely also a useful foundation
for dead_strip.

I used to have a "canoncialRepresentative" pointer on InputSection instead of
just the bool, which would be handy for ICF too. But I ended up not needing it
for this patch, so I removed that again for now.

Differential Revision:
The file was modifiedlld/MachO/UnwindInfoSection.cpp
The file was modifiedlld/MachO/InputFiles.cpp
The file was modifiedlld/MachO/Symbols.h
The file was modifiedlld/MachO/SymbolTable.cpp
The file was modifiedlld/MachO/Writer.cpp
The file was addedlld/test/MachO/weak-definition-gc.s
The file was modifiedlld/MachO/MapFile.cpp
The file was modifiedlld/MachO/InputSection.cpp
The file was modifiedlld/MachO/InputSection.h
Commit 167906c10932f5eda97b480ee084b17746c362e7 by phosek
[BareMetal] Ensure that sysroot always comes after library paths

This addresses an issue introduced in D91559. We would invoke the
compiler with -Lpath/to/lib --sysroot=path/to/sysroot where both
locations contain libraries with the same name, but we expect linker
to pick up the library in path/to/lib since that version is more
specialized. This was the case before D91559 where the sysroot path
would be ignored, but after that change linker would now pick up the
library from the sysroot which resulted in unexpected behavior.

The sysroot path should always come after any user provided library
paths, followed by compiler runtime paths. We want for libraries in user
provided library paths to always take precedence over sysroot libraries.
This matches the behavior of other toolchains used with other targets.

Differential Revision:
The file was modifiedclang/lib/Driver/ToolChains/BareMetal.cpp
The file was modifiedclang/test/Driver/baremetal.cpp
Commit c6ddf669dcf379360e97a557e13617435d3c78cc by Adrian Prantl
Fix the module-enabled build by removing a redundant type definition.
The file was modifiedllvm/lib/Transforms/IPO/PassManagerBuilder.cpp
Commit 1312852040b3190a6cb7d7c1f61fe95a5e930d8d by Jessica Paquette
[AArch64][GlobalISel] Legalize narrow type G_CTPOPs

Using `clampScalar` here because we ought to mark s128 as custom eventually.

(Right now, it will just fall back.)

With this legalization, we get the same code as SDAG:

Differential Revision:
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalize-ctpop.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
Commit 6f7131002b6a821fc9b245ec5179910f171e3358 by aeubanks
[NewPM] Move analysis invalidation/clearing logging to instrumentation

We're trying to move DebugLogging into instrumentation, rather than
being part of PassManagers/AnalysisManagers.

Reviewed By: ychen

Differential Revision:
The file was modifiedllvm/unittests/IR/PassManagerTest.cpp
The file was modifiedllvm/include/llvm/IR/PassInstrumentation.h
The file was modifiedllvm/unittests/IR/PassBuilderCallbacksTest.cpp
The file was modifiedllvm/lib/Passes/StandardInstrumentations.cpp
The file was modifiedllvm/test/Transforms/LoopUnroll/unroll-loop-invalidation.ll
The file was modifiedllvm/include/llvm/IR/PassManager.h
The file was modifiedllvm/unittests/Analysis/CGSCCPassManagerTest.cpp
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
The file was modifiedllvm/include/llvm/CodeGen/MachinePassManager.h
The file was modifiedllvm/lib/LTO/LTOBackend.cpp
The file was modifiedllvm/tools/opt/NewPMDriver.cpp
The file was modifiedllvm/include/llvm/IR/PassManagerImpl.h
The file was modifiedllvm/unittests/Transforms/Scalar/LoopPassManagerTest.cpp
The file was modifiedllvm/unittests/CodeGen/PassManagerTest.cpp