Changes

Summary

  1. [ORC] Add an ExecutorAddr::toPtr overload for function types. (details)
  2. [SelectionDAGISel] Add back a comment to MergeInputChains handling. NFC (details)
  3. [libcxx] [test] Fix max_size.pass.cpp for other Windows architectures (details)
  4. [libcxxabi] Use the right calling convention for exception destructors on i386 Windows (details)
  5. [libcxx] [test] Extend the UNSUPPORTED lines in strong_order_long_double.verify.cpp for non-x86_64 Windows (details)
  6. [libcxx] [test] Narrow down an XFAIL for clang-cl configurations (details)
  7. [clang][dataflow] Centralize expression skipping logic (details)
  8. [mlir] Fix the names of exported functions (details)
  9. [sanitizer] Correct GetTls for x32 (details)
  10. [ORC] Return ExecutorAddrs rather than JITEvaluatedSymbols from LLJIT::lookup. (details)
  11. [GlobalISel] Re-generate some tests. (details)
  12. Decr return pc mid-stack when picking UnwindPlan row (details)
  13. [mlir:ExecutionEngine] Update use of getAddress now that lookup returns ExecutorAddr (details)
  14. [clang-format] Fix another bug in AlignConsecutiveAssignments (details)
  15. Reimplement `__builtin_dump_struct` in Sema. (details)
  16. [BOLT][DWARF] Add version 5 split dwarf support (details)
  17. [mlir] Add a better error message when failing to parse an attribute (details)
  18. [clang-format][NFC] Add a few regression tests (details)
  19. [flang] Change "unsupported" messages in the runtime to "not yet implemented" (details)
  20. [mlir][sparse] add more zero-preserving unary ops to sparse compiler (details)
Commit 98616cfc02613d98964588fac6494ec7583c495f by Lang Hames
[ORC] Add an ExecutorAddr::toPtr overload for function types.

In the common case of converting an ExecutorAddr to a function pointer type,
this eliminates the need for the '(*)' boilerplate to explicitly specify a
function pointer. E.g.:

auto *F = A.toPtr<int(*)()>();

can now be written as

auto *F = A.toPtr<int()>();
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h
The file was modifiedllvm/unittests/ExecutionEngine/Orc/ExecutorAddressTest.cpp
Commit 5140e0d219be490930810778a6dcc63fbe72eac2 by craig.topper
[SelectionDAGISel] Add back a comment to MergeInputChains handling. NFC

This comment used to exist, but was lost in a refactor over 10 years
ago, but still seems relevant and improves readability.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Commit 448eabd754852b6939ac5c54d8e71b6e3ff9b78a by martin
[libcxx] [test] Fix max_size.pass.cpp for other Windows architectures

All current Windows architectures (i386, x86_64, arm, arm64) get
the full_size() behaviour here. x86_64 (the only one tested in CI
currently) is handled by the first ifdef at the top, but handle
Windows in general on all other architectures later.

Differential Revision: https://reviews.llvm.org/D124989
The file was modifiedlibcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp
Commit aeb4907ed658ad5538f8cd569facae5beaab2940 by martin
[libcxxabi] Use the right calling convention for exception destructors on i386 Windows

On Windows on i386, C++ member functions use a different calling
convention (`__thiscall`) than the default one for regular functions
(`__cdecl`). (On Windows on architectures other than i386, both calling
convention attributes are no-ops.)

This matches how libstdc++ declares these types.

This fixes the std/thread/futures/futures.{shared,unique}_future/dtor.pass.cpp
tests on i386 mingw.

Differential Revision: https://reviews.llvm.org/D124990
The file was modifiedlibcxxabi/include/cxxabi.h
The file was modifiedlibcxxabi/src/cxa_exception.cpp
The file was modifiedlibcxxabi/src/cxa_exception.h
The file was modifiedlibcxxabi/include/__cxxabi_config.h
Commit 9dfbccf052baa2b5f5658052a1ee3c96ff644b99 by martin
[libcxx] [test] Extend the UNSUPPORTED lines in strong_order_long_double.verify.cpp for non-x86_64 Windows

