SuccessChanges

Summary

  1. [mlir][gpu] Add `gpu.wait` op. (details)
  2. [x86] add cost model test for memcpy; NFC (details)
  3. [CostModel] rearrange basic intrinsic cost implementation (details)
  4. [NFC][Regalloc] Use MCRegister in MachineCopyPropagation (details)
  5. [compiler-rt] Allow override of 'emulator' value from lit_config. (details)
  6. AMDGPU: Remove -mamdgpu-debugger-abi option (details)
  7. LLD/AMDGPU: Infer os abi based on input llvm bitcode (details)
  8. [libc++] Allow passing relative paths to the Apple install script (details)
  9. [mlir][Linalg] Fix TensorConstantOp bufferization in Linalg. (details)
  10. [mlir] Fix sporadic build failures due to missing dependency (details)
  11. [LoopVersioningLICM] Fix noalias metadata emission (details)
  12. [ASAN] Make sure we are only processing lifetime markers with offset 0 to alloca (details)
  13. [analyzer] NFC: Separate PathDiagnosticConsumer options from AnalyzerOptions. (details)
  14. [analyzer] NFC: Move IssueHash to libAnalysis. (details)
  15. [analyzer] NFC: Move path diagnostic consumer implementations to libAnalysis. (details)
  16. [gn build] Port 44b7cf2983b (details)
  17. [gn build] Port b76dc111dd0 (details)
Commit db1cf3d9ab33f56fcaea616baa71c6e4036beffa by csigg
[mlir][gpu] Add `gpu.wait` op.

This combines two separate ops (D88972: `gpu.create_token`, D89043: `gpu.host_wait`) into one.

I do after all like the idea of combining the two ops, because it matches exactly the pattern we are
going to have in the other gpu ops that will implement the AsyncOpInterface (launch_func, copies, alloc):

If the op is async, we return a !gpu.async.token. Otherwise, we synchronize with the host and don't return a token.

The use cases for `gpu.wait async` and `gpu.wait` are further apart than those of e.g. `gpu.h2d async` and `gpu.h2d`,
but I like the consistent meaning of the `async` keyword in GPU ops.

Reviewed By: herhut

Differential Revision: https://reviews.llvm.org/D89160
The file was modifiedmlir/test/Dialect/GPU/ops.mlir
The file was modifiedmlir/test/Dialect/GPU/invalid.mlir
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUOps.td
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
Commit 1b94261e36f18bdc17097078518df448b67c84ea by spatel
[x86] add cost model test for memcpy; NFC

This is treated as a special-case in the base class
implementation of getIntrinsicInstrCost().
The file was modifiedllvm/test/Analysis/CostModel/X86/intrinsic-cost-kinds.ll
Commit ef748583c24d7dd7ab1f904a27f3a1382cda22c6 by spatel
[CostModel] rearrange basic intrinsic cost implementation

This is bigger/uglier than before, but it should allow fixing
all of the broken paths more easily. Test coverage added with
rGfab028b and other commits.

This is not NFC - the scalable vector test would crash
without this patch.
The file was modifiedllvm/test/Analysis/CostModel/AArch64/sve-math.ll
The file was modifiedllvm/include/llvm/CodeGen/BasicTTIImpl.h
Commit 08097fc6a9746370e073e617036847d9ea46c9f4 by mtrofin
[NFC][Regalloc] Use MCRegister in MachineCopyPropagation

Differential Revision: https://reviews.llvm.org/D89250
The file was modifiedllvm/lib/CodeGen/MachineCopyPropagation.cpp
Commit eddbadfe13fbdcf18fee7d643d70d8042d69c778 by abidh
[compiler-rt] Allow override of 'emulator' value from lit_config.

Currently the 'emulator' value is fixed at build time. This patch allows changing the emulator
at testing time and enables us to run the tests on different board or simulators without needing
to run CMake again to change the value of emulator.

With this patch in place, the value of 'emulator' can be changed at test time from the command
line like this:

$ llvm-lit --param=emulator="..."

