UnstableChanges

Summary

  1. Fix a typo in an error message. (details)
  2. [DWARFYAML][unittest] Refactor parseDWARFYAML(). (details)
  3. [ORC] Modify LazyCallThroughManager to support asynchronous resolution. (details)
  4. [libc++] Fix test failures in C++14 mode (details)
  5. [OpenMP] Make complex soft-float functions on the GPU weak definitions (details)
  6. Increase DIAG_SIZE_AST as we have hit it. (details)
  7. [X86] Remove unnecessary union from getHostCPUFeatures. NFC (details)
  8. [StackSafety,NFC] Update documentation (details)
  9. [PowerPC] Only make copies of registers on stack in variadic function when va_start is called (details)
  10. [clangd] Fix error handling in config.yaml parsing. (details)
  11. Fix return status of AtomicExpandPass (details)
  12. [MC] Simplify the logic of applying fixup for fragments, NFCI (details)
  13. [CodeGen] Matching promoted type for 16-bit integer bitcasts from fp16 operand (details)
  14. [PredicateInfo] Add additional RenamedOp field to PB. (details)
  15. [clangd] Enable async preambles by default (details)
  16. [llvm-objdump] Display locations of variables alongside disassembly (details)
  17. Correctly update return status for MVEGatherScatterLowering (details)
  18. [mlir] Add additional Canonicalization of shape.cstr_broadcastable. (details)
  19. [yaml][clang-tidy] Fix multiline YAML serialization (details)
  20. VersionPrinter - use const auto& iterator in for-range-loop. (details)
  21. Fix MSVC "not all control paths return a value" warning. NFC. (details)
  22. ConstantFoldScalarCall3 - use const APInt& returned by getValue() (details)
  23. [Coroutines] Refactor sinkLifetimeStartMarkers (details)
  24. [change-namespace][NFC] Clean up joinNamespaces (details)
  25. DebugCounterList::printOptionInfo - use const auto& iterator in for-range-loop. (details)
  26. [llvm-readelf] - Stop using 'unwrapOrError()' in 'ELFDumper<ELFT>::getSymbolVersion'. (details)
  27. [SVE] Disable some BUILD_VECTOR related code generator features. (details)
  28. [SVE] Scalarize fixed length masked loads and stores. (details)
  29. [DWARFYAML] Use override instead of virtual for better safety. (details)
  30. [clangd] Implement path and URI translation for remote index (details)
Commit 371c94fca039bb85298756305758a56af129a1ce by echristo
Fix a typo in an error message.
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
Commit 683a1bb253ef47ece27aad93812f22e8c51260fa by Xing
[DWARFYAML][unittest] Refactor parseDWARFYAML().

In this change, `parseDWARFYAML()` is refactored to be able to parse
YAML decription into different data structures. We don't have to craft
the whole DWARF structure for a small test in the future.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D83220
The file was modifiedllvm/unittests/ObjectYAML/DWARFYAMLTest.cpp
Commit 670915094462d831e3733e5b01a76471b8cf6dd8 by Lang Hames
[ORC] Modify LazyCallThroughManager to support asynchronous resolution.

Asynchronous resolution is a better fit for handling reentry over
IPC/RPC where we want to avoid blocking a communication handler/thread.
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/LazyReexports.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/LazyReexports.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h
Commit 305b500eaf8c3b6a319e4571b4279a4694645d0d by Louis Dionne
[libc++] Fix test failures in C++14 mode
The file was modifiedlibcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_duration.pass.cpp
The file was modifiedlibcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_time_point.pass.cpp
Commit e3e47e80355422df2e730cf97a0c80bb6de3915e by johannes
[OpenMP] Make complex soft-float functions on the GPU weak definitions

To avoid linkage errors we have to ensure the linkage allows multiple
definitions of these compiler inserted functions. Since they are on the
cold path of complex computations, we want to avoid `inline`. Instead,
we opt for `weak` and `noinline` for now.
The file was modifiedclang/lib/Headers/__clang_cuda_complex_builtins.h
The file was modifiedclang/test/Headers/nvptx_device_math_complex.c
The file was modifiedclang/test/Headers/nvptx_device_math_complex.cpp
Commit f9888462cc76fb486161709d88522bd419a89504 by douglas.yung
Increase DIAG_SIZE_AST as we have hit it.
The file was modifiedclang/include/clang/Basic/DiagnosticIDs.h
Commit c96877ff62253aeeaba4ea165861045263d25207 by craig.topper
[X86] Remove unnecessary union from getHostCPUFeatures. NFC

This seems to be leftover copied from an older implementation
of getHostCPUName where we needed this to check the name of
CPU vendor. We don't check the CPU vendor at all in
getHostCPUFeatures so this union and the variable are unneeded.
The file was modifiedllvm/lib/Support/Host.cpp
Commit e38727a0bbbf2a0ee8f29458163a56f3c821f010 by Vitaly Buka
[StackSafety,NFC] Update documentation