Differential Revision: https://reviews.llvm.org/D124992
The file was modifiedlibcxx/test/std/language.support/cmp/cmp.alg/strong_order_long_double.verify.cpp
Commit 07c96a3113b23df1a7b176f3c68ac6db27bc332a by martin
[libcxx] [test] Narrow down an XFAIL for clang-cl configurations

This test only fails on x86_64 clang-cl, not for i386.

(The root cause is still not explored, thus the FIXME is still
relevant.)

Differential Revision: https://reviews.llvm.org/D124994
The file was modifiedlibcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp
Commit 45643cfcc12ea6152fb9516ed24f5adf7469eb4c by li.zhe.hua
[clang][dataflow] Centralize expression skipping logic

A follow-up to 62b2a47 to centralize the logic that skips expressions
that the CFG does not emit. This allows client code to avoid
sprinkling this logic everywhere.

Add redirects in the transfer function to similarly skip such
expressions by forwarding the visit to the sub-expression.

Differential Revision: https://reviews.llvm.org/D124965
The file was modifiedclang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
The file was modifiedclang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h
The file was modifiedclang/lib/Analysis/FlowSensitive/DataflowAnalysisContext.cpp
The file was modifiedclang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp
The file was modifiedclang/include/clang/Analysis/FlowSensitive/Transfer.h
The file was modifiedclang/include/clang/Analysis/FlowSensitive/DataflowAnalysisContext.h
The file was modifiedclang/lib/Analysis/FlowSensitive/Transfer.cpp
Commit d4555698f89af373f43dcb4aa1587231496bcd31 by stilis
[mlir] Fix the names of exported functions

The names of the functions that are supposed to be exported do not match the implementations. This is due in part to https://github.com/llvm/llvm-project/commit/cac7aabbd8236bef2909bfc0dbba17644f7aaade.

This change makes the implementations and declarations match and adds a couple missing declarations.

