Changes

Summary

  1. [InstCombine] Add tests for inbounds handling in loop invariant GEP fold (NFC) (details)
  2. [InstCombine] Always create new GEPs when swapping GEPs (details)
  3. [flang][OpenMP] Check for occurrence of multiple list items in nontemporal clause for simd directive (details)
  4. [OpenMP][Clang] Fix atomic compare for signed vs. unsigned (details)
  5. [InstCombine] When swapping GEPs, only keep inbounds if both are (details)
  6. Change build_llvm_package.bat to build_llvm_release.bat (details)
  7. [mlir] add VectorizeOp to structured transform ops (details)
  8. [mlir] provide Python bindings for the Transform dialect (details)
  9. [sanitizers] Fixes strndup API behaviour when intercepted by sanitizers (details)
  10. [libc++] Reduce the verbosity when running the libc++ Lit configuration (details)
  11. [HLSL] Enable vector types for hlsl. (details)
  12. [TwoAddressInstructionPass] Special processing of STATEPOINT instruction. (details)
  13. [gn build] Port e576280380d3 (details)
  14. Fix warning for unused variable in the non-assert build (NFC) (details)
  15. [ODRHash][NFC] Add missing 'select' case for `ODRMismatchDecl`. (details)
  16. [VPlan] Add test for printing VPlan for outer loop vectorization. (details)
  17. Revert "[HLSL] Enable vector types for hlsl." (details)
  18. [Support] Make report_fatal_error respect its GenCrashDiag argument so it doesn't generate a backtrace (details)
  19. fix tests after my commit 80b3dcc045f8ea6e5e532d8891bbf1305bce89e8 (details)
  20. Apply clang-tidy fixes for llvm-else-after-return in OpenMPToLLVM.cpp (NFC) (details)
  21. Apply clang-tidy fixes for performance-unnecessary-value-param in OneShotModuleBufferize.cpp (NFC) (details)
Commit 590fd54ca1e7d82a3c5f519fe08decaafd9bcde8 by npopov
[InstCombine] Add tests for inbounds handling in loop invariant GEP fold (NFC)
The file was modifiedllvm/test/Transforms/InstCombine/gep-combine-loop-invariant.ll
Commit 2d7bab666f5a71a70da0ed7925fda5ce634d21e5 by npopov
[InstCombine] Always create new GEPs when swapping GEPs

As the long explanatory comment attests, performing the modification
in place is pretty tricky. Drop this unnecessary complexity and
always create new instructions.

This should be NFC-ish, but can probably cause difference due to
worklist order.
The file was modifiedllvm/test/Transforms/InstCombine/gep-combine-loop-invariant.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
Commit 314abe3922c1dc5050b3eefc09ff794ba4dd807c by arnamoy.bhattacharyya
[flang][OpenMP] Check for occurrence of multiple list items in nontemporal clause for simd directive

This patch implements the following semantic check:

A list-item cannot appear in more than one nontemporal clause.

Reviewed By: kiranchandramohan, shraiysh

Differential Revision: https://reviews.llvm.org/D110270
The file was addedflang/test/Semantics/omp-simd-nontemporal.f90
The file was modifiedflang/lib/Semantics/check-omp-structure.cpp
The file was modifiedflang/lib/Semantics/check-omp-structure.h
Commit d2e3cb737417a2e5ffad34f666fa8510e88e8bc2 by jdenny.ornl
[OpenMP][Clang] Fix atomic compare for signed vs. unsigned

Without this patch, arguments to the
`llvm::OpenMPIRBuilder::AtomicOpValue` initializer are reversed.

Reviewed By: ABataev, tianshilei1992

Differential Revision: https://reviews.llvm.org/D126619
The file was addedopenmp/runtime/test/atomic/omp-atomic-compare-signedness.c
The file was modifiedclang/test/OpenMP/atomic_compare_codegen.cpp
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp
The file was addedopenmp/libomptarget/test/offloading/atomic-compare-signedness.c
Commit a770f534e6f647d1f6a25544117e7b3d8a0c3486 by npopov
[InstCombine] When swapping GEPs, only keep inbounds if both are

