Changes

Summary

  1. [OMPIRBuilder] Add the support for compare capture (details)
  2. [Object] Fix namespace style issues in D122069 (details)
  3. [RegisterClassInfo] Invalidate cached information if ignoreCSRForAllocationOrder changes (details)
  4. [Polly] Fix -Wreorder-ctor. NFC (details)
  5. [ValueTypes] Define MVTs for v128i2/v64i4 as well as i2 and i4. (details)
  6. LTO: Decide upfront whether to use opaque/non-opaque pointer types (details)
  7. AMDGPU: Fix missing c++ mode comment (details)
  8. AMDGPU: Add release notes about atomic load and store (details)
  9. BranchFolder: Require NoPHIs (details)
  10. [BOLT][DWARF] Fix TU Index handling for DWARF4/5 (details)
  11. Fix DXContainer test on ppcbe (details)
  12. [libc++][test] Enable constexpr string comparison tests (details)
  13. [libc] Add pthread_create and pthread_join functions. (details)
  14. Fix compilation in gold-plugin triggered by D125847 (details)
  15. [memprof] Update summary output. (details)
  16. [LegalizeTypes][VP] Add widen and split support for VP_SIGN_EXTEND and VP_ZERO_EXTEND. (details)
  17. [memprof] Print out the segment information in YAML format. (details)
  18. unbreak Modules/cxx20-export-import.cpp with LLVM_APPEND_VC_REV after 8c8a2679a20f (details)
  19. [libunwind] Add more information to eh_frame_hdr version error (details)
  20. [test] Fix LLVMgold.so tests after D125847 (details)
  21. [mlir] Support convert token type from LLVM IR. (details)
  22. [LSR] Early exit for RateFormula when it is already losing. NFC (details)
Commit eb673be5ac8510646692f82a606a1f2c10f24828 by i
[OMPIRBuilder] Add the support for compare capture

This patch adds the support for `compare capture` in `OMPIRBuilder`.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D120007
The file was modifiedllvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
The file was modifiedllvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
Commit 2108f7a243a5018b4ffc09bcbc2a8bdbe3c9a4d1 by i
[Object] Fix namespace style issues in D122069

https://llvm.org/docs/CodingStandards.html#use-namespace-qualifiers-to-implement-previously-declared-functions
The file was modifiedllvm/lib/Object/OffloadBinary.cpp
Commit 1a155ee7de3b62a2fabee86fb470a1554fadc54d by qcolombet
[RegisterClassInfo] Invalidate cached information if ignoreCSRForAllocationOrder changes

Even if CSR list is same between functions, we could have had a different
allocation order if ignoreCSRForAllocationOrder is evaluated differently.
Hence invalidate cached register class information if
ignoreCSRForAllocationOrder changes.

Patch by Srividya Karumuri <srividya_karumuri@apple.com>

Differential Revision: https://reviews.llvm.org/D126565
The file was modifiedllvm/include/llvm/CodeGen/RegisterClassInfo.h
The file was modifiedllvm/lib/CodeGen/RegisterClassInfo.cpp
Commit 8d3dda7624d2003496babf360c90678fe53c4b14 by i
[Polly] Fix -Wreorder-ctor. NFC
The file was modifiedpolly/lib/Transform/MaximalStaticExpansion.cpp
Commit a92ed167f2c98d332ad7ce5b0544444b8e917bc0 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/AMDGPU/srem-seteq-illegal-types.ll
The file was modifiedllvm/utils/TableGen/IntrinsicEmitter.cpp
The file was modifiedllvm/test/CodeGen/Mips/srem-seteq-illegal-types.ll
The file was modifiedllvm/test/CodeGen/Thumb/srem-seteq-illegal-types.ll
The file was modifiedllvm/test/CodeGen/X86/bitreverse.ll
The file was modifiedllvm/test/CodeGen/X86/srem-seteq-illegal-types.ll
The file was modifiedllvm/utils/TableGen/CodeGenTarget.cpp
The file was modifiedllvm/lib/CodeGen/TargetLoweringBase.cpp
The file was modifiedllvm/lib/CodeGen/ValueTypes.cpp
The file was modifiedllvm/test/CodeGen/RISCV/srem-seteq-illegal-types.ll
The file was modifiedllvm/include/llvm/Support/MachineValueType.h
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/ARM/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/Thumb2/srem-seteq-illegal-types.ll
Commit 850d53a197f9ffbf5708b7bd795056335e81e9b7 by Matthias Braun
LTO: Decide upfront whether to use opaque/non-opaque pointer types

