Changes

Summary

  1. [SLP][NFC]Add a test for split loads, NFC. (details)
  2. [lld-macho] Change personalities entry type to Ptr to avoid overflowing uint32 (details)
  3. Rorder mmt4d iteration domain (details)
  4. [clang] Fix typos in Options.td and regen ClangCommandLineReference.rst. (details)
  5. [clang] Fix a typo in the manual page: s/contraint/constraint. (details)
  6. Refactor AsyncToAsyncRuntime pass to boost understandability. (details)
  7. [GlobalISel] Add GPtrAdd and use it in some combines. (details)
  8. [MLIR][python] Export CAPI headers. (details)
  9. [InstSimplify] Don't assume parent function when simplifying llvm.vscale. (details)
  10. [OpenMP] libomp: Add new experimental barrier: two-level distributed barrier (details)
  11. Revert "Revert "[clang][pp] adds '#pragma include_instead'"" (details)
  12. Revert "[AIX] Pass the -b option to linker on AIX" (details)
  13. Fixing an infinite loop problem in InstCombine (details)
  14. Fix runtime internal error with certain intrinsics that can take a scalar (details)
  15. [DWARF] Refactor test to remove relocations for DWO (details)
  16. [LLDB][GUI] Add Create Target form (details)
  17. [LLDB][GUI] Add Environment Variable Field (details)
  18. [mlir] Fix CMake option for enabling SPIR-V CPU runner (details)
  19. [mlir] NFC: split Math to SPIR-V conversion into their own files (details)
  20. [mlir] NFC: split MemRef to SPIR-V conversion into their own files (details)
  21. [GlobalISel] Use GMergeLikeOp to simplify a combine. NFC. (details)
  22. [lldb] Remove CPlusPlusLanguage from Mangled (details)
  23. [compiler-rt][hwasan] Check for SANITIZER_POSIX before including sanitizer_posix.h (details)
  24. [ELF] Add -Bsymbolic-non-weak-functions (details)
  25. [mlir][linalg] Fix pad tensor cast folding with changed type (details)
  26. [GWP-ASan] Add version header. (details)
  27. [ARM] Define a couple more ssub indexes. NFC (details)
  28. Fix unit test checks for the scalar cases of all/any intrinsics. I (details)
  29. Simplify testcase to use v instead of p (NFC) (details)
  30. [MLIR][Python] Use DEST_PREFIX when installing. (details)
Commit 916d5b9098425b08e74dfd4ee336385c1f731a8b by a.bataev
[SLP][NFC]Add a test for split loads, NFC.
The file was addedllvm/test/Transforms/SLPVectorizer/X86/split-load8_2-unord.ll
Commit 0bd14711ac4a5d7974473b32b0b5315b054cb77e by vyng
[lld-macho] Change personalities entry type to Ptr to avoid overflowing uint32

PR51262

Differential Revision: https://reviews.llvm.org/D107035
The file was modifiedlld/MachO/UnwindInfoSection.cpp
Commit 8a0d6e839f0f1a159284d03e45b9297e48c0615c by ataei
Rorder mmt4d iteration domain

Move tile iterators to outer most dim

Reviewed By: rsuderman

Differential Revision: https://reviews.llvm.org/D107003
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgNamedStructuredOps.yaml
The file was modifiedmlir/python/mlir/dialects/linalg/opdsl/ops/core_named_ops.py
Commit bc96aa9f2c9b25ae65a7e05dbbff8c28079db9c9 by mgorny
[clang] Fix typos in Options.td and regen ClangCommandLineReference.rst.

Differential Revision: https://reviews.llvm.org/D106664
The file was modifiedclang/docs/ClangCommandLineReference.rst
The file was modifiedclang/include/clang/Driver/Options.td
Commit 1862ffe25a2e927ecae012f5f0c4cdf7c3fc1b67 by mgorny
[clang] Fix a typo in the manual page: s/contraint/constraint.

While there, update hardcoded Clang version from 3.5 to 13.

Differential Revision: https://reviews.llvm.org/D106867
The file was modifiedclang/tools/scan-build/man/scan-build.1
Commit 1c144410e791032dfea7dc744518a2c051ec0510 by ezhulenev
Refactor AsyncToAsyncRuntime pass to boost understandability.

Depends On D106730

Reviewed By: ezhulenev