It's follow up for D80908

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D82941
The file was modifiedllvm/docs/LangRef.rst
The file was modifiedllvm/include/llvm/Analysis/StackSafetyAnalysis.h
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp
The file was modifiedllvm/include/llvm/IR/ModuleSummaryIndex.h
Commit e2b93185b84bd88264377f785465933a89faa4f8 by lkail
[PowerPC] Only make copies of registers on stack in variadic function when va_start is called

On PPC64, for a variadic function, if va_start is not called, it won't
access any variadic argument on stack, thus we can save stores of
registers used to pass arguments.

Differential Revision: https://reviews.llvm.org/D82361
The file was modifiedllvm/lib/Target/PowerPC/PPCISelLowering.cpp
The file was modifiedllvm/test/CodeGen/PowerPC/ppc64-varargs.ll
The file was modifiedllvm/test/CodeGen/PowerPC/legalize-vaarg.ll
Commit f36518637d7dfe5f8e619db1bd65dc90c92b5afa by sam.mccall
[clangd] Fix error handling in config.yaml parsing.

Summary:
A few things were broken:
- use of Document::parseBlockNode() is incorrect and prevents moving to the
   next doc in error cases. Use getRoot() instead.
- bailing out in the middle of iterating over a list/dict isn't allowed,
   unless you are going to throw away the parser: the next skip() asserts.
   Always consume all items.
- There were two concepts of fatal errors: error-diagnostics and drop-fragment.
   (The latter is the "return false" case in the parser). They didn't coincide.
   Now, parser errors and explicitly emitted error diagnostics are fatal.

Fixes https://github.com/clangd/clangd/issues/452

Reviewers: hokein

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D83436
The file was modifiedclang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp
The file was modifiedclang-tools-extra/clangd/ConfigYAML.cpp
Commit a60c31fd6229d2b2e578fa7e192e98303e69223c by sguelton
Fix return status of AtomicExpandPass

Correctly reflect change in the return status.

Differential Revision: https://reviews.llvm.org/D83457
The file was modifiedllvm/lib/CodeGen/AtomicExpandPass.cpp
Commit e59e39b7c4092ead733d25e7801429fd9dab7007 by shengchen.kan
[MC] Simplify the logic of applying fixup for fragments, NFCI

Replace mutiple `if else`  clauses with a `switch` clause and remove redundant checks. Before this patch, we need to add a statement like `if(!isa<MCxxxFragment>(Frag)) `  here each time we add a new kind of `MCEncodedFragment` even if it has no fixups. After this patch, we don't need to do that.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D83366
The file was modifiedllvm/lib/MC/MCAssembler.cpp
Commit fc39a9ca0ef4f7b07c485e0d3c61ec0776f7a38c by lucas.prates
[CodeGen] Matching promoted type for 16-bit integer bitcasts from fp16 operand

Summary:
When legalizing a biscast operation from an fp16 operand to an i16 on a
target that requires both input and output types to be promoted to
32-bits, an assertion can fail when building the new node due to a
mismatch between the the operation's result size and the type specified to
the node.

This patches fix the issue by making sure the bit width of the types
match for the FP_TO_FP16 node, covering the difference with an extra
ANYEXTEND operation.

Reviewers: ostannard, efriedma, pirama, jmolloy, plotfi

Reviewed By: efriedma

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82552
The file was addedllvm/test/CodeGen/ARM/arm-half-promote.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit b805e944773e119461903e5140389072c02796bf by flo
[PredicateInfo] Add additional RenamedOp field to PB.

OriginalOp of a predicate always refers to the original IR
value that was renamed. So for nested predicates of the same value, it
will always refer to the original IR value.

For the use in SCCP however, we need to find the renamed value that is
currently used in the condition associated with the predicate. This
patch adds a new RenamedOp field to do exactly that.

NewGVN currently relies on the existing behavior to merge instruction
metadata. A test case to check for exactly that has been added in
195fa4bfae10.

Reviewers: efriedma, davide, nikic

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D78133
The file was modifiedllvm/lib/Transforms/Utils/PredicateInfo.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/PredicateInfo.h
Commit 1c7c5019a7adfb16e0449ffb1d0e10631998d854 by kadircet
[clangd] Enable async preambles by default

Summary:
We've been testing this internally for a couple weeks now and it seems
to be stable enough. Let's flip the flag before branch cut to increase testing
coverage and have enough time to revert if need be.

Subscribers: ilya-biryukov, javed.absar, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D83290
The file was modifiedclang-tools-extra/clangd/TUScheduler.h
The file was modifiedclang-tools-extra/clangd/ClangdServer.h
Commit dc4a6f5db4f0178bae43ef615cc8902c759d6195 by oliver.stannard
[llvm-objdump] Display locations of variables alongside disassembly