LTO code may end up mixing bitcode files from various sources varying in
their use of opaque pointer types. The current strategy to decide
between opaque / typed pointers upon the first bitcode file loaded does
not work here, since we could be loading a non-opaque bitcode file first
and would then be unable to load any files with opaque pointer types
later.

So for LTO this:
- Adds an `lto::Config::OpaquePointer` option and enforces an upfront
  decision between the two modes.
- Adds `-opaque-pointers`/`-no-opaque-pointers` options to the gold
  plugin; disabled by default.
- `--opaque-pointers`/`--no-opaque-pointers` options with
  `-plugin-opt=-opaque-pointers`/`-plugin-opt=-no-opaque-pointers`
  aliases to lld; disabled by default.
- Adds an `-lto-opaque-pointers` option to the `llvm-lto2` tool.
- Changes the clang driver to pass `-plugin-opt=-opaque-pointers` to
  the linker in LTO modes when clang was configured with opaque
  pointers enabled by default.

This fixes https://github.com/llvm/llvm-project/issues/55377

Differential Revision: https://reviews.llvm.org/D125847
The file was modifiedllvm/test/LTO/Resolution/X86/comdat.ll
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/ipa-alias.ll
The file was modifiedllvm/test/ThinLTO/X86/cfi-unsat.ll
The file was modifiedllvm/test/ThinLTO/X86/index-const-prop-gvref.ll
The file was modifiedlld/test/ELF/lto/wrap-unreferenced-before-codegen.test
The file was modifiedllvm/test/ThinLTO/X86/Inputs/import-constant.ll
The file was modifiedlld/ELF/LTO.cpp
The file was modifiedllvm/test/LTO/Resolution/X86/ifunc2.ll
The file was modifiedllvm/test/ThinLTO/X86/index-const-prop-linkage.ll
The file was modifiedllvm/test/LTO/Resolution/X86/local-def-dllimport.ll
The file was modifiedclang/test/Driver/arm-float-abi-lto.c
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
The file was modifiedllvm/test/ThinLTO/X86/globals-import-blockaddr.ll
The file was modifiedllvm/test/ThinLTO/X86/import-dsolocal.ll
The file was modifiedlld/ELF/Config.h
The file was modifiedllvm/test/LTO/Resolution/X86/alias-alias.ll
The file was modifiedllvm/test/LTO/X86/cfi_jt_aliases.ll
The file was addedllvm/test/LTO/X86/Inputs/opaque-pointers.ll
The file was modifiedlld/test/ELF/lto/ltopasses-basic.ll
The file was modifiedlld/test/ELF/lto/type-merge2.ll
The file was modifiedllvm/test/ThinLTO/X86/devirt_single_hybrid.ll
The file was modifiedllvm/test/LTO/X86/type-mapping-bug4.ll
The file was modifiedllvm/test/ThinLTO/X86/funcattrs-prop-unknown.ll
The file was modifiedllvm/test/ThinLTO/X86/devirt_promote.ll
The file was modifiedclang/test/CodeGen/thinlto-inline-asm2.c
The file was modifiedllvm/docs/OpaquePointers.rst
The file was modifiedllvm/test/ThinLTO/X86/cfi-devirt.ll
The file was modifiedllvm/test/ThinLTO/X86/devirt2.ll
The file was modifiedllvm/test/ThinLTO/X86/devirt-after-icp.ll
The file was addedclang/test/Driver/lto-no-opaque-pointers.c
The file was modifiedlld/test/ELF/lto/discard-value-names.ll
The file was modifiedlld/test/ELF/lto/type-merge.ll
The file was modifiedlld/ELF/Options.td
The file was addedllvm/test/LTO/X86/mix-opaque-typed.ll
The file was modifiedllvm/tools/gold/gold-plugin.cpp
The file was modifiedllvm/test/ThinLTO/X86/import-constant.ll
The file was modifiedlld/ELF/Driver.cpp
The file was modifiedclang/test/Driver/memtag_lto.c
The file was modifiedllvm/test/ThinLTO/X86/devirt_check.ll
The file was modifiedllvm/tools/llvm-lto2/llvm-lto2.cpp
The file was modifiedllvm/test/ThinLTO/X86/reference_non_importable.ll
The file was modifiedllvm/include/llvm/LTO/Config.h
The file was addedclang/test/Driver/lto-opaque-pointers.c
The file was modifiedllvm/test/ThinLTO/X86/index-const-prop-gvref-pie.ll
The file was modifiedllvm/test/ThinLTO/X86/weak_externals.ll
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/ipa.ll
Commit 89b1808a2f45c81d8604b5b2573535be548cdf4a by Matthew.Arsenault
AMDGPU: Fix missing c++ mode comment
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUMCInstLower.h
Commit 09a539e926c016f947383be4b0bb18e4a5aa94d6 by Matthew.Arsenault
AMDGPU: Add release notes about atomic load and store
The file was modifiedllvm/docs/ReleaseNotes.rst
Commit 4cb722acbccd161bdcde49102bc9645587b808ae by Matthew.Arsenault
BranchFolder: Require NoPHIs