Differential Revision: https://reviews.llvm.org/D106731
The file was modifiedmlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
The file was modifiedmlir/test/Dialect/Async/async-to-async-runtime-eliminate-blocking.mlir
The file was modifiedmlir/test/Dialect/Async/async-to-async-runtime.mlir
Commit 532c458fa8903deb83a0cbc487dcf51858939172 by Amara Emerson
[GlobalISel] Add GPtrAdd and use it in some combines.
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/GenericMachineInstrs.h
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
Commit 5b2e7f50a6798fd9b9c79d9d62fdebcd9e78525b by stellaraccident
[MLIR][python] Export CAPI headers.

* Adds source targets (not included in the full set that downstreams use by default) to bundle mlir-c/ headers into the mlir/_mlir_libs/include directory.
* Adds a minimal entry point to get include and library directories.
* Used by npcomp to export a full CAPI (which is then used by the Torch extension to link npcomp).

Reviewed By: mikeurbach

Differential Revision: https://reviews.llvm.org/D107090
The file was modifiedmlir/cmake/modules/AddMLIRPython.cmake
The file was modifiedmlir/python/mlir/_mlir_libs/__init__.py
The file was addedmlir/test/python/develoment_files.py
The file was modifiedmlir/python/CMakeLists.txt
Commit 84a4caeb84d31550790d6922903714b6563469c9 by sander.desmalen
[InstSimplify] Don't assume parent function when simplifying llvm.vscale.

D106850 introduced a simplification for llvm.vscale by looking at the
surrounding function's vscale_range attributes. The call that's being
simplified may not yet have been inserted into the IR. This happens for
example during function cloning.

This patch fixes the issue by checking if the instruction is in a
parent basic block.
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/unittests/Transforms/Utils/LocalTest.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/fold-vscale.ll
Commit d8e4cb912180ce0a35d31b616e6f4c0c3d64abb7 by jonathan.l.peyton
[OpenMP] libomp: Add new experimental barrier: two-level distributed barrier

Two-level distributed barrier is a new experimental barrier designed
for Intel hardware that has better performance in some cases than the
default hyper barrier.

This barrier is designed to handle fine granularity parallelism where
barriers are used frequently with little compute and memory access
between barriers. There is no need to use it for codes with few
barriers and large granularity compute, or memory intensive
applications, as little difference will be seen between this barrier
and the default hyper barrier. This barrier is designed to work
optimally with a fixed number of threads, and has a significant setup
time, so should NOT be used in situations where the number of threads
in a team is varied frequently.

The two-level distributed barrier is off by default -- hyper barrier
is used by default. To use this barrier, you must set all barrier
patterns to use this type, because it will not work with other barrier
patterns. Thus, to turn it on, the following settings are required:

KMP_FORKJOIN_BARRIER_PATTERN=dist,dist
KMP_PLAIN_BARRIER_PATTERN=dist,dist
KMP_REDUCTION_BARRIER_PATTERN=dist,dist

Branching factors (set with KMP_FORKJOIN_BARRIER, KMP_PLAIN_BARRIER,
and KMP_REDUCTION_BARRIER) are ignored by the two-level distributed
barrier.

Patch fixed for ITTNotify disabled builds and non-x86 builds

Co-authored-by: Jonathan Peyton <jonathan.l.peyton@intel.com>
Co-authored-by: Vladislav Vinogradov <vlad.vinogradov@intel.com>

Differential Revision: https://reviews.llvm.org/D103121
The file was modifiedopenmp/runtime/src/kmp_config.h.cmake
The file was modifiedopenmp/runtime/src/z_Windows_NT_util.cpp
The file was modifiedopenmp/runtime/src/kmp_runtime.cpp
The file was modifiedopenmp/runtime/src/kmp_atomic.cpp
The file was modifiedopenmp/runtime/src/kmp_barrier.cpp
The file was modifiedopenmp/runtime/src/kmp_str.h
The file was modifiedopenmp/runtime/cmake/config-ix.cmake
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.h
The file was modifiedopenmp/runtime/src/kmp_wait_release.cpp
The file was modifiedopenmp/runtime/src/kmp_os.h
The file was modifiedopenmp/runtime/src/kmp_global.cpp
The file was modifiedopenmp/runtime/src/kmp_tasking.cpp
The file was modifiedopenmp/runtime/src/kmp_str.cpp
The file was addedopenmp/runtime/src/kmp_barrier.h
The file was modifiedopenmp/runtime/src/kmp_settings.cpp
The file was modifiedopenmp/runtime/test/barrier/omp_barrier.c
The file was modifiedopenmp/runtime/src/i18n/en_US.txt
The file was modifiedopenmp/runtime/src/kmp_wait_release.h
Commit 087195419719e908394081b4cc6f365170b9882c by cjdb
Revert "Revert "[clang][pp] adds '#pragma include_instead'""

