Changes

Summary

  1. [SLP]Fix PR55796: insert point for extractelements from different basic blocks. (details)
  2. [analyzer][NFC] Add test for 3a07280290564e294c957c94c918a6680714b417 (details)
  3. compiler-rt: Allow build without __c11_atomic_fetch_nand (details)
  4. [mlir][python][ctypes] fix ctype python binding complication for complex (details)
  5. sanitizers: Do not include crypt.h if SANITIZER_INTERCEPT_CRYPT_R is undef (details)
  6. ar_to_bc.sh: Ignore non-bitcode files in archives (details)
  7. [BOLT] Add `-o` option to merge-fdata (details)
  8. [Libomptarget] Add basic support for dynamic shared memory on AMDGPU (details)
  9. Revert "Adapt LLDB for D120540." (details)
  10. [libc] Keep all thread state information separate from the thread structure. (details)
  11. [DFSan] Remove deprecated flag from build-libc-list.py (details)
  12. [SLP]Improve shuffles cost estimation where possible. (details)
  13. [AMDGPU] Change GISel error handling for TFE on GFX90A (details)
  14. [mlir][sparse] Enable the test for operator expm1. (details)
  15. [clang] Add tests for (const) weak variables (details)
  16. [mlir] Add conversion and tests for complex.[sqrt|atan2] to Arith. (details)
  17. Fix an incorrect bit-width for storing attribute syntax information (details)
  18. [mlir] Add global_load and global_store ops to ml_program. (details)
  19. [ccache] Add Windows support (details)
  20. [Polly] Migrate -polly-mse to the new pass manager. (details)
  21. [mlir][math] Add math.ctlz expansion to control flow + arith operations (details)
  22. [lld/mac] Cache file IDs of symbols in emitStabs for faster sorting (details)
  23. [lld/mac] clang-format after f5709066e3b (details)
  24. [NFC][libc++][format] Improves naming. (details)
  25. Revert "[Driver][Modules] Remove dependence on linking support from clang/test/Driver/modules.cpp" (details)
  26. Revert "[NFC] Use %clang instead of %clang++ in tests" (details)
  27. Revert "[Driver] Enable to use C++20 standalne by -fcxx-modules" (details)
  28. [ValueTypes] Define MVTs for v128i2/v64i4 as well as i2 and i4. (details)
  29. [Object][DX] Parse DXContainer Parts (details)
Commit fe4949942d1cdb7dbfbc96bf0f0ef123308742ed by a.bataev
[SLP]Fix PR55796: insert point for extractelements from different basic blocks.

Extractelement instructions may come from different basic blocks, need
to take it into account when looking for a last instruction in the
bundle to prevent compiler crash.

Differential Revision: https://reviews.llvm.org/D126777
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was addedllvm/test/Transforms/SLPVectorizer/X86/gather-extractelements-different-bbs.ll
Commit e5ece11e761a8b31b700249e46cf05590330ebc7 by balazs.benics
[analyzer][NFC] Add test for 3a07280290564e294c957c94c918a6680714b417

I'm adding a test demonstraing that the issue reported by @mikaelholmen
is fixed.

Differential Revision: https://reviews.llvm.org/D126198
The file was modifiedclang/test/Analysis/pointer-to-member.cpp
Commit 18efa420da5fa065d88ba451cdcdbd950a2090c1 by emaste
compiler-rt: Allow build without __c11_atomic_fetch_nand

Don't build atomic fetch nand libcall functions when the required
compiler builtin isn't available. Without this compiler-rt can't be
built with LLVM 13 or earlier.

Not building the libcall functions isn't optimal, but aligns with the
usecase in FreeBSD where compiler-rt from LLVM 14 is built with an LLVM
13 clang and no LLVM 14 clang is built.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D126710
The file was modifiedcompiler-rt/lib/builtins/atomic.c
Commit d668218946b1b7e0f3f376c59fe818bc0579d6fd by ajcbik
[mlir][python][ctypes] fix ctype python binding complication for complex