Reviewed By: delcypher

Differential Revision: https://reviews.llvm.org/D84708
The file was modifiedcompiler-rt/test/lit.common.cfg.py
Commit e2eaa914514c26c8e51c76148996a2e9cf74613c by kzhuravl_dev
AMDGPU: Remove -mamdgpu-debugger-abi option

It has been unsupported for few years now.

Differential Revision: https://reviews.llvm.org/D89125
The file was modifiedclang/test/Driver/amdgpu-features.c
The file was modifiedclang/docs/ClangCommandLineReference.rst
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/Driver/ToolChains/AMDGPU.cpp
Commit f218652a36bdf0ecd842c30da7a3936dc6580e96 by kzhuravl_dev
LLD/AMDGPU: Infer os abi based on input llvm bitcode

Differential Revision: https://reviews.llvm.org/D89042
The file was modifiedlld/ELF/InputFiles.cpp
The file was addedlld/test/ELF/lto/amdgcn-oses.ll
Commit ab55897817cc09113a9729d4ed907e13aa0386ff by Louis Dionne
[libc++] Allow passing relative paths to the Apple install script
The file was modifiedlibcxx/utils/ci/apple-install-libcxx.sh
Commit 6121117484ddd7c5a03b40004a8bba58506ce9d0 by nicolas.vasilache
[mlir][Linalg] Fix TensorConstantOp bufferization in Linalg.

TensorConstantOp bufferization currently uses the vector dialect to store constant data into memory.
Due to natural vector size and alignment properties, this is problematic with n>1-D vectors whose most minor dimension is not naturally aligned.

Instead, this revision linearizes the constant and introduces a linalg.reshape to go back to the desired shape.

Still this is still to be considered a workaround and a better longer term solution will probably involve `llvm.global`.

Differential Revision: https://reviews.llvm.org/D89311
The file was modifiedmlir/integration_test/Dialect/Linalg/CPU/test-tensor-matmul.mlir
The file was modifiedmlir/test/Dialect/Linalg/tensors-to-buffers.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/TensorsToBuffers.cpp
Commit 0c15a1b4bcefc1eb434e07aa31b7a08109ccd27e by stilis
[mlir] Fix sporadic build failures due to missing dependency

The build of MLIR occasionally fails (especially on Windows) because there is missing dependency between MLIRLLVMIR and MLIROpenMPOpsIncGen.

1) LLVMDialect.cpp includes LLVMDialect.h
2) LLVMDialect.h includes OpenMPDialect.h
3) OpenMPDialect.h includes OpenMPOpsDialect.h.inc, OpenMPOpsEnums.h.inc and OpenMPOps.h.inc

The OpenMP .inc files are generated by MLIROpenMPOpsIncGen, so MLIRLLVMIR which builds LLVMDialect.cpp should depend on MLIROpenMPOpsIncGen

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D89275
The file was modifiedmlir/lib/Dialect/LLVMIR/CMakeLists.txt
Commit 6713332fddb796f5b14fcb6a7e5d36979676e4ab by nikita.ppv
[LoopVersioningLICM] Fix noalias metadata emission

The previous code added the scope on each iteration, so that the
same scope was represented many times in the same !noalias metadata.
That's legal, and semantically equivalent to only storing the scope
once, but it's also wasteful and may pessimize further optimization
if AATags get intersected naively, as done by the AliasSetTracker.
The file was modifiedllvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp
Commit 0ccf9263cceb462a5f3b823becf7e9471e5fb212 by xun
[ASAN] Make sure we are only processing lifetime markers with offset 0 to alloca

This patch addresses https://bugs.llvm.org/show_bug.cgi?id=47787 (and hence https://bugs.llvm.org/show_bug.cgi?id=47767 as well).
In latter instrumentation code, we always use the beginning of the alloca as the base for instrumentation, ignoring any offset into the alloca.
Because of that, we should only instrument a lifetime marker if it's actually pointing to the beginning of the alloca.