Includes regression test for problem noted by @hans.
This reverts commit 973de7185606a21fd5e9d5e8c014fbf898c0e72f.

Differential Revision: https://reviews.llvm.org/D106898
The file was modifiedclang/lib/Lex/PPLexerChange.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticLexKinds.td
The file was modifiedclang/lib/Lex/PPDirectives.cpp
The file was addedclang/test/Preprocessor/Inputs/include_instead/private1.h
The file was addedclang/test/Preprocessor/include_instead_file_not_found.cpp
The file was addedclang/test/Preprocessor/Inputs/include_instead/public-after.h
The file was addedclang/test/Preprocessor/Inputs/include_instead/public-before.h
The file was modifiedclang/lib/Lex/Pragma.cpp
The file was addedclang/test/PCH/ms-pch-macro-include_instead-regression.c
The file was modifiedclang/include/clang/Lex/Preprocessor.h
The file was modifiedclang/include/clang/Lex/PreprocessorLexer.h
The file was addedclang/test/Preprocessor/Inputs/include_instead/public-empty.h
The file was modifiedclang/include/clang/Lex/HeaderSearch.h
The file was addedclang/test/Preprocessor/Inputs/include_instead/private2.h
The file was addedclang/test/Preprocessor/Inputs/include_instead/non-system-header.h
The file was addedclang/test/Preprocessor/Inputs/include_instead/private3.h
The file was addedclang/test/Preprocessor/Inputs/include_instead/private-x.h
The file was addedclang/test/Preprocessor/Inputs/include_instead/bad-syntax.h
The file was modifiedclang/lib/Lex/Lexer.cpp
The file was addedclang/test/Preprocessor/include_instead.cpp
The file was addedclang/test/Preprocessor/Inputs/include_instead/file-not-found.h
Commit 7645cdcb482694d30771c3409e43ebf2a448211f by anjankumar.g.k
Revert "[AIX] Pass the -b option to linker on AIX"

This reverts commit 109954410c34434a181f5eb48cbd14f4122101c7.
The file was modifiedclang/test/Driver/Xlinker-args.c
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
The file was modifiedclang/include/clang/Driver/Options.td
Commit b4d945bacdaf2c60dd5fdb119b90cced73c41beb by andrew.kaylor
Fixing an infinite loop problem in InstCombine

Patch by Mohammad Fawaz

This issues started happening after
https://github.com/llvm/llvm-project/commit/b373b5990d5991a920c421b21a352e4ccf4c4993
Basically, if the memcpy is volatile, the collectUsers() function should
return false, just like we do for volatile loads.

Differential Revision: https://reviews.llvm.org/D106950
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
The file was modifiedllvm/test/Transforms/InstCombine/memcpy-from-global.ll
Commit 1dbc9b534b2a4903af0f98bde72b8f6da797bc19 by leairmark
Fix runtime internal error with certain intrinsics that can take a scalar
result descriptor (e.g., maxloc, minloc, maxval, minval, all, any, count,
parity, findloc, etc.)

Also add a scalar case for these intrinsic unit tests.

Differential Revision: https://reviews.llvm.org/D106820
The file was modifiedflang/unittests/RuntimeGTest/Reduction.cpp
The file was modifiedflang/runtime/reduction-templates.h
The file was modifiedflang/runtime/reduction.cpp
Commit 585663225287ec9a26ead936a8424fc0e8a175da by ayermolo
[DWARF] Refactor test to remove relocations for DWO

The way this test generates object file results in relocation sections for .dwo sections. This is not legal. Re-wrote it to avoid those relocation sections.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D107012
The file was modifiedllvm/test/DebugInfo/X86/dwarfdump-header.s
Commit 18c25cd376b6ea38971abb407751cdf08e1e5622 by gclayton
[LLDB][GUI] Add Create Target form

This patch adds a Create Target form for the LLDB GUI. Additionally, an
Arch Field was introduced to input an arch and the file and directory
fields now have a required property.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D106192
The file was modifiedlldb/source/Core/IOHandlerCursesGUI.cpp
Commit 62bd33158d924f907dfe2ccd250f20ddb8ed09a9 by gclayton
[LLDB][GUI] Add Environment Variable Field