There is no direct ctypes for MLIR's complex (and thus np.complex128
and np.complex64) yet, causing the mlir python binding methods for
memrefs to crash. This revision fixes this by passing complex arrays
as tuples of floats, correcting at the boundaries for the proper view.

NOTE: some of these changes (4 -> 2) were forced by the new "linting"

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D126422
The file was modifiedmlir/python/mlir/runtime/np_to_memref.py
The file was modifiedmlir/test/python/execution_engine.py
Commit be223eb5418a68a5264eed4f9f6b0680f12f23d3 by thakis
sanitizers: Do not include crypt.h if SANITIZER_INTERCEPT_CRYPT_R is undef

sanitizer_intercept_overriders.h might override SANITIZER_INTERCEPT_CRYPT_R to
be undefined. There's no need to require crypt.h in that case.

(The motivation is that crypt() moved from glibc into its own package at some
point, which makes intercepting it and building with a single sysroot that
supports both pre-bullseye and post-bullseye a bit hairy.)

Differential Revision: https://reviews.llvm.org/D126696
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
Commit 241e645036f8a4383dfce4c043586ebf9b0ce225 by i
ar_to_bc.sh: Ignore non-bitcode files in archives

The script uses llvm-link to link LLVM bitcode files.
5426da8ffa4a6d55adab21026ce6ebe8f1cc6ef2 used -DLLVM_DISABLE_ASSEMBLY_FILES=ON
to ignore object files compiled from lib/Support/BLAKE3/*.S.

A better approach (which fits Bazel better) is to ignore non-bitcode files.

Reviewed By: akyrtzi

Differential Revision: https://reviews.llvm.org/D126728
The file was modifiedcompiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
The file was modifiedcompiler-rt/lib/sanitizer_common/symbolizer/scripts/ar_to_bc.sh
Commit 716d428ab525121db6c5574b62923d49ea5191ed by yikong
[BOLT] Add `-o` option to merge-fdata

Differential Revision: https://reviews.llvm.org/D126788
The file was modifiedbolt/tools/merge-fdata/merge-fdata.cpp
The file was addedbolt/test/X86/merge-fdata-output.test
Commit f4f23de1a46f94762b8192e82f20fb86b41c339f by jhuber6
[Libomptarget] Add basic support for dynamic shared memory on AMDGPU

This patchs adds the arguments necessary to allocate the size of the
dynamic shared memory via the `LIBOMPTARGET_SHARED_MEMORY_SIZE`
environment variable. This patch only allocates the memory, AMDGPU has a
limitation that shared memory can only be accessed from the kernel
directly. So this will currently only work with optimizations to inline
the accessor function.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D125252
The file was modifiedopenmp/libomptarget/plugins/amdgpu/src/rtl.cpp
The file was addedopenmp/libomptarget/test/api/omp_dynamic_shared_memory_amdgpu.c
Commit 62b448217595c33788693f4b682ea5a84d9e2005 by Adrian Prantl
Revert "Adapt LLDB for D120540."

This reverts commit ca73de43744503a557b1f3709c0ff4751798702f.

That patch was just hiding the problem, instead of fixing it.
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
Commit ad89cf4e2d1ec47db094f33a436d6b7eab090a02 by sivachandra
[libc] Keep all thread state information separate from the thread structure.

The state is now stored on the thread's stack memory. This enables
implementing pthread API like pthread_detach which takes the pthread_t
structure argument by value.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D126716
The file was modifiedlibc/src/__support/threads/thread_attrib.h
The file was modifiedlibc/include/llvm-libc-types/thrd_t.h
The file was modifiedlibc/src/threads/thrd_join.cpp
The file was modifiedlibc/src/__support/threads/linux/thread.h
Commit 31d12df3b9382cd3b1500cb0f11d96291e79c37f by browneee
[DFSan] Remove deprecated flag from build-libc-list.py

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D126429
The file was modifiedcompiler-rt/lib/dfsan/scripts/build-libc-list.py
Commit fd5a6ce9dcb77b7821c95355d73af0b3b2020647 by a.bataev
[SLP]Improve shuffles cost estimation where possible.

Improved/fixed cost modeling for shuffles by providing masks, improved
cost model for non-identity insertelements.

Differential Revision: https://reviews.llvm.org/D115462
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/alternate-int-inseltpoison.ll
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/malformed_phis.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/resched.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/accelerate-vector-functions.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/accelerate-vector-functions-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/tsc-s116.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/alternate-int.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/load-merge-inseltpoison.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/load-merge.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/PR39774.ll
Commit c9e242f6ddab24ad2a5cc562b39498caf23c9ef3 by Stanislav.Mekhanoshin
[AMDGPU] Change GISel error handling for TFE on GFX90A

Differential Revision: https://reviews.llvm.org/D126797
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
Commit 548f0841cd42af2649d5acd3724ea7309cbdc0bb by bixia1
[mlir][sparse] Enable the test for operator expm1.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D126732
The file was modifiedmlir/test/Integration/Dialect/SparseTensor/CPU/sparse_complex_ops.mlir
Commit 86f9cf88cb06d36e37ef8de006b2a0b651c9b7e9 by anders
[clang] Add tests for (const) weak variables

This adds tests checking the behavior of const variables declared with
weak attribute.

Both checking that they can not be used in places where a constant
expression is required and that a dynamic initializer is emitted when
used as an initializer expression.

Differential Revision: https://reviews.llvm.org/D126578
The file was addedclang/test/SemaCXX/weak-init.cpp
The file was addedclang/test/CodeGenCXX/weak-init.cpp
Commit f711785e61e72ca1f483a288c39557e1bdbd1eaa by pifon
[mlir] Add conversion and tests for complex.[sqrt|atan2] to Arith.

Differential Revision: https://reviews.llvm.org/D126799
The file was modifiedmlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir
The file was modifiedmlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
The file was addedmlir/test/Integration/Dialect/Complex/CPU/correctness.mlir
Commit aaf04c72159109f37507589ba13ff034b73403c2 by aaron
Fix an incorrect bit-width for storing attribute syntax information

This field corresponds to the Syntax enumeration, and that gained
another entry in 1fdf952deeb9a02aa34794af3c1a7d13a30e068e. However,
the bit-field for storing the syntax used was not adjusted to handle
the extra field.

This turns out to be unobservable for HLSL attributes at the moment, so
there is no test coverage. But it's also not really an NFC change
either.
The file was modifiedclang/include/clang/Basic/AttributeCommonInfo.h
Commit 3bb7999339c5929b7b5db2949e5faca9dbb906ad by laurenzo
[mlir] Add global_load and global_store ops to ml_program.

* Adds simple, non-atomic, non-volatile, non-synchronized direct load/store ops.

Differential Revision: https://reviews.llvm.org/D126230
The file was addedmlir/include/mlir/Dialect/MLProgram/IR/MLProgramTypes.h
The file was modifiedmlir/lib/Dialect/MLProgram/IR/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/MLProgram/IR/MLProgram.h
The file was modifiedmlir/include/mlir/Dialect/MLProgram/IR/MLProgramBase.td
The file was modifiedmlir/include/mlir/Dialect/MLProgram/IR/MLProgramOps.td
The file was modifiedmlir/lib/Dialect/MLProgram/IR/MLProgramOps.cpp
The file was modifiedutils/bazel/llvm-project-overlay/mlir/BUILD.bazel
The file was addedmlir/include/mlir/Dialect/MLProgram/IR/MLProgramTypes.td
The file was modifiedmlir/include/mlir/Dialect/MLProgram/IR/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/MLProgram/IR/MLProgramDialect.cpp
The file was modifiedmlir/test/Dialect/MLProgram/ops.mlir
The file was modifiedmlir/test/Dialect/MLProgram/invalid.mlir
Commit a4425cc9146059618b3b7e927639b60a7c3301bc by stilis
[ccache] Add Windows support

Windows builds can't receive environment variables on the command line or make use of RULE_LAUNCH_COMPILE with ccache.

Reviewed By: stella.stamenova, Ericson2314

Differential Revision: https://reviews.llvm.org/D126575
The file was modifiedllvm/CMakeLists.txt
Commit 02f640672e2875c4e7578366bb2e22582548d7c1 by llvm-project
[Polly] Migrate -polly-mse to the new pass manager.

This patch implements the `MaximalStaticExpansion` and its printer in NPM.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D125870
The file was addedpolly/include/polly/MaximalStaticExpansion.h
The file was modifiedpolly/test/MaximalStaticExpansion/working_phi_two_scalars.ll
The file was modifiedpolly/test/MaximalStaticExpansion/working_value_expansion.ll
The file was modifiedpolly/test/MaximalStaticExpansion/working_deps_between_inners.ll
The file was modifiedpolly/test/MaximalStaticExpansion/working_deps_between_inners_phi.ll
The file was modifiedpolly/test/MaximalStaticExpansion/working_expansion_multiple_instruction_per_statement.ll
The file was modifiedpolly/test/MaximalStaticExpansion/load_after_store_same_statement.ll
The file was modifiedpolly/test/MaximalStaticExpansion/read_from_original.ll
The file was modifiedpolly/test/MaximalStaticExpansion/working_expansion_multiple_dependences_per_statement.ll
The file was modifiedpolly/test/MaximalStaticExpansion/too_many_writes.ll
The file was modifiedpolly/lib/Support/RegisterPasses.cpp
The file was modifiedpolly/test/MaximalStaticExpansion/working_expansion.ll
The file was modifiedpolly/lib/Support/PollyPasses.def
The file was modifiedpolly/test/MaximalStaticExpansion/working_phi_expansion.ll
The file was modifiedpolly/include/polly/LinkAllPasses.h
The file was modifiedpolly/lib/Transform/MaximalStaticExpansion.cpp
Commit f3bdb56d61e3e7bbcb2615f087cc63b67c60ab59 by rob.suderman
[mlir][math] Add math.ctlz expansion to control flow + arith operations

Ctlz is an intrinsic in LLVM but does not have equivalent operations in SPIR-V.
Including a decomposition gives an alternative path for these platforms.

Reviewed By: NatashaKnk

Differential Revision: https://reviews.llvm.org/D126261
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/lib/Dialect/Math/Transforms/CMakeLists.txt
The file was removedmlir/lib/Dialect/Math/Transforms/ExpandTanh.cpp
The file was removedmlir/test/lib/Dialect/Math/TestExpandTanh.cpp
The file was addedmlir/test/Dialect/Math/expand-math.mlir
The file was addedmlir/test/lib/Dialect/Math/TestExpandMath.cpp
The file was modifiedmlir/include/mlir/Dialect/Math/Transforms/Passes.h
The file was modifiedmlir/test/lib/Dialect/Math/CMakeLists.txt
The file was removedmlir/test/Dialect/Math/expand-tanh.mlir
The file was addedmlir/lib/Dialect/Math/Transforms/ExpandPatterns.cpp
Commit f5709066e3b05b27eb95b8b42d9d01daca48d93c by thakis
[lld/mac] Cache file IDs of symbols in emitStabs for faster sorting

This reduces the time emitStabs() takes by about 275ms, or 3% of overall
linking time for the project I'm on. Although the parent function is run in
parallel, it's one of the slowest tasks in that concurrent batch (I have
another optimization for another slow task as well).

Differential Revision: https://reviews.llvm.org/D126785
The file was modifiedlld/MachO/SyntheticSections.cpp
Commit 815825f4426f91f22a781d63abe1e2bc6d4268a1 by thakis
[lld/mac] clang-format after f5709066e3b
The file was modifiedlld/MachO/SyntheticSections.cpp
Commit 10c4eec2785a68880c287d36c262d5be3a72a128 by koraq
[NFC][libc++][format] Improves naming.

Based on review comments in D110499.

Depends on D110499

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D125610
The file was modifiedlibcxx/include/__format/buffer.h
Commit 128ffb332bca2c3efae82665b2b557f9b481b83f by Adrian Prantl
Revert "[Driver][Modules] Remove dependence on linking support from clang/test/Driver/modules.cpp"

This reverts commit 35b1cfc76f08faabf3f27c0bd054acc7c854a6ca as a dependency of D120540.
The file was modifiedclang/test/Driver/modules.cpp
Commit c84b9bbac1ecaafb34daa7618b035f063ef1094e by Adrian Prantl
Revert "[NFC] Use %clang instead of %clang++ in tests"

This reverts commit 738c20e6df01217b6364c3b75d0ced6b6fb6277e as a dependency of D120540.
The file was modifiedclang/test/Driver/modules.cpp
Commit d951ca5439bb8726cfe1ceb2d12e220f29fe5125 by Adrian Prantl
Revert "[Driver] Enable to use C++20 standalne by -fcxx-modules"

This reverts commit a544710cd43ba9f7729a613c58729f146e792a8e.

See discussion in D120540.

This breaks C++ Clang modules on Darwin and also more than a dozen
tests in the LLDB testsuite.  I think we need to be more careful to
separate out the enabling of Clang C++ modules and C++20
modules. Either by having -fmodules-ts control the HaveModules flag,
or by adding a way to explicitly turn them off.
The file was modifiedclang/test/Driver/modules.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was removedclang/test/Modules/cxx-modules.cppm
The file was modifiedclang-tools-extra/test/pp-trace/pp-trace-modules.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
Commit 430ac5c3029c52e391e584c6d4447e6e361fae99 by hgreving
[ValueTypes] Define MVTs for v128i2/v64i4 as well as i2 and i4.

Adds MVT::v128i2, MVT::v64i4, and implied MVT::i2, MVT::i4.

Keeps MVT::i2, MVT::i4 lowering actions as `expand`, which should be
removed once targets set this explicitly.

Adjusts 11 lit tests to reflect slightly different behavior during
DAG combine.

Differential Revision: https://reviews.llvm.org/D125247
The file was modifiedllvm/test/CodeGen/X86/bitreverse.ll
The file was modifiedllvm/lib/CodeGen/ValueTypes.cpp
The file was modifiedllvm/lib/CodeGen/TargetLoweringBase.cpp
The file was modifiedllvm/test/CodeGen/RISCV/srem-seteq-illegal-types.ll
The file was modifiedllvm/utils/TableGen/CodeGenTarget.cpp
The file was modifiedllvm/test/CodeGen/ARM/srem-seteq-illegal-types.ll
The file was modifiedllvm/test/CodeGen/Thumb2/srem-seteq-illegal-types.ll
The file was modifiedllvm/test/TableGen/intrinsic-pointer-to-any.td
The file was modifiedllvm/include/llvm/CodeGen/ValueTypes.td
The file was modifiedllvm/lib/IR/Function.cpp
The file was modifiedllvm/test/CodeGen/X86/srem-seteq-illegal-types.ll
The file was modifiedllvm/test/CodeGen/Thumb/srem-seteq-illegal-types.ll
The file was modifiedllvm/include/llvm/Support/MachineValueType.h
The file was modifiedllvm/utils/TableGen/IntrinsicEmitter.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/srem-seteq-illegal-types.ll
The file was modifiedllvm/test/CodeGen/AArch64/srem-seteq-illegal-types.ll
The file was modifiedllvm/test/CodeGen/PowerPC/srem-seteq-illegal-types.ll
The file was modifiedllvm/test/CodeGen/Mips/srem-seteq-illegal-types.ll
Commit 9e3919dac449d6e018ffbc77b5511b8ab858ede3 by chris.bieneman
[Object][DX] Parse DXContainer Parts

DXContainer files are structured as parts. This patch adds support for
parsing out the file part offsets and file part headers.

Reviewed By: kuhar

Differential Revision: https://reviews.llvm.org/D124804
The file was modifiedllvm/include/llvm/BinaryFormat/DXContainer.h
The file was modifiedllvm/lib/Object/DXContainer.cpp
The file was modifiedllvm/include/llvm/Object/DXContainer.h
The file was modifiedllvm/unittests/Object/DXContainerTest.cpp