1. [clangd] Include macro expansions in documentSymbol hierarchy (details)
  2. [RISCV] Support fixed-length INSERT_VECTOR_ELT (details)
  3. Revert "Revert "[clangd] Use ML Code completion ranking as default."" (details)
  4. [TableGen] Add IntrNoMerge as intrinsic property (details)
  5. [lld-macho] Change loadReexport to handle the case where a TAPI re-exports to reference documents nested within other TBD. (details)
Commit 91679c95bbedf4f816a456028ebd23ea6c5cc08f by sam.mccall
[clangd] Include macro expansions in documentSymbol hierarchy

Browsing macro-generated symbols is confusing.
On the one hand, it seems very *useful* to be able to see the summary of
symbols that were generated.
On the other hand, some macros spew a lot of confusing symbols into the
namespace and when used repeatedly (ABSL_FLAG) can create a lot of spam
that's hard to navigate.

Design constraints:
- the macro expansion tree need not align with the AST, though it often
   does in practice.
   We address this by defining the nesting based on the *primary*
   location of decls, rather than their ranges.
- DocumentSymbol.children[*].range should nest within DocumentSymbol.range
   (This constraint is not in LSP "breadcrumbs" breaks without it)
   We adjust macro ranges so they cover their "children", rather than
   just the macro expansion
- LSP does not have a "macro expansion" symbolkind, nor does it allow a
   symbol to have no kind. I've arbitrarily picked "null" as this is
   unlikely to conflict with anything useful.

This patch makes all macros and children visible for simplicity+consistency,
though in some cases it may be better to elide the macro node.
We may consider adding heuristics for this in future (e.g. when it expands
to one decl only?) but it doesn't seem clear-cut to me.

Differential Revision:
The file was modifiedclang-tools-extra/clangd/unittests/FindSymbolsTests.cpp (diff)
The file was modifiedclang-tools-extra/clangd/FindSymbols.cpp (diff)
Commit c1695ddf7da604a8bb3ca779f4f318e44d38a35f by fraser
[RISCV] Support fixed-length INSERT_VECTOR_ELT

This patch enables support for lowering INSERT_VECTOR_ELT on
fixed-length vector types. The strategy follows that for scalable vector

This patch also includes a quick fix to prevent the compiler infinitely
looping between lowering BUILD_VECTOR as VECTOR_SHUFFLE and back again.

Reviewed By: craig.topper

Differential Revision:
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-insert.ll (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp (diff)
Commit 890190a61d648755c9213d4a38af294f7dad3de2 by usx
Revert "Revert "[clangd] Use ML Code completion ranking as default.""

The ASAN failure was fixed by

This reverts commit 7f086d74c347750c1da619058eb5b3e79c2fae14.
The file was modifiedclang-tools-extra/clangd/Quality.cpp (diff)
The file was modifiedclang-tools-extra/clangd/unittests/CodeCompleteTests.cpp (diff)
The file was modifiedclang-tools-extra/clangd/CodeComplete.h (diff)
Commit d96b5e606add52157bf04c475049c8e1c5ebbfaa by kparzysz
[TableGen] Add IntrNoMerge as intrinsic property

There is a function attribute 'nomerge' in addition to 'noduplicate'
and 'convergent'. Both 'noduplicate' and 'convergent' have corresponding
intrinsic properties. This patch adds an intrinsic property for the
'nomerge' attribute.

Differential Revision:
The file was addedllvm/test/TableGen/
The file was modifiedllvm/utils/TableGen/CodeGenIntrinsics.h (diff)
The file was modifiedllvm/utils/TableGen/IntrinsicEmitter.cpp (diff)
The file was modifiedllvm/utils/TableGen/CodeGenTarget.cpp (diff)
The file was modifiedllvm/include/llvm/IR/ (diff)
Commit 9a2e2de15f108f943ae50e6183719a4af81104e8 by vyng
[lld-macho] Change loadReexport to handle the case where a TAPI re-exports to reference documents nested within other TBD.

Currently, it was delibrately impleneted to not handle this case, but as it has turnt out, we need this feature.
The concrete use case is
       `System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa` reexports
               /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit , which then rexports

The current implemention uses a global currentTopLevelTapi, which is not reset until it finishes loading the whole tree.
This is a problem because if the top-level is set to Cocoa, then when we get to UIFoundation, it will try to find UIFoundation in the current top level, which is Cocoa and will not find it.

The right thing should be:
- When loading a library from a TBD file, re-exports need to be looked up in the auxiliary documents within the same TBD.
- When loading from an actual dylib, no additional TBD documents need to be examined.
- In no case does a re-export mentioned in one TBD file need to be looked up in a document in an auxiliary document from a different TBD file

Differential Revision:
The file was modifiedlld/test/MachO/Inputs/iPhoneSimulator.sdk/usr/lib/libSystem.tbd (diff)
The file was modifiedllvm/lib/TextAPI/MachO/InterfaceFile.cpp (diff)
The file was modifiedlld/MachO/Driver.h (diff)
The file was addedlld/test/MachO/Inputs/iPhoneSimulator.sdk/usr/lib/libReexportSystem.tbd
The file was addedlld/test/MachO/reexport-nested-lib.s
The file was modifiedlld/MachO/InputFiles.cpp (diff)
The file was modifiedllvm/include/llvm/TextAPI/MachO/InterfaceFile.h (diff)