This patch adds an environment variable field. This is usually used as
the basic type of a List field. This is needed to create the process
launch form.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D106999
The file was modifiedlldb/source/Core/IOHandlerCursesGUI.cpp
Commit 256a83b0838d41a1ac6c3d89060d5bf84255dab9 by antiagainst
[mlir] Fix CMake option for enabling SPIR-V CPU runner

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D107092
The file was modifiedmlir/tools/mlir-spirv-cpu-runner/CMakeLists.txt
Commit 995c3984efe3e55c97202335f21d4a14376be995 by antiagainst
[mlir] NFC: split Math to SPIR-V conversion into their own files

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D107093
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.cpp
The file was addedmlir/test/Conversion/MathToSPIRV/math-to-spirv.mlir
The file was addedmlir/lib/Conversion/MathToSPIRV/MathToSPIRVPass.cpp
The file was modifiedmlir/test/Conversion/StandardToSPIRV/std-ops-to-spirv.mlir
The file was addedmlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
The file was addedmlir/lib/Conversion/MathToSPIRV/CMakeLists.txt
The file was addedmlir/include/mlir/Conversion/MathToSPIRV/MathToSPIRVPass.h
The file was modifiedutils/bazel/llvm-project-overlay/mlir/BUILD.bazel
The file was addedmlir/include/mlir/Conversion/MathToSPIRV/MathToSPIRV.h
The file was modifiedmlir/include/mlir/Conversion/Passes.h
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
Commit 26be7fe27c66a4db21ca2290ade10b171513177f by antiagainst
[mlir] NFC: split MemRef to SPIR-V conversion into their own files

Reviewed By: hanchung

Differential Revision: https://reviews.llvm.org/D107094
The file was addedmlir/include/mlir/Conversion/MemRefToSPIRV/MemRefToSPIRVPass.h
The file was modifiedutils/bazel/llvm-project-overlay/mlir/BUILD.bazel
The file was addedmlir/test/Conversion/MemRefToSPIRV/alloc.mlir
The file was addedmlir/lib/Conversion/MemRefToSPIRV/CMakeLists.txt
The file was addedmlir/include/mlir/Conversion/MemRefToSPIRV/MemRefToSPIRV.h
The file was modifiedmlir/test/Conversion/StandardToSPIRV/std-ops-to-spirv.mlir
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
The file was addedmlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was modifiedmlir/lib/Conversion/GPUToSPIRV/GPUToSPIRVPass.cpp
The file was addedmlir/test/Conversion/MemRefToSPIRV/memref-to-spirv.mlir
The file was addedmlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRVPass.cpp
The file was modifiedmlir/include/mlir/Conversion/Passes.h
The file was modifiedmlir/lib/Conversion/SCFToSPIRV/SCFToSPIRVPass.cpp
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.cpp
The file was removedmlir/test/Conversion/StandardToSPIRV/alloc.mlir
The file was modifiedmlir/lib/Conversion/SCFToSPIRV/CMakeLists.txt
Commit c54d5c97564bf8797f2c97ea75bae14b47196d18 by Amara Emerson
[GlobalISel] Use GMergeLikeOp to simplify a combine. NFC.
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
Commit 993220a99ccef6657d6d5d04dc51c06255f285f2 by apl
[lldb] Remove CPlusPlusLanguage from Mangled

The only remaining plugin dependency in Mangled is CPlusPlusLanguage which it
uses to extract information from C++ mangled names. The static function
GetDemangledNameWithoutArguments is written specifically for C++, so it
would make sense for this specific functionality to live in a
C++-related plugin. In order to keep this functionality in Mangled
without maintaining this dependency, I added
`Language::GetDemangledFunctionNameWithoutArguments`.

Differential Revision: https://reviews.llvm.org/D105215
The file was modifiedlldb/include/lldb/Target/Language.h
The file was modifiedlldb/source/Core/Mangled.cpp
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp
Commit 321a04bf62b247db853d136df43d3cdd58d88c53 by leonardchan
[compiler-rt][hwasan] Check for SANITIZER_POSIX before including sanitizer_posix.h

Rather than throwing an error. This way we can still use files like
hwasan_dynamic_shadow.cpp for other platforms without leading to a
preprocessor error.

Differential Revision: https://reviews.llvm.org/D106979
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_posix.h
Commit b06426da764a8d0254521b33d667db8f26ae5e2f by i
[ELF] Add -Bsymbolic-non-weak-functions

This option is a subset of -Bsymbolic-functions. It applies to STB_GLOBAL
STT_FUNC definitions.