Differential Revision: https://reviews.llvm.org/D89191
The file was addedllvm/test/Instrumentation/AddressSanitizer/alloca-offset-lifetime.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Commit fd4b3f123d6e64769881e4c6351d5bbbdac30ce3 by Artem Dergachev
[analyzer] NFC: Separate PathDiagnosticConsumer options from AnalyzerOptions.

The AnalyzerOptions object contains too much information that's
entirely specific to the Analyzer. It is also being referenced by
path diagnostic consumers to tweak their behavior. In order for path
diagnostic consumers to function separately from the analyzer,
make a smaller options object that only contains relevant options.

Differential Revision: https://reviews.llvm.org/D67420
The file was modifiedclang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h
The file was modifiedclang/lib/StaticAnalyzer/Core/TextDiagnostics.cpp
The file was modifiedclang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
The file was modifiedclang/include/clang/Analysis/PathDiagnostic.h
The file was modifiedclang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp
Commit b76dc111dd02672488df794570d82e3edbbfa5d8 by Artem Dergachev
[analyzer] NFC: Move IssueHash to libAnalysis.

IssueHash is an attempt to introduce stable warning identifiers
that won't change when code around them gets moved around.
Path diagnostic consumers print issue hashes for the emitted diagnostics.

This move will allow us to ultimately move path diagnostic consumers
to libAnalysis.

Differential Revision: https://reviews.llvm.org/D67421
The file was addedclang/include/clang/Analysis/IssueHash.h
The file was modifiedclang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
The file was addedclang/lib/Analysis/IssueHash.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
The file was modifiedclang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp
The file was removedclang/lib/StaticAnalyzer/Core/IssueHash.cpp
The file was modifiedclang/lib/Analysis/CMakeLists.txt
The file was removedclang/include/clang/StaticAnalyzer/Core/IssueHash.h
The file was modifiedclang/lib/StaticAnalyzer/Core/CMakeLists.txt
Commit 44b7cf2983b6a8373c99a9b254f8c3f944e03f35 by Artem Dergachev
[analyzer] NFC: Move path diagnostic consumer implementations to libAnalysis.

With this change, we're more or less ready to allow users outside
of the Static Analyzer to take advantage of path diagnostic consumers
for emitting their warnings in different formats.

Differential Revision: https://reviews.llvm.org/D67422
The file was modifiedclang/lib/Analysis/CMakeLists.txt
The file was addedclang/lib/Analysis/HTMLPathDiagnosticConsumer.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was removedclang/lib/StaticAnalyzer/Core/SarifDiagnostics.cpp
The file was addedclang/lib/Analysis/TextPathDiagnosticConsumer.cpp
The file was addedclang/include/clang/Analysis/PathDiagnosticConsumers.def
The file was modifiedclang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
The file was addedclang/lib/Analysis/SarifPathDiagnosticConsumer.cpp
The file was removedclang/lib/StaticAnalyzer/Core/TextDiagnostics.cpp
The file was removedclang/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h
The file was modifiedclang/include/clang/StaticAnalyzer/Core/Analyses.def
The file was addedclang/lib/Analysis/PlistPathDiagnosticConsumer.cpp
The file was removedclang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/CMakeLists.txt
The file was modifiedclang/include/clang/module.modulemap
The file was addedclang/lib/Analysis/PlistHTMLPathDiagnosticConsumer.cpp
The file was addedclang/include/clang/Analysis/PathDiagnosticConsumers.h
The file was modifiedclang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
The file was removedclang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
Commit 2af5ea28af4997428065c9da9b2413ae2095ef99 by llvmgnsyncbot
[gn build] Port 44b7cf2983b
The file was modifiedllvm/utils/gn/secondary/clang/lib/Analysis/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Core/BUILD.gn
Commit bfd9cef70e30b4dd655862735d4cd05001821c7a by llvmgnsyncbot
[gn build] Port b76dc111dd0
The file was modifiedllvm/utils/gn/secondary/clang/lib/Analysis/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Core/BUILD.gn