The new names follow the pattern of the existing `verify` functions where the prefix is maintained as `_mlir_ciface_` but the suffix follows the new naming convention.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D124891
The file was modifiedmlir/test/Integration/GPU/ROCM/vecadd.mlir
The file was modifiedmlir/test/Integration/GPU/CUDA/async.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/rank-reducing-subview.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-subtensor-insert-multiple-uses.mlir
The file was modifiedmlir/test/Integration/Dialect/Standard/CPU/test_subview.mlir
The file was modifiedmlir/test/Integration/GPU/CUDA/all-reduce-region.mlir
The file was modifiedmlir/test/Integration/GPU/CUDA/all-reduce-or.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/subf.mlir
The file was modifiedmlir/lib/ExecutionEngine/RunnerUtils.cpp
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-expand-tensor.mlir
The file was modifiedmlir/test/mlir-cpu-runner/global-memref.mlir
The file was modifiedmlir/test/Integration/GPU/CUDA/multiple-all-reduce.mlir
The file was modifiedmlir/test/mlir-spirv-cpu-runner/double.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/time.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/addi.mlir
The file was modifiedmlir/test/Integration/GPU/CUDA/TensorCore/wmma-matmul-f32.mlir
The file was modifiedmlir/test/Integration/GPU/CUDA/all-reduce-min.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-padtensor.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-one-shot-bufferize.mlir
The file was modifiedmlir/test/mlir-cpu-runner/copy.mlir
The file was modifiedmlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-1d.mlir
The file was modifiedmlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-2d.mlir
The file was modifiedmlir/test/mlir-cpu-runner/utils.mlir
The file was modifiedmlir/lib/ExecutionEngine/CRunnerUtils.cpp
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir
The file was modifiedmlir/test/Integration/GPU/CUDA/shuffle.mlir
The file was modifiedmlir/test/mlir-opt/async.mlir
The file was modifiedmlir/test/Integration/GPU/CUDA/all-reduce-xor.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-subtensor-insert.mlir
The file was modifiedmlir/test/Integration/GPU/CUDA/all-reduce-op.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-elementwise.mlir
The file was modifiedmlir/test/python/execution_engine.py
The file was modifiedmlir/test/mlir-cpu-runner/async-value.mlir
The file was modifiedmlir/test/Integration/GPU/CUDA/all-reduce-and.mlir
The file was modifiedmlir/test/Integration/GPU/ROCM/gpu-to-hsaco.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-collapse-tensor.mlir
The file was modifiedmlir/include/mlir/ExecutionEngine/RunnerUtils.h
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir
The file was modifiedmlir/test/Integration/GPU/CUDA/TensorCore/wmma-matmul-f16.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir
The file was modifiedmlir/test/Integration/GPU/ROCM/vector-transferops.mlir
The file was modifiedmlir/test/Dialect/Bufferization/Transforms/one-shot-module-bufferize.mlir
The file was modifiedmlir/test/mlir-cpu-runner/async.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir
The file was modifiedmlir/test/Integration/GPU/CUDA/all-reduce-max.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/addi8.mlir
The file was modifiedmlir/test/mlir-cpu-runner/memref-reinterpret-cast.mlir
The file was modifiedmlir/test/Integration/GPU/CUDA/two-modules.mlir
The file was modifiedmlir/test/Integration/Dialect/Async/CPU/microbench-scf-async-parallel-for.mlir
The file was modifiedmlir/test/mlir-cpu-runner/unranked-memref.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/mulf.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-vector-distribute.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-transfer-to-loops.mlir
The file was modifiedmlir/test/mlir-cpu-runner/sgemm-naive-codegen.mlir
The file was modifiedmlir/test/Integration/Dialect/Async/CPU/microbench-linalg-async-parallel-for.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-tensor-e2e.mlir
The file was modifiedmlir/test/Integration/GPU/CUDA/gpu-to-cubin.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/matmul-vs-matvec.mlir
The file was modifiedmlir/test/mlir-cpu-runner/memref-reshape.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/addf.mlir
The file was modifiedmlir/test/mlir-spirv-cpu-runner/simple_add.mlir
The file was modifiedmlir/test/Dialect/Linalg/library-calls.mlir
The file was modifiedmlir/test/Integration/GPU/ROCM/two-modules.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir
The file was modifiedmlir/test/mlir-cpu-runner/print.mlir
Commit b226894d475b4758ed1da0c23e664b027c89634b by hjl.tools
[sanitizer] Correct GetTls for x32

Since x32 pointer size is 4 bytes, the self pointer offset in TCB:

