Changes

Summary

  1. [InstCombine] Gracefully handle an alloca outside the alloca-AS (details)
  2. [Attributor][NFC] Clang format (details)
  3. [Attributor] Teach AAPotentialValues about constant select conditions (details)
  4. [Attributor][NFCI] Remove unneeded namespace (details)
  5. [Attributor][NFCI] Make the state of AAValueSimplify explicit (details)
  6. Revert "[omp] Fix build without ITT after D103121 changes" (details)
  7. Revert "[OpenMP] Add Two-level Distributed Barrier" (details)
  8. [mlir] silence -Wunused-variable in Linalg comprehensive bufferize (details)
  9. Catch an extremely obvious memory leak, thanks asan (details)
  10. [libc++] NFCI: Remove code duplication and obsolete declarations in wrap_iter (details)
  11. [libc++] Serialize Lit parameters to make them available to from-scratch configs (details)
  12. Print default template argument if manually specified in typedef declaration. (details)
  13. [LV] Fix bug when unrolling (only) a loop with non-latch exit (details)
  14. [SCCP] Extend tests added 1092357ccdc9 in with UREM/SREM by 0. (details)
  15. [perf] Fix a data race in the PerfJITEventListener (details)
  16. [libc++] NFCI: Remove __functional/search.h (details)
  17. [gn build] Port d03aa7d6b66f (details)
  18. [ARM] Extra test for gep immediate costs. NFC (details)
  19. [AMDGPU] Fix 224-bit spills (details)
  20. [llvm-objdump] Add testing for --print-imm-hex, --headers, --section-headers and --private-headers (details)
  21. [llvm-objdump] Add --no-print-imm-hex to the command guide (details)
  22. [mlir:Async] Remove async operations if it is statically known that the parallel operation has a single compute block (details)
  23. [mlir:Async] Convert AsyncParallelFor pass to ModuleOp pass (details)
  24. [mlir:Async] Fix a bug in automatic refence counting around function calls (details)
  25. [libc++] Update ABI docs. NFCI. (details)
Commit a33e12801279a947c74fdee2655b24480941fb39 by johannes
[InstCombine] Gracefully handle an alloca outside the alloca-AS

While we might eventually want to disallow allocas that do not have the
alloca-AS set, it seems undesirable to crash on them. Add a cast when
required so that we can support such allocas (at least here).

Differential Revision: https://reviews.llvm.org/D104866
The file was addedllvm/test/Transforms/InstCombine/alloca-in-non-alloca-as.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
Commit 8dc9bb6d85ac04a07bab1a3309702c7bf7944e1e by johannes
[Attributor][NFC] Clang format
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
Commit 457bd5c8d52a110fac43d538a03e30ef49099974 by johannes
[Attributor] Teach AAPotentialValues about constant select conditions

There was a TODO but now we actually check if the select condition is
assumed constant and only look at the relevant operand.
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/test/Transforms/Attributor/value-simplify.ll
Commit dcbe58d94c843e443113bff5f60fbcccc4168714 by johannes
[Attributor][NFCI] Remove unneeded namespace
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
Commit 7af91a2b8f06cfa603eff1514c8ee38bdf1811f1 by johannes
[Attributor][NFCI] Make the state of AAValueSimplify explicit

As we have done with other states we want the AAValueSimplify state to
be explicit to use it more easily in our helpers.
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
Commit bc8bb3df35223afeea62170b32f8ce9bd04255d4 by johannes
Revert "[omp] Fix build without ITT after D103121 changes"

This reverts commit eab1fd389b61d236bf8df4d09f62dd18253a10bc.

This commit fixed a problem with 25073a4ecfc9 (D103121) which is the one
we actually need to revert to unblock non-X86 builds of OpenMP. Can be
reapplied, or merged into, D103121 as it goes in again.
The file was modifiedopenmp/runtime/src/kmp_barrier.cpp
The file was modifiedopenmp/runtime/src/kmp_wait_release.h
Commit 4eb90e893f82314def571f7129dfd88bd098208b by johannes
Revert "[OpenMP] Add Two-level Distributed Barrier"

This reverts commit 25073a4ecfc9b2e3cb76776185e63bfdb094cd98.

This breaks non-x86 OpenMP builds for a while now. Until a solution is
ready to be upstreamed we revert the feature and unblock those builds.
See:
  https://reviews.llvm.org/rG25073a4ecfc9b2e3cb76776185e63bfdb094cd98#1005821
and
  https://reviews.llvm.org/rG25073a4ecfc9b2e3cb76776185e63bfdb094cd98#1005821

The currently proposed fix (D104788) seems not to be ready yet:
  https://reviews.llvm.org/D104788#2841928