This adds the --debug-vars option to llvm-objdump, which prints
locations (registers/memory) of source-level variables alongside the
disassembly based on DWARF info. A vertical line is printed for each
live-range, with a label at the top giving the variable name and
location, and the position and length of the line indicating the program
counter range in which it is valid.

Differential revision: https://reviews.llvm.org/D70720
The file was addedllvm/test/tools/llvm-objdump/ARM/Inputs/debug.c
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
The file was addedllvm/test/tools/llvm-objdump/ARM/debug-vars-dwarf5-sections.s
The file was addedllvm/test/tools/llvm-objdump/ARM/debug-vars-dwarf5.s
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
The file was addedllvm/test/tools/llvm-objdump/ARM/debug-vars-wide-chars.s
The file was addedllvm/test/tools/llvm-objdump/ARM/debug-vars-dwarf4-sections.s
The file was addedllvm/test/tools/llvm-objdump/ARM/debug-vars-dwarf4.s
The file was addedllvm/test/tools/llvm-objdump/PowerPC/debug-vars.s
The file was addedllvm/test/tools/llvm-objdump/ARM/Inputs/wide-char.c
The file was modifiedllvm/docs/CommandGuide/llvm-objdump.rst
The file was modifiedllvm/tools/llvm-objdump/llvm-objdump.cpp
Commit e4ec6d0afe14ca4ba6cebd35c7f46f3ce0859ecf by sguelton
Correctly update return status for MVEGatherScatterLowering

`Changed` should reflect all possible changes.

Differential Revision: https://reviews.llvm.org/D83459
The file was modifiedllvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
Commit 2ef71cb7fdb76acd2dc69584d05dacd041a7a522 by tpopp
[mlir] Add additional Canonicalization of shape.cstr_broadcastable.

Summary:
Added canonicalization and folding was:
- Folding when either input is an attribute indicating a scalar input
which can always be broadcasted.
- Canonicalization where it can be determined that either input shape is
a scalar.
- Canonicalization where the partially specified input shapes can be
proven to be broadcastable always.

Differential Revision: https://reviews.llvm.org/D83194
The file was modifiedmlir/lib/Dialect/Shape/IR/Shape.cpp
The file was modifiedmlir/include/mlir/Dialect/Traits.h
The file was modifiedmlir/lib/Dialect/Traits.cpp
The file was modifiedmlir/test/Dialect/Shape/canonicalize.mlir
Commit 9e7fddbd36f567217255c1df1cb816b79f0250af by dmitry.polukhin
[yaml][clang-tidy] Fix multiline YAML serialization

Summary:
New line duplication logic introduced in https://reviews.llvm.org/D63482
has two issues: (1) there is no logic that removes duplicate newlines
when clang-apply-replacment reads YAML and (2) in general such logic
should be applied to all strings and should happen on string
serialization level instead in YAML parser.

This diff changes multiline strings quotation from single quote `'` to
double `"`. It solves problems with internal newlines because now they are
escaped. Also double quotation solves the problem with leading whitespace after
newline. In case of single quotation YAML parsers should remove leading
whitespace according to specification. In case of double quotation these
leading are internal space and they are preserved. There is no way to
instruct YAML parsers to preserve leading whitespaces after newline so
double quotation is the only viable option that solves all problems at
once.

Test Plan: check-all

Reviewers: gribozavr, mgehre, yvvan

Subscribers: xazax.hun, hiraditya, cfe-commits, llvm-commits

Tags: #clang-tools-extra, #clang, #llvm

Differential Revision: https://reviews.llvm.org/D80301
The file was modifiedclang/include/clang/Tooling/ReplacementsYaml.h
The file was modifiedclang/unittests/Tooling/ReplacementsYamlTest.cpp
The file was modifiedllvm/test/Transforms/LowerMatrixIntrinsics/remarks-shared-subtrees.ll
The file was modifiedllvm/include/llvm/Support/YAMLTraits.h
The file was modifiedllvm/unittests/Support/YAMLIOTest.cpp
The file was modifiedllvm/lib/Support/YAMLTraits.cpp
Commit dbed9d5ce7f5ab870b3ff20a14ee6c366c803fdb by llvm-dev
VersionPrinter - use const auto& iterator in for-range-loop.

Avoids unnecessary copies and silences clang tidy warning.
The file was modifiedllvm/lib/Support/CommandLine.cpp
Commit 397c68202a990c80a71de2816cee413cd5b5865e by llvm-dev
Fix MSVC "not all control paths return a value" warning. NFC.
The file was modifiedclang/lib/Tooling/Syntax/BuildTree.cpp
Commit 03fe47a29c95dbda5ecd548e35627bb16f7dfc6d by llvm-dev
ConstantFoldScalarCall3 - use const APInt& returned by getValue()