struct
{
  void *tcb;
  dtv_t *dtv;
  void *self;
  ...

should be 8, not 16.

Fixes https://github.com/llvm/llvm-project/issues/55288

Differential Revision: https://reviews.llvm.org/D125025
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
Commit 16dcbb53dc7968a3752661aac731172ebe0faf64 by Lang Hames
[ORC] Return ExecutorAddrs rather than JITEvaluatedSymbols from LLJIT::lookup.

Clients don't care about linkage, and ExecutorAddr is much more ergonomic.
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/LLJITWithRemoteDebugging.cpp
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithThinLTOSummaries/LLJITWithThinLTOSummaries.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
The file was modifiedllvm/examples/OrcV2Examples/LLJITRemovableCode/LLJITRemovableCode.cpp
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithCustomObjectLinkingLayer/LLJITWithCustomObjectLinkingLayer.cpp
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin/LLJITWithObjectLinkingLayerPlugin.cpp
The file was modifiedllvm/examples/OrcV2Examples/LLJITDumpObjects/LLJITDumpObjects.cpp
The file was modifiedllvm/examples/HowToUseLLJIT/HowToUseLLJIT.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithLazyReexports/LLJITWithLazyReexports.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/LLJIT.cpp
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithGDBRegistrationListener/LLJITWithGDBRegistrationListener.cpp
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithObjectCache/LLJITWithObjectCache.cpp
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithOptimizingIRTransform/LLJITWithOptimizingIRTransform.cpp
The file was modifiedllvm/tools/lli/lli.cpp
The file was modifiedclang/lib/Interpreter/IncrementalExecutor.cpp
The file was modifiedllvm/examples/OrcV2Examples/LLJITWithExecutorProcessControl/LLJITWithExecutorProcessControl.cpp
Commit 586802eb72907f2380e319a08fbe5728807544e3 by Amara Emerson
[GlobalISel] Re-generate some tests.
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-undef.mir
Commit b6388e4a0050fa248f774f5dacfa3e566e8daef1 by Jason Molenda
Decr return pc mid-stack when picking UnwindPlan row

When picking the UnwindPlan row to use to backtrace,
off of the zeroth frame, decrement the return pc so
we're in the address range of the call instruction.
If this is a noretrun function call, the instruction
at the "return address" is likely an entirely different
basic block with possibly very different unwind rules,
and this can cause the backtrace to be incorrect.

Differential Revision: https://reviews.llvm.org/D124957
rdar://84651805
The file was modifiedlldb/include/lldb/Target/RegisterContextUnwind.h
The file was modifiedlldb/source/Target/RegisterContextUnwind.cpp
Commit 8bb5b657fec6dc604eeea49e1f26eff4c14084ba by riddleriver
[mlir:ExecutionEngine] Update use of getAddress now that lookup returns ExecutorAddr

This was changed in 16dcbb53dc7968a3752661aac731172ebe0faf64
The file was modifiedmlir/lib/ExecutionEngine/ExecutionEngine.cpp
Commit 8b626a2caa672a174829105ff7749d8d9a080f2a by owenca
[clang-format] Fix another bug in AlignConsecutiveAssignments

The ShouldShiftBeAdded lambda checks if extra space should be
added before the wrapped part of a braced list. If the first
element of the list is wrapped, no extra space should be added.

Fixes #55161.

Differential Revision: https://reviews.llvm.org/D124956
The file was modifiedclang/lib/Format/WhitespaceManager.cpp
The file was modifiedclang/unittests/Format/FormatTest.cpp
Commit c4f95ef86a224fe730d2219aab90e88a0e7b03d2 by richard
Reimplement `__builtin_dump_struct` in Sema.

Compared to the old implementation:

* In C++, we only recurse into aggregate classes.
* Unnamed bit-fields are not printed.
* Constant evaluation is supported.
* Proper conversion is done when passing arguments through `...`.
* Additional arguments are supported and are injected prior to the
  format string; this directly supports use with `fprintf`, for example.
* An arbitrary callable can be passed rather than only a function
  pointer. In particular, in C++, a function template or overload set is
  acceptable.
* All text generated by Clang is printed via `%s` rather than directly;
  this avoids issues where Clang's pretty-printing output might itself
  contain a `%` character.
* Fields of types that we don't know how to print are printed with a
  `"*%p"` format and passed by address to the print function.
* No return value is produced.

Reviewed By: aaron.ballman, erichkeane, yihanaa

Differential Revision: https://reviews.llvm.org/D124221
The file was modifiedclang/docs/LanguageExtensions.rst
The file was modifiedclang/lib/Sema/SemaChecking.cpp
The file was addedclang/test/CodeGen/builtin-dump-struct.c
The file was modifiedclang/lib/Sema/SemaTemplateInstantiate.cpp
The file was modifiedclang/lib/Frontend/FrontendActions.cpp
The file was addedclang/test/SemaCXX/builtin-dump-struct.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was addedclang/test/CodeGenCXX/builtin-dump-struct.cpp
The file was removedclang/test/CodeGen/dump-struct-builtin.c
The file was modifiedclang/test/Sema/builtin-dump-struct.c
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedclang/docs/ReleaseNotes.rst
The file was modifiedclang/include/clang/Basic/Builtins.def
Commit ba1ac98c62e847551bd7ed7d48d811228f7f4619 by ayermolo
[BOLT][DWARF] Add version 5 split dwarf support

Added support for DWARF5 Split Dwarf.

Reviewed By: maksfb

Differential Revision: https://reviews.llvm.org/D122988
The file was addedbolt/test/X86/dwarf4-df-dualcu-loclist.test
The file was addedbolt/test/X86/Inputs/dwarf5-df-dualcu-helper.ll
The file was modifiedbolt/test/X86/debug-fission-single.s
The file was addedbolt/test/X86/Inputs/dwarf5-df-dualcu-loclist-helper.ll
The file was addedbolt/test/X86/Inputs/dwarf4-df-dualcu-loclist-helper.ll
The file was addedbolt/test/X86/Inputs/dwarf5-df-dualcu-loclist-main.ll
The file was addedbolt/test/X86/Inputs/dwarf5-df-mono-helper.ll
The file was modifiedbolt/include/bolt/Rewrite/DWARFRewriter.h
The file was addedbolt/test/X86/Inputs/dwarf4-df-dualcu-loclist-main.ll
The file was modifiedbolt/lib/Core/BinaryContext.cpp
The file was addedbolt/test/X86/Inputs/dwarf5-df-mono-main.ll
The file was addedbolt/test/X86/dwarf5-df-dualcu.test
The file was modifiedbolt/include/bolt/Core/DebugData.h
The file was addedbolt/test/X86/Inputs/dwarf5-df-dualcu-main.ll
The file was addedbolt/test/X86/dwarf5-df-dualcu-loclist.test
The file was modifiedbolt/lib/Rewrite/DWARFRewriter.cpp
The file was addedbolt/test/X86/dwarf5-df-mono-dualcu.test
The file was addedbolt/test/X86/Inputs/dwarf4-df-dualcu-helper.ll
The file was modifiedbolt/lib/Core/DebugData.cpp
The file was addedbolt/test/X86/Inputs/dwarf4-df-dualcu-main.ll
The file was addedbolt/test/X86/dwarf4-df-dualcu.test
The file was addedbolt/test/X86/dwarf5-locaddrx.test
Commit 6609c1cc5997baa75c45283fd559897334e5d1a2 by riddleriver
[mlir] Add a better error message when failing to parse an attribute

The fallback attribute parse path is parsing a Type attribute, but this results
in a really unintuitive error message: `expected non-function type`, which
doesn't really hint at tall that we were trying to parse an attribute. This
commit fixes this by trying to optionally parse a type, and on failure
emitting an error that we were expecting an attribute.

Differential Revision: https://reviews.llvm.org/D124870
The file was modifiedmlir/test/Dialect/SPIRV/IR/memory-ops.mlir
The file was modifiedmlir/test/IR/invalid.mlir
The file was modifiedflang/test/Fir/invalid-types.fir
The file was modifiedmlir/test/mlir-tblgen/attr-or-type-format.mlir
The file was modifiedmlir/lib/Parser/AttributeParser.cpp
The file was modifiedmlir/test/Dialect/SPIRV/IR/composite-ops.mlir
The file was modifiedmlir/test/IR/invalid-locations.mlir
Commit e7aed737eb2d8fb2150f38e48d1c3e0108931999 by owenca
[clang-format][NFC] Add a few regression tests
The file was modifiedclang/unittests/Format/FormatTest.cpp
Commit ebe24a2a3116a5668c3fff27524d485e6956072e by psteinfeld
[flang] Change "unsupported" messages in the runtime to "not yet implemented"

If a programmer is able to compile and link a program that contains types that
are not yet supported by the runtime, it must be because they're not yet
implemented.

This change will make it easier to find unimplemented code in tests.

Differential Revision: https://reviews.llvm.org/D125046
The file was modifiedflang/runtime/tools.h
Commit 952fa3018e7391b5ddc2f54ba5bd048f0d5a47f1 by ajcbik
[mlir][sparse] add more zero-preserving unary ops to sparse compiler

Although we now have semi-rings to deal with arbitrary ops,
it is still good to convey zero-preserving semantics of
ops to the sparse compiler.

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D125043
The file was modifiedmlir/lib/Dialect/SparseTensor/Utils/Merger.cpp
The file was modifiedmlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
The file was modifiedmlir/test/Dialect/SparseTensor/sparse_fp_ops.mlir