The file was modifiedopenmp/runtime/src/kmp_barrier.cpp
The file was modifiedopenmp/runtime/src/kmp_str.h
The file was modifiedopenmp/runtime/src/kmp_global.cpp
The file was modifiedopenmp/runtime/src/i18n/en_US.txt
The file was modifiedopenmp/runtime/src/kmp_os.h
The file was modifiedopenmp/runtime/src/z_Windows_NT_util.cpp
The file was modifiedopenmp/runtime/src/kmp_wait_release.cpp
The file was modifiedopenmp/runtime/src/kmp_settings.cpp
The file was modifiedopenmp/runtime/src/kmp_tasking.cpp
The file was removedopenmp/runtime/src/kmp_barrier.h
The file was modifiedopenmp/runtime/src/kmp_stats.h
The file was modifiedopenmp/runtime/src/z_Linux_util.cpp
The file was modifiedopenmp/runtime/src/kmp_atomic.cpp
The file was modifiedopenmp/runtime/test/barrier/omp_barrier.c
The file was modifiedopenmp/runtime/src/kmp_wait_release.h
The file was modifiedopenmp/runtime/src/kmp_runtime.cpp
The file was modifiedopenmp/runtime/src/kmp_str.cpp
The file was modifiedopenmp/runtime/src/kmp.h
Commit bf9dcb4cd21513a2b90db8af4f7f0e6769afe205 by zinenko
[mlir] silence -Wunused-variable in Linalg comprehensive bufferize
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
Commit e63b18bc84a27718266f5c838a572ba423f70a2c by jeremy.morse
Catch an extremely obvious memory leak, thanks asan

https://lab.llvm.org/buildbot/#/builders/5/builds/9208

(dbg-phis-merging-in-ldv.mir and dbg-phis-with-loops.mir in the asan
check stage)
The file was modifiedllvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
Commit 7756216547e5cb5eca429e9d7d467058a1472a48 by Louis Dionne
[libc++] NFCI: Remove code duplication and obsolete declarations in wrap_iter

Differential Revision: https://reviews.llvm.org/D105040
The file was modifiedlibcxx/include/__algorithm/inplace_merge.h
The file was modifiedlibcxx/include/__iterator/wrap_iter.h
Commit 58a230455bbc680fc12641d9231dce5dfb907e91 by Louis Dionne
[libc++] Serialize Lit parameters to make them available to from-scratch configs

Before this patch, Lit parameters that were set as a result of CMake
options were not made available to from-scratch configs. This patch
serializes those parameters into the generated lit config file so that
they are available to all configs.

Differential Revision: https://reviews.llvm.org/D105047
The file was modifiedlibcxxabi/test/CMakeLists.txt
The file was modifiedlibcxxabi/test/lit.site.cfg.in
The file was modifiedlibunwind/test/lit.site.cfg.in
The file was modifiedlibcxx/test/configs/libcxx-trunk-static.cfg.in
The file was modifiedlibcxx/test/configs/libcxx-trunk-shared.cfg.in
The file was modifiedlibcxx/test/configs/legacy.cfg.in
The file was modifiedlibunwind/test/libunwind/test/config.py
The file was modifiedlibunwind/test/CMakeLists.txt
The file was modifiedlibcxx/test/CMakeLists.txt
Commit c33ebad73516ffcf7b00821a430aa6a0199941f0 by v.g.vassilev
Print default template argument if manually specified in typedef declaration.

If a default template type argument is manually specified to be of the default
type, then it is committed when printing the template.

Differential revision: https://reviews.llvm.org/D103040
The file was modifiedclang/lib/AST/TypePrinter.cpp
The file was modifiedclang/test/SemaTemplate/class-template-id.cpp
The file was modifiedclang/test/SemaTemplate/default-arguments-ast-print.cpp
Commit e49d65f36d66e247c148601f59edeb2e0b44d8dd by listmail
[LV] Fix bug when unrolling (only) a loop with non-latch exit

If we unroll a loop in the vectorizer (without vectorizing), and the cost model requires a epilogue be generated for correctness, the code generation must actually do so.

The included test case on an unmodified opt will access memory one past the expected bound.  As a result, this patch is fixing a latent miscompile.

Differential Revision: https://reviews.llvm.org/D103700
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/unroll_nonlatch.ll
Commit bd4bfe0e0c3342c613a23a6b2911a97c267a3f99 by flo
[SCCP] Extend tests added 1092357ccdc9 in with UREM/SREM by 0.

Add additional coverage for computing UREM/SREM C, 0.
The file was modifiedllvm/test/Transforms/SCCP/binaryops-range-special-cases.ll
Commit e88ac7295fa298c336cb57d65bdcc72b45dbc0b0 by ezhulenev
[perf] Fix a data race in the PerfJITEventListener

Concurrent JIT compilation + PerfJITEventListener triggers tsan error

Reviewed By: cota

Differential Revision: https://reviews.llvm.org/D104977
The file was modifiedllvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp
Commit d03aa7d6b66fd741db2d937c18a6c6675037b888 by Louis Dionne
[libc++] NFCI: Remove __functional/search.h