Avoids unnecessary APInt copies and silences clang tidy warning.
The file was modifiedllvm/lib/Analysis/ConstantFolding.cpp
Commit f0bfad2ed9b4a0eec68b71c7df2ee588806788c2 by JunMa
[Coroutines] Refactor sinkLifetimeStartMarkers

Differential Revision: https://reviews.llvm.org/D83379
The file was modifiedllvm/lib/Transforms/Coroutines/CoroSplit.cpp
The file was addedllvm/test/Transforms/Coroutines/coro-split-sink-lifetime-01.ll
The file was removedllvm/test/Transforms/Coroutines/coro-split-sink-lifetime.ll
The file was modifiedllvm/lib/Transforms/Coroutines/CoroFrame.cpp
The file was addedllvm/test/Transforms/Coroutines/coro-split-sink-lifetime-02.ll
Commit 6a3b10e294feceb94064f32450de5c068a13dd03 by n.james93
[change-namespace][NFC] Clean up joinNamespaces
The file was modifiedclang-tools-extra/clang-change-namespace/ChangeNamespace.cpp
Commit 58a85717cce5166b0952aee4d13375dda94f7497 by llvm-dev
DebugCounterList::printOptionInfo - use const auto& iterator in for-range-loop.

Avoids unnecessary copies and silences clang tidy warning.
The file was modifiedllvm/lib/Support/DebugCounter.cpp
Commit 54bdde1dc0cde8176ef5616c82ee793218173cab by grimar
[llvm-readelf] - Stop using 'unwrapOrError()' in 'ELFDumper<ELFT>::getSymbolVersion'.

This allows to propagate an error and report a warning properly.

Differential revision: https://reviews.llvm.org/D83393
The file was modifiedllvm/tools/llvm-readobj/ELFDumper.cpp
The file was modifiedllvm/test/tools/llvm-readobj/ELF/versym-invalid.test
Commit 614fb09645c8710f106dedb5f244f75ef97a1acb by paul.walker
[SVE] Disable some BUILD_VECTOR related code generator features.

Fixed length vector code generation for SVE does not yet custom
lower BUILD_VECTOR and instead relies on expansion.  At the same
time custom lowering for VECTOR_SHUFFLE is also not available so
this patch updates isShuffleMaskLegal to reject vector types that
require SVE.

Related to this it also prevents the merging of stores after
legalisation because this only works when BUILD_VECTOR is either
legal or can be elminated.  When this is not the case the code
generator enters an infinite legalisation loop.

Differential Revision: https://reviews.llvm.org/D83408
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.h
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-shuffles.ll
Commit 6b403319f86f55f1d6e16bde58d792d696e9fa8f by paul.walker
[SVE] Scalarize fixed length masked loads and stores.

When adding support for scalable vector masked loads and stores we
accidently opened up likewise for fixed length vectors. This patch
restricts support to scalable vectors only, thus ensuring fixed
length vectors are treated the same regardless of SVE support.

Differential Revision: https://reviews.llvm.org/D83341
The file was addedllvm/test/Transforms/ScalarizeMaskedMemIntrin/AArch64/expand-masked-load.ll
The file was addedllvm/test/Transforms/ScalarizeMaskedMemIntrin/AArch64/expand-masked-store.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
Commit 47c4ce41a16412efe49da1715be3144861cbf50a by Xing
[DWARFYAML] Use override instead of virtual for better safety.

Functions in DWARFYML::FixupVisitor are declared as
virtual functions in its base class DWARFYAML::Visitor.
We should use the mordern "override" keyword instead
of "virtual" for virtual functions in subclasses for
better safety.

Besides, the visibility is changed from private to
protected to make it consistent with
DWARFYAML::FixupVisitor class and DWARFYAML::Visitor
class.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D83452
The file was modifiedllvm/lib/ObjectYAML/DWARFEmitter.cpp
Commit 93bb9944cb577f0529636dc5acfba16026740962 by kbobyrev
[clangd] Implement path and URI translation for remote index

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: ormris, ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D82938
The file was modifiedclang-tools-extra/clangd/index/remote/Index.proto
The file was modifiedclang-tools-extra/clangd/index/remote/Client.h
The file was modifiedclang-tools-extra/clangd/index/remote/Client.cpp
The file was modifiedclang-tools-extra/clangd/unittests/remote/MarshallingTests.cpp
The file was modifiedclang-tools-extra/clangd/index/remote/marshalling/Marshalling.h
The file was modifiedclang-tools-extra/clangd/index/remote/unimplemented/UnimplementedClient.cpp
The file was modifiedclang-tools-extra/clangd/index/remote/server/Server.cpp
The file was modifiedclang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
The file was modifiedclang-tools-extra/clangd/index/remote/marshalling/Marshalling.cpp