The address of a vague linkage function (STB_WEAK STT_FUNC, e.g. an inline
function, a template instantiation) seen by a -Bsymbolic-functions linked
shared object may be different from the address seen from outside the shared
object. Such cases are uncommon. (ELF/Mach-O programs may use
`-fvisibility-inlines-hidden` to break such pointer equality.  On Windows,
correct dllexport and dllimport are needed to make pointer equality work.
Windows link.exe enables /OPT:ICF by default so different inline functions may
have the same address.)

```
// a.cc -> a.o -> a.so (-Bsymbolic-functions)
inline void f() {}
void *g() { return (void *)&f; }

// b.cc -> b.o -> exe
// The address is different!
inline void f() {}
```

-Bsymbolic-non-weak-functions is a safer (C++ conforming) subset of
-Bsymbolic-functions, which can make such programs work.

Implementations usually emit a vague linkage definition in a COMDAT group.  We
could detect the group (with more code) but I feel that we should just check
STB_WEAK for simplicity. A weak definition will thus serve as an escape hatch
for rare cases when users want interposition on definitions.

GNU ld feature request: https://sourceware.org/bugzilla/show_bug.cgi?id=27871

Longer write-up: https://maskray.me/blog/2021-05-16-elf-interposition-and-bsymbolic

If Linux distributions migrate to protected non-vague-linkage external linkage
functions by default, the linker option can still be handy because it allows
rapid experiment without recompilation. Protected function addresses currently
have deep issues in GNU ld.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D102570
The file was modifiedlld/test/ELF/bsymbolic.s
The file was modifiedlld/ELF/Driver.cpp
The file was modifiedlld/docs/ReleaseNotes.rst
The file was modifiedlld/ELF/Symbols.cpp
The file was modifiedlld/docs/ld.lld.1
The file was modifiedlld/ELF/Config.h
The file was modifiedlld/ELF/SyntheticSections.cpp
The file was modifiedlld/ELF/Options.td
Commit 9a824823131600bca71406f533c2ba051c23c7d7 by cathyzhyi
[mlir][linalg] Fix pad tensor cast folding with changed type

`PadTensorOp` has verification logic to make sure
result dim must be static if all the padding values are static.
Cast folding might add more static information for the src operand
of `PadTensorOp` which might change a valid operation to be invalid.
Change the canonicalizing pattern to fix this.
The file was modifiedmlir/test/Dialect/Linalg/canonicalize.mlir
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Commit 8e167f66b27fe9d2573eb149f736700302675297 by 31459023+hctim
[GWP-ASan] Add version header.

Adds magic version header to AllocatorState. This can be used by
out-of-process crash handlers, like Crashpad on Fuchsia, to do offline
reconstruction of GWP-ASan crash metadata.

Crashpad on Fuchsia is intending on dumping the AllocationMetadata pool
and the AllocatorState directly into the minidump. Then, using the
version number, they can unpack the data on serverside using a versioned
unpack tool.

Also add some asserts to make sure the version number gets bumped if the
internal structs get changed.

Reviewed By: eugenis, mcgrathr

Differential Revision: https://reviews.llvm.org/D106690
The file was modifiedcompiler-rt/lib/gwp_asan/common.h
Commit d4a2daa919272081582c6c14141dd57a6eab9832 by david.green
[ARM] Define a couple more ssub indexes. NFC

Same as 91bd3ad128f7b3b28bd98242e9a5df214eb04eea, this doesn't really
change anything but gives the registers better names than the ones
tablegen would define. And fills in the missing gaps.
The file was modifiedllvm/lib/Target/ARM/ARMRegisterInfo.td
Commit 2ca8295c860f1e8e300c2fde5c4e84b72d8248aa by leairmark
Fix unit test checks for the scalar cases of all/any intrinsics. I
accidentally used int64 when they should have been int32. This lead to
a Windows build unit test error (Linux did not catch the problem).

Differential Revision: https://reviews.llvm.org/D107107
The file was modifiedflang/unittests/RuntimeGTest/Reduction.cpp
Commit 26ba774f6865f0c6bb15dbbe80dc23e1db33d54b by Adrian Prantl
Simplify testcase to use v instead of p (NFC)
The file was modifiedlldb/test/API/commands/process/attach/TestProcessAttach.py
Commit cf36ab1d6c39e80a70b5a1dc80120cccccb5301c by stellaraccident
[MLIR][Python] Use DEST_PREFIX when installing.

Differential Revision: https://reviews.llvm.org/D107100
The file was modifiedmlir/cmake/modules/AddMLIRPython.cmake