If only one of the GEPs is inbounds, then after swapping, there is
no guarantee that one of them will be inbounds as well
(see e.g. https://alive2.llvm.org/ce/z/agaCnp).

This is only a partial fix, because even if both are inbounds, the
result is not necessarily inbounds (if the offsets have different
signs).
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
The file was modifiedllvm/test/Transforms/InstCombine/gep-combine-loop-invariant.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
Commit b2719349d2a640187b66baeb91115a00e706f4c6 by hans
Change build_llvm_package.bat to build_llvm_release.bat

We don't build snapshot packages anymore, so repurpose this
for doing release builds instead.
The file was addedllvm/utils/release/build_llvm_release.bat
The file was removedllvm/utils/release/build_llvm_package.bat
Commit cc6c15920358a93185eced1d9dcec201815debf0 by zinenko
[mlir] add VectorizeOp to structured transform ops

Vectorization is a key transformation to achieve high performance on most
architectures. In the transform dialect, vectorization is implemented as a
parameterizable transform op. It currently applies to a scope of payload IR
delimited by some isolated-from-above op, mainly because several enabling
transformations (such as affine simplification) are needed to perform
vectorization and these transformation would apply to ops other than the "main"
computational payload op. A separate "navigation" transform op that obtains the
isolated-from-above ancestor of an op is introduced in the core transform
dialect. Even though it is currently only useful for vectorization,
isolated-from-above ops are a common anchor for transformations (usually
implemented as passes) that is likely to be reused in the future.

Depends On D126374

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D126542
The file was modifiedmlir/include/mlir/Dialect/Transform/IR/TransformOps.td
The file was modifiedutils/bazel/llvm-project-overlay/mlir/BUILD.bazel
The file was modifiedmlir/lib/Dialect/Transform/IR/TransformOps.cpp
The file was addedmlir/test/Dialect/Linalg/transform-op-vectorize.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
The file was modifiedmlir/lib/Dialect/Linalg/TransformOps/CMakeLists.txt
The file was modifiedmlir/test/Dialect/Transform/test-interpreter.mlir
The file was modifiedmlir/lib/Dialect/Linalg/TransformOps/LinalgTransformOps.cpp
Commit 3f71765a71ca97433723b43c4f64931cace11ca1 by zinenko
[mlir] provide Python bindings for the Transform dialect

Python bindings for extensions of the Transform dialect are defined in separate
Python source files that can be imported on-demand, i.e., that are not imported
with the "main" transform dialect. This requires a minor addition to the
ODS-based bindings generator. This approach is consistent with the current
model for downstream projects that are expected to bundle MLIR Python bindings:
such projects can include their custom extensions into the bundle similarly to
how they include their dialects.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D126208
The file was modifiedmlir/cmake/modules/AddMLIRPython.cmake
The file was modifiedmlir/tools/mlir-tblgen/OpPythonBindingGen.cpp
The file was modifiedutils/bazel/llvm-project-overlay/mlir/python/BUILD.bazel
The file was modifiedmlir/python/CMakeLists.txt
The file was addedmlir/python/mlir/dialects/transform/structured.py
The file was addedmlir/python/mlir/dialects/_transform_ops_ext.py
The file was addedmlir/python/mlir/dialects/LinalgStructuredTransformOps.td
The file was addedmlir/python/mlir/dialects/TransformOps.td
The file was addedmlir/python/mlir/dialects/_structured_transform_ops_ext.py
The file was addedmlir/python/mlir/dialects/transform/__init__.py
The file was addedmlir/test/python/dialects/transform_structured_ext.py
The file was addedmlir/test/python/dialects/transform.py
Commit 4278b7e16a5b13d529c92d682ac76b53f93a4961 by pierre.gousseau
[sanitizers] Fixes strndup API behaviour when intercepted by sanitizers

Sanitizers ignore flag allocator_may_return_null=1 in strndup() calls.
When OOM is emulated, this causes to the unexpected crash.

Committed by pgousseau on behalf of "Kostyantyn Melnik, kmnls.kmnls@gmail.com"

Reviewed by: pgousseau

Differential Revision: https://reviews.llvm.org/D126452
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
The file was modifiedcompiler-rt/test/sanitizer_common/TestCases/max_allocation_size.cpp
Commit f8239eec8decd3459d4f638b98c4f582add31263 by Louis Dionne
[libc++] Reduce the verbosity when running the libc++ Lit configuration

We print the same information as before, however we do it with less
verbosity unless `--debug` is used.
The file was modifiedlibcxx/utils/libcxx/test/newconfig.py
Commit e576280380d3f5221cfcc14e9fabeacc8506a43c by python3kgae
[HLSL] Enable vector types for hlsl.

Vector types in hlsl is using clang ext_vector_type.
Declaration of vector types is in builtin header hlsl.h.
hlsl.h will be included by default for hlsl shader.

Reviewed By: Anastasia

Differential Revision: https://reviews.llvm.org/D125052
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/Basic/LangOptions.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was addedclang/lib/Headers/hlsl/hlsl_basic_types.h
The file was addedclang/lib/Headers/hlsl.h
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/lib/Headers/CMakeLists.txt
The file was modifiedclang/lib/Frontend/InitPreprocessor.cpp
The file was addedclang/test/CodeGenHLSL/basic_types.hlsl
The file was addedclang/test/Driver/hlsl_no_stdinc.hlsl
Commit 85322e82be5014fb0abddb3a36df928d16760fba by dantrushin
[TwoAddressInstructionPass] Special processing of STATEPOINT instruction.

STATEPOINT is a special pseudo instruction which represent Moving GC semantic to LLVM.
Every tied def/use VReg pair in STATEPOINT represent same physical register which can
'magically' change during call wrapped by statepoint.
(By construction, tied use operand  is not live across  STATEPOINT).

This means that when converting into two-address form, there is not need to insert COPY
instruction before stateppoint, what TwoAddressInstruction pass does for 'regular'
instructions.

Reviewed By: MatzeB

Differential Revision: https://reviews.llvm.org/D124631
The file was modifiedllvm/test/CodeGen/X86/statepoint-invoke-ra.mir
The file was addedllvm/test/CodeGen/X86/statepoint-vreg-twoaddr.mir
The file was modifiedllvm/test/CodeGen/X86/statepoint-vreg-unlimited-tied-opnds.ll
The file was modifiedllvm/lib/CodeGen/TwoAddressInstructionPass.cpp
Commit 1e01b1ec72031fcaceb4e77e1c5c8e34f1e862e8 by llvmgnsyncbot
[gn build] Port e576280380d3
The file was modifiedllvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn
Commit aff271930e8ac2ca520ba92cf6d736f94edfaaf6 by joker.eph
Fix warning for unused variable in the non-assert build (NFC)
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit f3defc23488eb29c69d2a33c0c5b652c874fb0f3 by vsapsai
[ODRHash][NFC] Add missing 'select' case for `ODRMismatchDecl`.

No test changes because `err_module_odr_violation_mismatch_decl_unknown`
is a catch-all when custom diagnostic is missing. And missing custom
diagnostic we should fix by implementing it, not by improving the
general case. But if we pass enum value not covered by 'select', clang
can crash, so protect against that.

Differential Revision: https://reviews.llvm.org/D126566
The file was modifiedclang/include/clang/Basic/DiagnosticSerializationKinds.td
Commit b7d2b160c3ba85c42427d5db96e0af01a0a9d1b5 by flo
[VPlan] Add test for printing VPlan for outer loop vectorization.

Test coverage for D123005.
The file was addedllvm/test/Transforms/LoopVectorize/vplan-printing-outer-loop.ll
Commit c4eb8035ed6647e58d4c5161f393e9220f7402cf by thakis
Revert "[HLSL] Enable vector types for hlsl."

This reverts commit e576280380d3f5221cfcc14e9fabeacc8506a43c.
Breaks tests on mac/arm, see comment on https://reviews.llvm.org/D125052

Also revert follow-up "[gn build] Port e576280380d3"
This reverts commit 1e01b1ec72031fcaceb4e77e1c5c8e34f1e862e8.
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/lib/Frontend/InitPreprocessor.cpp
The file was removedclang/test/CodeGenHLSL/basic_types.hlsl
The file was modifiedllvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn
The file was removedclang/test/Driver/hlsl_no_stdinc.hlsl
The file was modifiedclang/include/clang/Driver/Options.td
The file was removedclang/lib/Headers/hlsl/hlsl_basic_types.h
The file was removedclang/lib/Headers/hlsl.h
The file was modifiedclang/lib/Headers/CMakeLists.txt
The file was modifiedclang/lib/Basic/LangOptions.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
Commit 80b3dcc045f8ea6e5e532d8891bbf1305bce89e8 by nuno.lopes
[Support] Make report_fatal_error respect its GenCrashDiag argument so it doesn't generate a backtrace

There are a few places where we use report_fatal_error when the input is broken.
Currently, this function always crashes LLVM with an abort signal, which
then triggers the backtrace printing code.
I think this is excessive, as wrong input shouldn't give a link to
LLVM's github issue URL and tell users to file a bug report.
We shouldn't print a stack trace either.

This patch changes report_fatal_error so it uses exit() rather than
abort() when its argument GenCrashDiag=false.

Reviewed by: nikic, MaskRay, RKSimon

Differential Revision: https://reviews.llvm.org/D126550
The file was modifiedllvm/test/CodeGen/Mips/micromips64-unsupported.ll
The file was modifiedllvm/test/Transforms/LoopUnroll/peel-loop-and-unroll.ll
The file was modifiedllvm/test/CodeGen/Mips/mips32r6/compatibility.ll
The file was modifiedllvm/test/CodeGen/Mips/mips64r6/compatibility.ll
The file was modifiedllvm/test/Transforms/BlockExtractor/invalid-line.ll
The file was modifiedllvm/test/CodeGen/Mips/cpus.ll
The file was modifiedllvm/test/CodeGen/WebAssembly/tls-general-dynamic.ll
The file was modifiedllvm/test/Transforms/BlockExtractor/invalid-function.ll
The file was modifiedllvm/test/CodeGen/Mips/fpxx.ll
The file was modifiedllvm/lib/Target/Mips/MipsSubtarget.cpp
The file was modifiedllvm/lib/Transforms/IPO/BlockExtractor.cpp
The file was modifiedllvm/test/CodeGen/SystemZ/codemodel.ll
The file was modifiedllvm/test/CodeGen/Mips/msa/3r-a.ll
The file was modifiedllvm/test/CodeGen/ARM/codemodel.ll
The file was modifiedllvm/test/CodeGen/Lanai/codemodel.ll
The file was modifiedllvm/test/Transforms/GCOVProfiling/version.ll
The file was modifiedllvm/test/Transforms/BlockExtractor/invalid-block.ll
The file was modifiedllvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
The file was modifiedllvm/test/CodeGen/BPF/xadd.ll
The file was modifiedllvm/test/MC/Mips/micromips64-unsupported.s
The file was modifiedllvm/test/MC/Mips/micromips64r6-unsupported.s
The file was modifiedllvm/lib/Support/ErrorHandling.cpp
The file was modifiedllvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
The file was modifiedllvm/test/CodeGen/Mips/fp64a.ll
The file was modifiedllvm/test/CodeGen/SPARC/codemodel.ll
The file was modifiedllvm/test/CodeGen/PowerPC/codemodel.ll
The file was modifiedllvm/test/Other/optimization-remarks-inline.ll
The file was modifiedllvm/test/CodeGen/X86/codemodel.ll
Commit 8c55de9ee7f63a26e6edf7bcf4279f64602b3bf1 by nuno.lopes
fix tests after my commit 80b3dcc045f8ea6e5e532d8891bbf1305bce89e8
doesn't like exit code 126 I'm afraid
The file was modifiedllvm/lib/Support/ErrorHandling.cpp
Commit 118d9ebd521317d6f593fd2b9cea66043336846b by joker.eph
Apply clang-tidy fixes for llvm-else-after-return in OpenMPToLLVM.cpp (NFC)
The file was modifiedmlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp
Commit 940e290860894d274c986c88bea2dcc17f1e93c3 by joker.eph
Apply clang-tidy fixes for performance-unnecessary-value-param in OneShotModuleBufferize.cpp (NFC)
The file was modifiedmlir/include/mlir/Dialect/Bufferization/Transforms/OneShotModuleBufferize.h
The file was modifiedmlir/lib/Dialect/Bufferization/Transforms/OneShotModuleBufferize.cpp