SuccessChanges

Summary

  1. Fix a Clang diagnostic to start with a lowercase letter; NFC (details)
  2. [libcxx][ranges] Add `default_sentinel` and `default_sentinel_t`. (details)
  3. [gn build] Port 065cf3f9d703 (details)
  4. [lld][WebAssemlby] Fix for string merging of -dwarf-5 sections (details)
  5. [Dominators] Rewrite the dominator implementation for efficiency. NFC. (details)
  6. [Fuchsia] Add compat multilibs to cache file (details)
  7. [lld/mac] Emit only one LC_LOAD_DYLIB per dylib (details)
  8. [CSE] Ask DominanceInfo about "hasSSADominance" instead of reconstructing it. (details)
Commit d7f846fc6be14539fb0f5223eb08cb2235759897 by aaron
Fix a Clang diagnostic to start with a lowercase letter; NFC
The file was modifiedclang/include/clang/Basic/DiagnosticParseKinds.td
The file was modifiedclang/test/Sema/ms-inline-asm-invalid-arch.c
Commit 065cf3f9d70374d0a02f1e15be32eaaa59f01466 by zoecarver
[libcxx][ranges] Add `default_sentinel` and `default_sentinel_t`.

Refs https://eel.is/c++draft/default.sentinel and https://eel.is/c++draft/iterator.synopsis

Differential Revision: https://reviews.llvm.org/D103487
The file was addedlibcxx/include/__iterator/default_sentinel.h
The file was modifiedlibcxx/include/iterator
The file was modifiedlibcxx/include/CMakeLists.txt
The file was modifiedlibcxx/docs/OneRangesProposalStatus.csv
The file was addedlibcxx/test/std/iterators/predef.iterators/default.sentinel/default.sentinel.pass.cpp
Commit 8ae7fe24c1837590fc623133f9dbc9ff683f9e85 by llvmgnsyncbot
[gn build] Port 065cf3f9d703
The file was modifiedllvm/utils/gn/secondary/libcxx/include/BUILD.gn
Commit c1a59fa550818c6d3c229b43918b5045d7df83e6 by sbc
[lld][WebAssemlby] Fix for string merging of -dwarf-5 sections

We were mistakenly treating `.debug_str_offsets` as a string mergable
section when it is not (it contains integers not strings).  This is an
indication that we really should find a way to store flags for custom
sections.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=48828
Fixes: https://bugs.chromium.org/p/chromium/issues/detail?id=1172217

Differential Revision: https://reviews.llvm.org/D103486
The file was modifiedlld/wasm/InputFiles.cpp
The file was modifiedlld/test/wasm/merge-string-debug.s
Commit 412ae15de49a227de25a695735451f8908ebf999 by clattner
[Dominators] Rewrite the dominator implementation for efficiency. NFC.

The previous impl densely scanned the entire region starting with an op
when dominators were created, creating a DominatorTree for every region.

This is extremely expensive up front -- particularly for clients like
Linalg/Transforms/Fusion.cpp that construct DominanceInfo for a single
query.  It is also extremely memory wasteful for IRs that use single
block regions commonly (e.g. affine.for) because it's making a
dominator tree for a region that has trivial dominance.  The
implementation also had numerous unnecessary minor efficiencies, e.g.
doing multiple walks of the region tree or tryGetBlocksInSameRegion
building a DenseMap that it didn't need.

This patch switches to an approach where [Post]DominanceInfo is free
to construct, and which lazily constructs DominatorTree's for any
multiblock regions that it needs.  This avoids the up-front cost
entirely, making its runtime proportional to the complexity of the
region tree instead of # ops in a region.  This also avoids the memory
and time cost of creating DominatorTree's for single block regions.

Finally this rewrites the implementation for simplicity and to avoids
the constant factor problems the old implementation had.

Differential Revision: https://reviews.llvm.org/D103384
The file was modifiedmlir/lib/IR/Region.cpp
The file was modifiedmlir/lib/Transforms/BufferOptimizations.cpp
The file was modifiedmlir/include/mlir/IR/Dominance.h
The file was modifiedmlir/lib/IR/Dominance.cpp
The file was modifiedmlir/lib/Transforms/CSE.cpp
The file was modifiedmlir/include/mlir/IR/Region.h
Commit da1db49409657d5212185ab9952ee35d99b773d4 by leonardchan
[Fuchsia] Add compat multilibs to cache file

Differential Revision: https://reviews.llvm.org/D103477
The file was modifiedclang/cmake/caches/Fuchsia-stage2.cmake
Commit aeae3e0ba9061a40209987d6256e489146c2bffb by thakis
[lld/mac] Emit only one LC_LOAD_DYLIB per dylib

In some cases, we end up with several distinct DylibFiles that
have the same install name. Only emit a single LC_LOAD_DYLIB in
those cases.

This happens in 3 cases I know of:

1. Some tbd files are symlinks. libpthread.tbd is a symlink against
   libSystem.tbd for example, so `-lSystem -lpthread` loads
   libSystem.tbd twice. We could (and maybe should) cache loaded
   dylibs by realpath() to catch this.

2. Some tbd files are copies of each other. For example,
   CFNetwork.framework/CFNetwork.tbd and
   CFNetwork.framework/Versions/A/CFNetwork.tbd are two distinct
   copies of the same file. The former is found by
   `-framework CFNetwork` and the latter by the reexport in
   CoreServices.tbd. We could conceivably catch this by
   making `-framework` search look in `Versions/Current` instead
   of in the root, and/or by using a content hash to cache
   tbd files, but that's starting to sound complicated.

3. Magic $ld$ symbol processing can change the install name of
   a dylib based on the target platform_version. Here, two
   truly distinct dylibs can have the same install name.

So we need this code to deal with (3) anyways. Might as well use
it for 1 and 2, at least for now :)

With this (and D103430), clang-format links in the same dylibs
when linked with lld and ld64.

Differential Revision: https://reviews.llvm.org/D103488
The file was modifiedlld/MachO/Writer.cpp
The file was addedlld/test/MachO/dylink-ordinal.s
Commit 6134231a78bf667a2f4357a415fac11e2732405a by clattner
[CSE] Ask DominanceInfo about "hasSSADominance" instead of reconstructing it.

I backed this off to make the previous patch easier to wrangle, but now
this is an efficient query and it is better to not replace it in CSE.

Differential Revision: https://reviews.llvm.org/D103494
The file was modifiedmlir/lib/Transforms/CSE.cpp