The pass doesn't handle SSA and breaks any phis.
The file was modifiedllvm/lib/CodeGen/BranchFolding.cpp
The file was addedllvm/test/CodeGen/AMDGPU/branch-folder-requires-no-phis.mir
Commit ab9a17599021a4459e23e3a1d7aa57e9413baab5 by ayermolo
[BOLT][DWARF] Fix TU Index handling for DWARF4/5

When we generate split dwarf with -fdebug-types-section we will have
.debug_types.dwo sections. These go into TU Index when we run llvm-dwp. BOLT was
not handling DWP input correctly with this section.

Added support for handling DWP with TU Index as an input and output for DWARF4.
Added support for handling DWP with TU Index as an input for DWARF5

Reviewed By: maksfb

Differential Revision: https://reviews.llvm.org/D126087
The file was modifiedbolt/test/CMakeLists.txt
The file was addedbolt/test/X86/dwarf5-ftypes-dwp-input-dwo-output.test
The file was modifiedbolt/test/lit.cfg.py
The file was addedbolt/test/X86/Inputs/dwarf5-ftypes-split-dwarf.s
The file was modifiedbolt/lib/Rewrite/DWARFRewriter.cpp
The file was addedbolt/test/X86/Inputs/dwarf4-ftypes-split-dwarf.s
The file was modifiedbolt/include/bolt/Rewrite/DWARFRewriter.h
The file was addedbolt/test/X86/dwarf4-ftypes-dwp-input-dwp-output.test
The file was addedbolt/test/X86/dwarf4-ftypes-dwo-input-dwp-output.test
The file was addedbolt/test/X86/dwarf4-ftypes-dwp-input-dwo-output.test
Commit 6784adc63d76e9ac231e1f3f0cdf05c8b5f6c0e9 by chris.bieneman
Fix DXContainer test on ppcbe

Silly mistake, the code here was byteswapping in-place which corrupts
the data structure that is used later to write the correct file.
The file was modifiedllvm/lib/ObjectYAML/DXContainerEmitter.cpp
Commit 93a375a15c8ad4226453b3ec920070b5be361656 by joeloser93
[libc++][test] Enable constexpr string comparison tests

Some tests in `string.view.comparison` are not enabled due to previous lack of
support for `constexpr std::string`. Now that it is implemented, we can enable
these tests.

Differential Revision: https://reviews.llvm.org/D126737
The file was modifiedlibcxx/test/std/strings/string.view/string.view.comparison/less.pass.cpp
The file was modifiedlibcxx/test/std/strings/string.view/string.view.comparison/equal.pass.cpp
The file was modifiedlibcxx/test/std/strings/string.view/string.view.comparison/less_equal.pass.cpp
The file was modifiedlibcxx/test/std/strings/string.view/string.view.comparison/greater.pass.cpp
The file was modifiedlibcxx/test/std/strings/string.view/string.view.comparison/greater_equal.pass.cpp
The file was modifiedlibcxx/test/std/strings/string.view/string.view.comparison/not_equal.pass.cpp
Commit 70c8d12b79a58cf350256bb0a366f0e91000d82e by sivachandra
[libc] Add pthread_create and pthread_join functions.

They do not yet support all the feature/attributes in pthread_attr_t.
Future changes will add such support.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D126718
The file was addedlibc/src/pthread/pthread_create.h
The file was addedlibc/src/pthread/pthread_join.h
The file was modifiedlibc/include/llvm-libc-types/CMakeLists.txt
The file was addedlibc/src/pthread/pthread_create.cpp
The file was modifiedlibc/spec/posix.td
The file was modifiedlibc/src/pthread/CMakeLists.txt
The file was modifiedlibc/config/linux/api.td
The file was addedlibc/src/pthread/pthread_join.cpp
The file was addedlibc/test/src/pthread/pthread_test.cpp
The file was modifiedlibc/include/llvm-libc-types/thrd_t.h
The file was addedlibc/include/llvm-libc-types/__pthread_start_t.h
The file was addedlibc/include/llvm-libc-types/pthread_t.h
The file was modifiedlibc/include/CMakeLists.txt
The file was modifiedlibc/test/src/pthread/CMakeLists.txt
The file was modifiedlibc/test/src/pthread/pthread_mutex_test.cpp
The file was modifiedlibc/config/linux/x86_64/entrypoints.txt
The file was addedlibc/include/llvm-libc-types/__thread_type.h
Commit fe0f2c1e9967030dbe70f95c72f310211caf4668 by Matthias Braun
Fix compilation in gold-plugin triggered by D125847
The file was modifiedllvm/tools/gold/gold-plugin.cpp
Commit 962db7de84d47b0aa461884f3f72844ef9a3f216 by snehasishk
[memprof] Update summary output.

