Changes

Summary

  1. [mlir][Linalg] NFC: Rename FusionOfTensors pass to FusionOfElementwiseOps pass. (details)
  2. [AMDGPU] Reserve AMDGPU ELF e_flags machine 0x45 (details)
  3. [LangRef] Clarify support for multiple metadata attachments with same id (details)
  4. [demangler] Fix demangling of 'half' (details)
  5. [clang-format] Break an unwrapped line at a K&R C parameter decl (details)
  6. [lld/mac] Resolve defined symbols before undefined symbols (details)
  7. [mlir] Add software pipelining transformation for scf.For op (details)
  8. [lld/mac] Add test for --lto-O (details)
  9. [WebAssembly] Deduplicate imports of the same module name, field name, and type (details)
  10. [MLGO] Use binary protobufs for improved training performance. (details)
  11. [WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections (details)
  12. [mlir] Fix bazel build (details)
  13. Revert "[MemCpyOpt] Enable memcpy optimizations unconditionally." (details)
  14. Don't use !eStateRunning when you mean eStateStopped in DestroyImpl. (details)
  15. [lld][WebAssembly] Cleanup duplicate fields in Symbols.h. NFC (details)
  16. [clang] Respect PrintingPolicy::FullyQualifiedName when printing a template-id (details)
  17. [gn build] Port 08b289867b5a (details)
  18. Split `InferShapedTypeOpInterface` to create `ReifyRankedShapedTypeInterface`. (details)
  19. [PowerPC] swdiv_nochk Builtins for XL Compat (details)
  20. [NewPM] Bail out of devirtualization wrapper if the current SCC is invalidated (details)
  21. [NewPM][opt] Add -debug-pass-manager=quiet to not print analysis info (details)
  22. [SCEV] Add a clarifying comment in howManyLessThans (details)
  23. Dyanamic shape support for memref reassociation reshape ops (details)
  24. [ScalarEvolution] Refine computeMaxBECountForLT to be accurate in more cases. (details)
Commit 5994201c8e4c69518a10e143d09973b77886c90f by ravishankarm
[mlir][Linalg] NFC: Rename FusionOfTensors pass to FusionOfElementwiseOps pass.

This makes it more explicit what the scope of this pass is. The name
of this pass predates fusion on tensors using tile + fuse, and hence
the confusion.

Differential Revision: https://reviews.llvm.org/D106132
The file was addedmlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/Passes.td
The file was addedmlir/test/Dialect/Linalg/fusion-elementwise-ops.mlir
The file was modifiedmlir/test/Dialect/Linalg/reshape_fusion.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
The file was removedmlir/lib/Dialect/Linalg/Transforms/FusionOnTensors.cpp
The file was removedmlir/test/Dialect/Linalg/fusion-tensor.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/Passes.h
Commit 51e62e56f7edaab7dddfe48fb709b6d8ca952909 by Tony.Tye
[AMDGPU] Reserve AMDGPU ELF e_flags machine 0x45

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D106249
The file was modifiedllvm/docs/AMDGPUUsage.rst
The file was modifiedllvm/include/llvm/BinaryFormat/ELF.h
Commit 54c8902f02361114f9485f6de907d71623d6a50c by tejohnson
[LangRef] Clarify support for multiple metadata attachments with same id

As discussed on D105251, currently the compiler does not support
multiple metadata attachments on instructions having the same
identifier, whereas it does for global objects. Note this in the
Language Reference manual for clarity.

See D105251 for discussions of history behind this divergence, and the
complexities and possible approaches of adding this support to
instructions in the future.

Differential Revision: https://reviews.llvm.org/D106304
The file was modifiedllvm/docs/LangRef.rst
Commit 87039c048c0cbc3d8cbba86187269b006bf2f373 by stuart.brady
[demangler] Fix demangling of 'half'

Demangle 'Dh' as 'half' (as per GCC), and not 'decimal16' (which doesn't
make sense, as there is no IEEE 754 decimal16 format).

The Itanium C++ ABI specification describes 'Dh' as:
> IEEE 754r half-precision floating point (16 bits)

(https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangling-builtin)

Reviewed By: ldionne, jyknight

Differential Revision: https://reviews.llvm.org/D103833
The file was modifiedllvm/include/llvm/Demangle/ItaniumDemangle.h
The file was modifiedlibcxxabi/src/demangle/ItaniumDemangle.h
Commit 9da70ab3d43c79116f80fc06aa7cf517374ce42c by owenca
[clang-format] Break an unwrapped line at a K&R C parameter decl

Break an unwrapped line before the first parameter declaration in a
K&R C function definition.

This fixes PR51074.

Differential Revision: https://reviews.llvm.org/D106112
The file was modifiedclang/lib/Format/UnwrappedLineParser.cpp
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/UnwrappedLineParser.h
Commit fbb45947b2a77c6295c110c7fbb648adac14d2c9 by thakis
[lld/mac] Resolve defined symbols before undefined symbols

Ports https://reviews.llvm.org/D95985 to the MachO port.
Happens to fix PR51135; see that bug for details.
Also makes lld's behavior match ld64 for the included test case.

Differential Revision: https://reviews.llvm.org/D106293
The file was modifiedlld/MachO/InputFiles.cpp
The file was addedlld/test/MachO/weak-definition-in-main-file.s
The file was modifiedlld/ELF/InputFiles.cpp
Commit f6f88e66cedcebbabfaf7e68344d46835d9edc1d by thomasraoux
[mlir] Add software pipelining transformation for scf.For op

This is the first step to support software pipeline for scf.for loops.
This is only the transformation to create pipelined kernel and
prologue/epilogue.
The scheduling needs to be given by user as  many different algorithm
and heuristic could be applied.
This currently doesn't handle loop arguments, this will be added in a
follow up patch.

Differential Revision: https://reviews.llvm.org/D105868
The file was addedmlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp
The file was modifiedmlir/include/mlir/Dialect/SCF/Transforms.h
The file was modifiedmlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
The file was modifiedmlir/test/lib/Dialect/SCF/TestSCFUtils.cpp
The file was addedmlir/test/Dialect/SCF/loop-pipelining.mlir
Commit 6ef37b640daf3d768435e58333caacc89e115bd0 by thakis
[lld/mac] Add test for --lto-O

This belongs to fe08e9c4871, I (thakis) forgot to `git add` it back then.

Differential Revision: https://reviews.llvm.org/D105223
The file was addedlld/test/MachO/lto-opt-level.ll
Commit 4ae575b9997e0903d1c2ec01a43e3f3f2db5df16 by sbc
[WebAssembly] Deduplicate imports of the same module name, field name, and type

When two symbols import the same thing, only one import should be emitted in the Wasm file.

Fixes https://bugs.llvm.org/show_bug.cgi?id=50938

Reviewed By: sbc100

Differential Revision: https://reviews.llvm.org/D105519
The file was addedlld/test/wasm/duplicate-function-imports.s
The file was addedlld/test/wasm/duplicate-table-imports.s
The file was modifiedlld/wasm/SyntheticSections.h
The file was addedlld/test/wasm/duplicate-global-imports.s
The file was modifiedllvm/include/llvm/BinaryFormat/Wasm.h
The file was modifiedllvm/include/llvm/BinaryFormat/WasmTraits.h
The file was modifiedlld/wasm/SyntheticSections.cpp
Commit 55e2d2060a367a293710f44fd61a03d797d4aade by mtrofin
[MLGO] Use binary protobufs for improved training performance.

It turns out that during training, the time required to parse the
textual protobuf of a training log is about the same as the time it
takes to compile the module generating that log. Using binary protobufs
instead elides that cost almost completely.

Differential Revision: https://reviews.llvm.org/D106157
The file was modifiedllvm/test/Transforms/Inline/ML/bounds-checks-rewards.ll
The file was modifiedllvm/lib/Analysis/CMakeLists.txt
The file was modifiedllvm/lib/Analysis/TFUtils.cpp
The file was modifiedllvm/CMakeLists.txt
The file was modifiedllvm/unittests/Analysis/TFUtilsTest.cpp
The file was modifiedllvm/test/Transforms/Inline/ML/development-training-log.ll
Commit ad1f5457d2d89efa49a722404a5f0b744b7a64d1 by dschuff
[WebAssembly] Generate R_WASM_FUNCTION_OFFSET relocs in debuginfo sections

Debug info sections need R_WASM_FUNCTION_OFFSET_I32 relocs (with FK_Data_4 fixup
kinds) to refer to functions (instead of R_WASM_TABLE_INDEX as is used in data
sections). Usually this is done in a convoluted way, with unnamed temp data
symbols which target the start of the function, in which case
WasmObjectWriter::recordRelocation converts it to use the section symbol
instead. However in some cases the function can actually be undefined; in this
case the dwarf generator uses the function symbol (a named undefined function
symbol) instead. In that case the section-symbol transform doesn't work and we
need to generate the correct reloc type a different way. In this change
WebAssemblyWasmObjectWriter::getRelocType takes the fixup section type into
account to choose the correct reloc type.

Fixes PR50408
Differential Revision: https://reviews.llvm.org/D103557
The file was modifiedllvm/lib/MC/WasmObjectWriter.cpp
The file was modifiedlld/test/wasm/map-file.s
The file was addedllvm/test/MC/WebAssembly/debug-template-param.ll
The file was modifiedllvm/include/llvm/MC/MCWasmObjectWriter.h
The file was removedlld/test/wasm/debuginfo-relocs.s
The file was addedllvm/test/MC/WebAssembly/debuginfo-relocs.s
The file was modifiedllvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp
Commit 73f1d6edc06941f6daf07921cd06ef1919153f33 by thomasraoux
[mlir] Fix bazel build

Differential Revision: https://reviews.llvm.org/D106311
The file was modifiedutils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
The file was modifiedutils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Commit 1a43ee65d1bb584518d9a60b72dce3c927f7fc6e by tra
Revert "[MemCpyOpt] Enable memcpy optimizations unconditionally."

This reverts commit 2c98298a7559dfe4a264ef1adaad0921526768cc which breaks
sanitizers.
The file was modifiedllvm/include/llvm/Transforms/Scalar/MemCpyOptimizer.h
The file was modifiedllvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
Commit 2656af95eb8e67364db7b8dc4a95c3b65c286b2d by jingham
Don't use !eStateRunning when you mean eStateStopped in DestroyImpl.

When we go to destroy the process, we first try to halt it, if
we succeeded and the target stopped, we want to clear out the
thread plans and breakpoints in case we still need to resume to complete
killing the process.  If the target was exited or detached, it's
pointless but harmless to do this.  But if the state is eStateInvalid -
for instance if we tried to interrupt the target to Halt it and that
fails - we don't want to keep trying to interact with the inferior,
so we shouldn't do this work.

This change explicitly checks eStateStopped, and only does the pre-resume
cleanup if we did manage to stop the process.
The file was modifiedlldb/source/Target/Process.cpp
Commit 9b965b37c75d626c01951184088314590e38d299 by sbc
[lld][WebAssembly] Cleanup duplicate fields in Symbols.h. NFC

This avoids duplication and simplifies the code in several places
without increasing the size of the symbol union (at least not
above the assert'd limit of 120 bytes).

Differential Revision: https://reviews.llvm.org/D106026
The file was modifiedlld/wasm/Symbols.h
The file was modifiedlld/wasm/SyntheticSections.cpp
The file was modifiedlld/wasm/Writer.cpp
Commit 08b289867b5adb45033db501461915234e9e1bd4 by zeratul976
[clang] Respect PrintingPolicy::FullyQualifiedName when printing a template-id

Fixes PR50774

Differential Revision: https://reviews.llvm.org/D104619
The file was modifiedclang/unittests/AST/CMakeLists.txt
The file was modifiedclang/lib/AST/TypePrinter.cpp
The file was addedclang/unittests/AST/TypePrinterTest.cpp
Commit 49289bd9435782ec43ff37affdd678572eaf7986 by llvmgnsyncbot
[gn build] Port 08b289867b5a
The file was modifiedllvm/utils/gn/secondary/clang/unittests/AST/BUILD.gn
Commit 9afc065743de8bfb6eaa7ea87a32422ae32943c7 by ravishankarm
Split `InferShapedTypeOpInterface` to create `ReifyRankedShapedTypeInterface`.

The `reifyReturnTypeShapesPerResultDim` method supports shape
inference for rsults that are ranked types. These are used lower in
the codegeneration stack than its counter part `reifyReturnTypeShapes`
which also supports unranked types, and is more suited for use higher
up the compilation stack. To have separation of concerns, this method
is split into its own interface.
See discussion : https://llvm.discourse.group/t/better-layering-for-infershapedtypeopinterface/3823

Differential Revision: https://reviews.llvm.org/D106133
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h
The file was modifiedmlir/test/lib/Dialect/Test/TestDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was modifiedmlir/include/mlir/Dialect/MemRef/Transforms/Passes.td
The file was modifiedutils/bazel/llvm-project-overlay/mlir/BUILD.bazel
The file was modifiedmlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
The file was modifiedmlir/lib/Dialect/MemRef/Transforms/ResolveShapedTypeResultDims.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
The file was modifiedmlir/include/mlir/Interfaces/InferTypeOpInterface.h
The file was modifiedmlir/test/Interfaces/InferShapedTypeOpInterface/resolve-shaped-type-result-dims.mlir
The file was modifiedmlir/lib/Dialect/Tensor/IR/TensorOps.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestOps.td
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
The file was modifiedmlir/include/mlir/Dialect/MemRef/Transforms/Passes.h
The file was modifiedmlir/include/mlir/Interfaces/InferTypeOpInterface.td
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Commit 0268e123bea5bbfe64c625203cfe3b159e85b2dc by kamau.bridgeman
[PowerPC] swdiv_nochk Builtins for XL Compat

This patch is in a series of patches to provide builtins for
compatibility with the XL compiler. This patch adds software divide
builtins with no checking. These builtins are each emitted as a fast
fdiv.

Reviewed By: #powerpc, nemanjai

Differential Revision: https://reviews.llvm.org/D106150
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedclang/include/clang/Basic/BuiltinsPPC.def
The file was addedclang/test/CodeGen/builtins-ppc-xlcompat-swdiv_nochk.c
The file was modifiedclang/lib/Basic/Targets/PPC.cpp
Commit 6cbb35dd3b2f115105d2d9b6da52f2bfc337891c by aeubanks
[NewPM] Bail out of devirtualization wrapper if the current SCC is invalidated

The specific case that triggered this was when inlining a recursive
internal function into itself caused the recursion to go away, allowing
the inliner to mark the function as dead. The inliner marks the SCC as
invalidated but does not provide a new SCC to continue with.

This matches the implementations of ModuleToPostOrderCGSCCPassAdaptor
and CGSCCPassManager.

Fixes PR50363.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D106306
The file was modifiedllvm/lib/Analysis/CGSCCPassManager.cpp
The file was addedllvm/test/Other/devirt-invalidated.ll
Commit 5de114b650d780dddffadff72af2a0374a1258cf by aeubanks
[NewPM][opt] Add -debug-pass-manager=quiet to not print analysis info

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D106307
The file was addedllvm/test/Other/debug-pass-manager.ll
The file was modifiedllvm/tools/opt/NewPMDriver.cpp
Commit 4402d0d4fbdb903bd61238a06cfad29b4dd2da0b by listmail
[SCEV] Add a clarifying comment in howManyLessThans

Wrap semantics are subtle when combined with multiple exits.  This has caused several rounds of confusion during recent reviews, so try to document the subtly distinction between when wrap flags provide <u and <=u facts.
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit 381c3b92997528404a7e39afe1353eaf6b6af924 by ravishankarm
Dyanamic shape support for memref reassociation reshape ops

Only memref with identity layout map is supported for now.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D106180
The file was addedmlir/test/Integration/Dialect/Linalg/CPU/test-collapse-tensor.mlir
The file was modifiedmlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
The file was modifiedmlir/test/Conversion/MemRefToLLVM/memref-to-llvm.mlir
The file was addedmlir/test/Integration/Dialect/Linalg/CPU/test-expand-tensor.mlir
Commit de3ea51be4367367202da5f53ca4e39848d3ccf6 by efriedma
[ScalarEvolution] Refine computeMaxBECountForLT to be accurate in more cases.

Allow arbitrary strides, and make sure we return the correct result when
the backedge-taken count is zero.

Differential Revision: https://reviews.llvm.org/D106197
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/test/Analysis/ScalarEvolution/max-trip-count.ll