The __search helper function was once split into __functional for circular
dependency reasons, however this is not an issue anymore now that we have
finer grained headers.
The file was modifiedlibcxx/include/functional
The file was modifiedlibcxx/include/CMakeLists.txt
The file was removedlibcxx/include/__functional/search.h
The file was modifiedlibcxx/include/experimental/functional
The file was modifiedlibcxx/include/module.modulemap
The file was modifiedlibcxx/include/__algorithm/search.h
The file was modifiedlibcxx/include/regex
Commit 2a063173c159cf80ebb0b8ee6f1b3db519c0f111 by llvmgnsyncbot
[gn build] Port d03aa7d6b66f
The file was modifiedllvm/utils/gn/secondary/libcxx/include/BUILD.gn
Commit aaf6a7ac344c62e26903161ea3daa4b52c423369 by david.green
[ARM] Extra test for gep immediate costs. NFC
The file was addedllvm/test/CodeGen/ARM/gep-imm.ll
Commit f38a8b54ea31d6c915e2d6e259ebc083883e6f6d by Piotr Sobczak
[AMDGPU] Fix 224-bit spills

Related to D104622.

Differential Revision: https://reviews.llvm.org/D105109
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
The file was addedllvm/test/CodeGen/AMDGPU/spill224.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp
Commit 56fa49878b71a1d92b9a93b586cff26829abe157 by gbreynoo
[llvm-objdump] Add testing for --print-imm-hex, --headers, --section-headers and --private-headers

llvm-objdump had some missing coverage that is fixed by this change:
- A test specifically for --print-imm-hex, and coverage of --no-print-imm-hex
- section-headers.test checks the aliases --headers or --section-headers
- A test for the use of --private-headers for ELF that checks the output
- A test for ELF program headers

Differential Revision: https://reviews.llvm.org/D103974
The file was addedllvm/test/tools/llvm-objdump/X86/print-imm-hex.s
The file was addedllvm/test/tools/llvm-objdump/ELF/program-headers.test
The file was modifiedllvm/test/tools/llvm-objdump/section-headers.test
The file was addedllvm/test/tools/llvm-objdump/ELF/private-headers.test
Commit a37f558682e479686cf1644a6aa70b8f46fa1b6a by gbreynoo
[llvm-objdump] Add --no-print-imm-hex to the command guide

The option --no-print-imm-hex was not included in the command guide for
llvm-objdump but appears in the help text. This commit adds it to the
command guide.

Differential Revision: https://reviews.llvm.org/D104717
The file was modifiedllvm/docs/CommandGuide/llvm-objdump.rst
Commit a8f819c6d85e1990954d8846dac769bb789d2ba9 by ezhulenev
[mlir:Async] Remove async operations if it is statically known that the parallel operation has a single compute block

Depends On D104850

Add a test that verifies that canonicalization removes all async overheads if it is statically known that the scf.parallel operation will be computed using a single block.

Reviewed By: herhut

Differential Revision: https://reviews.llvm.org/D104891
The file was modifiedmlir/lib/Dialect/Async/IR/Async.cpp
The file was modifiedmlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp
The file was modifiedmlir/include/mlir/Dialect/Async/IR/Async.h
The file was modifiedmlir/test/Dialect/Async/async-parallel-for-async-dispatch.mlir
The file was addedmlir/test/Dialect/Async/async-parallel-for-canonicalize.mlir
The file was modifiedmlir/include/mlir/Dialect/Async/IR/AsyncOps.td
Commit 6088f86a2e1ce3ab6fe9573e26fc63a5cf338fa9 by ezhulenev
[mlir:Async] Convert AsyncParallelFor pass to ModuleOp pass

Depends On D104891

Outlining scf.parallel body as a function requires async-parallel-for pass to be a ModuleOp pass

Reviewed By: bondhugula

Differential Revision: https://reviews.llvm.org/D104998
The file was modifiedmlir/include/mlir/Dialect/Async/Passes.td
Commit 9ccdaac8f9d5b06c35a18180c517342c435d75a1 by ezhulenev
[mlir:Async] Fix a bug in automatic refence counting around function calls

Depends On D104998

Function calls "transfer ownership" to the callee and it puts additional constraints on the reference counting optimization pass

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D104999
The file was modifiedmlir/test/Dialect/Async/async-runtime-ref-counting-opt.mlir
The file was modifiedmlir/lib/Dialect/Async/Transforms/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Async/Transforms/AsyncRuntimeRefCountingOpt.cpp
The file was modifiedmlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-1d.mlir
The file was modifiedmlir/test/Integration/Dialect/Async/CPU/microbench-linalg-async-parallel-for.mlir
The file was modifiedmlir/test/Integration/Dialect/Async/CPU/microbench-scf-async-parallel-for.mlir
The file was modifiedmlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-2d.mlir
Commit 287847dace4408a0e4e4bfbed7db4a4d1f3eba29 by arthur.j.odwyer
[libc++] Update ABI docs. NFCI.

Differential Revision: https://reviews.llvm.org/D103160
The file was modifiedlibcxx/docs/DesignDocs/ABIVersioning.rst