Update the YAML format print out of the profile to include a summary
instead of displaying the headers in the raw file buffer. This allows us
to release the raw buffer early saving memory.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D126834
The file was modifiedllvm/test/tools/llvm-profdata/memprof-inline.test
The file was modifiedllvm/lib/ProfileData/RawMemProfReader.cpp
The file was modifiedllvm/include/llvm/ProfileData/RawMemProfReader.h
The file was modifiedllvm/test/tools/llvm-profdata/memprof-multi.test
The file was modifiedllvm/test/tools/llvm-profdata/memprof-basic.test
Commit 058791d8f2d337c9025b4cb6d7518fe6c8706f67 by jacquesguan
[LegalizeTypes][VP] Add widen and split support for VP_SIGN_EXTEND and VP_ZERO_EXTEND.

Differential Revision: https://reviews.llvm.org/D126442
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-sext-vp.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vzext-vp.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-zext-vp.ll
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vsext-vp.ll
Commit 8a87f42fc6ca14d13454465490dbf47333918907 by snehasishk
[memprof] Print out the segment information in YAML format.

This change prints out the segment information in the raw profile in
YAML format for testing. Since we don't capture build ids yet, we print
out <None> for now.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D126840
The file was modifiedllvm/test/tools/llvm-profdata/memprof-basic.test
The file was modifiedllvm/lib/ProfileData/RawMemProfReader.cpp
The file was modifiedllvm/test/tools/llvm-profdata/memprof-inline.test
Commit 4463bd0f89181234e0cef982e21de2e96038f873 by thakis
unbreak Modules/cxx20-export-import.cpp with LLVM_APPEND_VC_REV after 8c8a2679a20f

See revision b8b7a9dcdcbc for prior art.
The file was modifiedclang/include/clang/Serialization/ASTBitCodes.h
Commit 13b8bfc51451fcfc00f3e3480abaf64b337a43d4 by fmayer
[libunwind] Add more information to eh_frame_hdr version error

This makes it easier to find the offending ELF file.

Reviewed By: #libunwind, MaskRay

Differential Revision: https://reviews.llvm.org/D126841
The file was modifiedlibunwind/src/EHHeaderParser.hpp
Commit 146f7fec952192d3118f84720d0998e1888fb793 by i
[test] Fix LLVMgold.so tests after D125847
The file was modifiedllvm/test/tools/gold/X86/strip_names.ll
The file was modifiedllvm/test/tools/gold/X86/type-merge.ll
The file was modifiedllvm/test/tools/gold/X86/alias2.ll
The file was modifiedllvm/test/tools/gold/X86/thinlto_weak_resolution.ll
The file was modifiedllvm/test/tools/gold/X86/ctors2.ll
The file was modifiedllvm/test/tools/gold/X86/type-merge2.ll
The file was modifiedllvm/test/tools/gold/X86/ctors.ll
The file was modifiedllvm/test/tools/gold/X86/resolve-to-alias.ll
The file was modifiedllvm/test/tools/gold/X86/weak.ll
Commit ce820375efc04a4290f568ac0ba7a74486f598ad by jacquesguan
[mlir] Support convert token type from LLVM IR.

This patch supports the token type for converting from LLVM IR.

Differential Revision: https://reviews.llvm.org/D126756
The file was modifiedmlir/test/Target/LLVMIR/Import/intrinsic.ll
The file was modifiedmlir/lib/Target/LLVMIR/TypeFromLLVM.cpp
Commit 6eab5cade71459bc187eeeb364b9a94972c05696 by eopxd
[LSR] Early exit for RateFormula when it is already losing. NFC

This patch does not effect any behavior of the current code.

The codebase implicitly implies that `Cost::RateFormula` is only called
when the `Cost` is not in losing status, or else there may be possible
to trigger the assertion of `Cost::isValid`.

The intention here is to prevent mis-use where future development
allow `Cost` that is already loser to call `Cost::RateFormula` - Early
exit when `Cost` is already losing.

Reviewed By: Meinersbur, #loopoptwg

Differential Revision: https://reviews.llvm.org/D125670
The file was modifiedllvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp