Changes

Summary

  1. [flang][openacc] Handle array section and derived-type components operands (details)
  2. [ADT] Implement Optional::transform (details)
  3. Use Optional::transform instead of Optional::map (NFC) (details)
  4. [MC] Leverage constexpr `std::array` in `SubtargetFeature.h` (details)
  5. [OpenMP] Fix another after scope after D129608 (details)
  6. __has_trivial_copy should map to __is_trivially_copyable (details)
  7. [llvm] Qualify auto in range-based for loops (NFC) (details)
  8. [clangd] Drop unnecessary const from return types (NFC) (details)
  9. Ensure newlines at the end of files (NFC) (details)
  10. Remove unused forward declarations (NFC) (details)
  11. Use llvm::erase_if (NFC) (details)
  12. Use llvm::erase_value (NFC) (details)
  13. [X86] Add test coverage for add/sub/mul with freeze (details)
  14. [DAG] canCreateUndefOrPoison - add freeze(add/sub/mul(x,y)) -> add/sub/mul(freeze(x),y,z) support (details)
  15. [AArch64] Fix signed integer overflow in CSINC case (details)
  16. [libc++] Add a bunch of missing _LIBCPP_HIDE_FROM_ABI (details)
  17. [libc++] Implement `operator<=>` for `thread::id` (details)
  18. [llvm-readobj] Remove unused member variable. NFC (details)
  19. fix some bad logic that was removing all successor phi nodes, not just (details)
  20. [llvm] Update FileSystem test that failed spuriously (details)
  21. [X86][FP16] Promote FP16->[U]INT to FP16->FP32->[U]INT (details)
  22. [Triple] Add llvm::Triple::isRISCV{32,64} (details)
Commit 83fa97567949ce16d58b62ecff48930efb1d80bb by clementval
[flang][openacc] Handle array section and derived-type components operands

This patch lowers correctly operands with array section
and derived-type component.

Depends on D131764

Reviewed By: razvanlupusoru

Differential Revision: https://reviews.llvm.org/D131765
The file was modifiedflang/test/Semantics/OpenACC/acc-data.f90
The file was modifiedflang/lib/Lower/Bridge.cpp
The file was addedflang/test/Lower/OpenACC/acc-data-operands.f90
The file was modifiedflang/lib/Lower/OpenACC.cpp
The file was modifiedflang/include/flang/Lower/OpenACC.h
Commit 2a4748576e4f734a15c9b0553eec602dd6f03633 by kazu
[ADT] Implement Optional::transform

This patch implements Optional::transform for consistency with
std::optional::transform in C++23.

Note that the new function is identical to Optional::map.  My plan is
to deprecate Optional::map after migrating all of its uses to
Optional::transform.

Differential Revision: https://reviews.llvm.org/D131829
The file was modifiedllvm/include/llvm/ADT/Optional.h
The file was modifiedllvm/unittests/ADT/OptionalTest.cpp
Commit 2117fcb1c06207b5eea09b66fb8e0ff58314afa8 by kazu
Use Optional::transform instead of Optional::map (NFC)

I'm planning to deprecate map in favor of transform for consistency
with std::optional::transform in C++23.
The file was modifiedclang/include/clang/AST/PropertiesBase.td
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
The file was modifiedclang-tools-extra/clang-tidy/bugprone/ReservedIdentifierCheck.cpp
The file was modifiedclang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h
Commit 9a750334022a4ab33808555b685b5f35714fe254 by joeloser93
[MC] Leverage constexpr `std::array` in `SubtargetFeature.h`

Replace C-style array with `std::array` since `std::array<T, N>::operator[]` is
`constexpr` in C++17. This also allows us to replace `array_lengthof` calls with
member `size()` function.

Differential Revision: https://reviews.llvm.org/D131826
The file was modifiedllvm/include/llvm/MC/SubtargetFeature.h
Commit 2f9be69d843d12864128f4e23920ba214c5e212d by Vitaly Buka
[OpenMP] Fix another after scope after D129608

https://lab.llvm.org/buildbot/#/builders/5/builds/26770
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp
Commit 64f0f7e6460019a38fe2f1cbe4b9446a3268af18 by roi.jacobson1
 __has_trivial_copy should map to __is_trivially_copyable

Found during clang 15 RC1 testing due to the new diagnostic added by @royjacobson since clang 14.  Uncertain if this fix meets the bar to also be applied to the release branch.

If accepted, I'll need someone with commit access to submit on my behalf.

Reviewed By: royjacobson, aaron.ballman, erichkeane

Differential Revision: https://reviews.llvm.org/D131730
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp
The file was modifiedclang/docs/LanguageExtensions.rst
The file was modifiedclang/test/SemaCXX/deprecated-builtins.cpp
Commit 109df7f9a4a894cca7aaf60667721c32bb574c8f by kazu
[llvm] Qualify auto in range-based for loops (NFC)

Identified with readability-qualified-auto.
The file was modifiedllvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
The file was modifiedllvm/lib/Object/WindowsResource.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64FastISel.cpp
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
The file was modifiedllvm/lib/Transforms/IPO/GlobalOpt.cpp
The file was modifiedllvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
The file was modifiedllvm/lib/IR/Verifier.cpp
The file was modifiedllvm/lib/Target/AMDGPU/GCNIterativeScheduler.cpp
The file was modifiedllvm/lib/Target/AMDGPU/GCNMinRegStrategy.cpp
The file was modifiedllvm/lib/Transforms/Utils/CodeExtractor.cpp
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFTypePrinter.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64SIMDInstrOpt.cpp
The file was modifiedllvm/lib/Transforms/Utils/SplitModule.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/SpeculateAnalyses.cpp
The file was modifiedllvm/lib/Linker/IRMover.cpp
The file was modifiedllvm/lib/ProfileData/GCOV.cpp
The file was modifiedllvm/lib/Target/X86/X86VZeroUpper.cpp
The file was modifiedllvm/lib/Transforms/Utils/CodeMoverUtils.cpp
The file was modifiedllvm/lib/Target/AMDGPU/GCNILPSched.cpp
The file was modifiedllvm/lib/Transforms/Scalar/NewGVN.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/lib/Passes/StandardInstrumentations.cpp
The file was modifiedllvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/lib/MC/MCParser/MasmParser.cpp
The file was modifiedllvm/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedllvm/lib/Target/ARM/ARMAsmPrinter.cpp
The file was modifiedllvm/lib/Support/RISCVISAInfo.cpp
The file was modifiedllvm/lib/Target/TargetLoweringObjectFile.cpp
The file was modifiedllvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
The file was modifiedllvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
Commit 7c6947656496cb66f592e4e556a2f1fa40324b76 by kazu
[clangd] Drop unnecessary const from return types (NFC)

Identified with readability-const-return-type.
The file was modifiedclang-tools-extra/clangd/CompileCommands.cpp
Commit 062f157c7f688dcdbd6a55275034a0d85ac915a8 by kazu
Ensure newlines at the end of files (NFC)
The file was modifiedcompiler-rt/lib/orc/coff_platform.h
Commit 2b43bd0bd98a4ae556b0a75b8016e27a0642b8a4 by kazu
Remove unused forward declarations (NFC)
The file was modifiedclang-tools-extra/pseudo/include/clang-pseudo/DirectiveTree.h
The file was modifiedclang/include/clang/AST/Stmt.h
The file was modifiedclang/lib/CodeGen/CGHLSLRuntime.h
Commit 2febc32c9c7dd9d23bb340568ef3178331d9afbe by kazu
Use llvm::erase_if (NFC)
The file was modifiedclang/include/clang/Basic/JsonSupport.h
The file was modifiedbolt/lib/Core/FunctionLayout.cpp
The file was modifiedclang-tools-extra/clang-tidy/bugprone/ParentVirtualCallCheck.cpp
The file was modifiedllvm/tools/llvm-nm/llvm-nm.cpp
The file was modifiedclang/lib/Index/FileIndexRecord.cpp
Commit 448c466636ca8f2415cf60adcbcdde67fa7cbc26 by kazu
Use llvm::erase_value (NFC)
The file was modifiedlldb/source/Host/linux/HostInfoLinux.cpp
The file was modifiedllvm/lib/Transforms/Utils/CodeLayout.cpp
The file was modifiedlldb/source/Target/JITLoaderList.cpp
The file was modifiedllvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
Commit 998853689a79c7a9350424f6162a63ba50e6ac1a by llvm-dev
[X86] Add test coverage for add/sub/mul with freeze
The file was addedllvm/test/CodeGen/X86/freeze-binary.ll
Commit 60534b8879b17dc6925aba9ae3d138db0c8c2655 by llvm-dev
[DAG] canCreateUndefOrPoison - add freeze(add/sub/mul(x,y)) -> add/sub/mul(freeze(x),y,z) support

These are guaranteed not to create undef/poison as long as there are no poison generating flags
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/test/CodeGen/X86/freeze-binary.ll
Commit f1596952f9ff9fcfd5e16c9c8ec4d528e5680e2c by Vitaly Buka
[AArch64] Fix signed integer overflow in CSINC case

https://lab.llvm.org/staging/#/builders/224/builds/2/steps/16/logs/stdio

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D131815
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/arm64-csel.ll
Commit 80c7e93a2a8448fa16fe28b99c733e93ec64df51 by nikolasklauser
[libc++] Add a bunch of missing _LIBCPP_HIDE_FROM_ABI

Reviewed By: ldionne, Mordante, var-const, huixie90, #libc

Spies: jloser, libcxx-commits, arichardson, miyuki

Differential Revision: https://reviews.llvm.org/D129968
The file was modifiedlibcxx/include/__random/chi_squared_distribution.h
The file was modifiedlibcxx/include/__random/bernoulli_distribution.h
The file was modifiedlibcxx/include/__algorithm/sort.h
The file was modifiedlibcxx/include/__algorithm/find_first_of.h
The file was modifiedlibcxx/include/__iterator/common_iterator.h
The file was modifiedlibcxx/include/__algorithm/stable_sort.h
The file was modifiedlibcxx/include/__functional/invoke.h
The file was modifiedlibcxx/include/__tree
The file was modifiedlibcxx/include/__memory/uninitialized_algorithms.h
The file was modifiedlibcxx/include/iomanip
The file was modifiedlibcxx/include/__algorithm/inplace_merge.h
The file was modifiedlibcxx/include/__random/subtract_with_carry_engine.h
The file was modifiedlibcxx/include/__random/binomial_distribution.h
The file was modifiedlibcxx/include/__ranges/iota_view.h
The file was modifiedlibcxx/include/__algorithm/find_end.h
The file was modifiedlibcxx/include/__random/exponential_distribution.h
The file was modifiedlibcxx/include/__algorithm/lexicographical_compare.h
The file was modifiedlibcxx/include/__iterator/counted_iterator.h
The file was modifiedlibcxx/include/unordered_set
The file was modifiedlibcxx/include/__random/normal_distribution.h
The file was modifiedlibcxx/include/__bit_reference
The file was modifiedlibcxx/include/__random/extreme_value_distribution.h
The file was modifiedlibcxx/include/__random/mersenne_twister_engine.h
The file was modifiedlibcxx/include/__random/generate_canonical.h
The file was modifiedlibcxx/include/__string/char_traits.h
The file was modifiedlibcxx/include/__utility/as_const.h
The file was modifiedlibcxx/utils/libcxx/test/features.py
The file was modifiedlibcxx/include/experimental/iterator
The file was modifiedlibcxx/include/ext/hash_map
The file was modifiedlibcxx/include/__numeric/midpoint.h
The file was modifiedlibcxx/include/__algorithm/stable_partition.h
The file was modifiedlibcxx/include/complex
The file was modifiedlibcxx/include/ext/hash_set
The file was modifiedlibcxx/include/mutex
The file was modifiedlibcxx/include/string
The file was modifiedlibcxx/include/__algorithm/partial_sort.h
The file was modifiedlibcxx/include/__algorithm/partition_copy.h
The file was modifiedlibcxx/include/__algorithm/remove_if.h
The file was modifiedlibcxx/utils/libcxx/test/params.py
The file was modifiedlibcxx/include/__algorithm/partition.h
The file was modifiedlibcxx/include/__format/formatter_floating_point.h
The file was modifiedlibcxx/include/__random/discrete_distribution.h
The file was modifiedlibcxx/include/__random/fisher_f_distribution.h
The file was modifiedlibcxx/include/future
The file was modifiedlibcxx/include/__random/geometric_distribution.h
The file was modifiedlibcxx/include/__algorithm/prev_permutation.h
The file was modifiedlibcxx/include/__algorithm/rotate.h
The file was modifiedlibcxx/include/__algorithm/merge.h
The file was modifiedlibcxx/include/__random/negative_binomial_distribution.h
The file was modifiedlibcxx/include/__random/weibull_distribution.h
The file was modifiedlibcxx/include/__algorithm/remove.h
The file was modifiedlibcxx/include/__algorithm/partition_point.h
The file was modifiedlibcxx/include/__algorithm/shuffle.h
The file was modifiedlibcxx/include/cmath
The file was modifiedlibcxx/include/__random/poisson_distribution.h
The file was modifiedlibcxx/include/__random/student_t_distribution.h
The file was modifiedlibcxx/include/__memory/shared_ptr.h
The file was modifiedlibcxx/include/experimental/simd
The file was modifiedlibcxx/include/__random/discard_block_engine.h
The file was modifiedlibcxx/include/__random/linear_congruential_engine.h
The file was modifiedlibcxx/include/forward_list
The file was addedlibcxx/test/libcxx/clang_query/README.md
The file was modifiedlibcxx/include/__random/piecewise_linear_distribution.h
The file was modifiedlibcxx/include/variant
The file was modifiedlibcxx/include/__random/uniform_real_distribution.h
The file was modifiedlibcxx/include/thread
The file was modifiedlibcxx/include/__algorithm/nth_element.h
The file was modifiedlibcxx/include/__chrono/duration.h
The file was modifiedlibcxx/include/deque
The file was modifiedlibcxx/include/__algorithm/next_permutation.h
The file was modifiedlibcxx/include/istream
The file was addedlibcxx/test/libcxx/clang_query/hide_from_abi_or_visible.query
The file was modifiedlibcxx/include/__random/piecewise_constant_distribution.h
The file was modifiedlibcxx/include/unordered_map
The file was addedlibcxx/test/libcxx/clang_query.sh.cpp
The file was modifiedlibcxx/include/__random/independent_bits_engine.h
The file was modifiedlibcxx/include/__algorithm/is_partitioned.h
The file was modifiedlibcxx/include/__algorithm/minmax_element.h
The file was modifiedlibcxx/include/__memory/temporary_buffer.h
The file was modifiedlibcxx/include/cstddef
The file was modifiedlibcxx/include/__algorithm/partial_sort_copy.h
The file was modifiedlibcxx/include/__algorithm/sift_down.h
The file was modifiedlibcxx/include/__random/shuffle_order_engine.h
The file was modifiedlibcxx/include/__type_traits/is_constant_evaluated.h
The file was modifiedlibcxx/include/bitset
The file was modifiedlibcxx/include/exception
The file was modifiedlibcxx/include/ostream
The file was modifiedlibcxx/include/regex
The file was modifiedlibcxx/include/__random/gamma_distribution.h
The file was modifiedlibcxx/include/__random/uniform_int_distribution.h
The file was modifiedlibcxx/include/ios
The file was modifiedlibcxx/include/string_view
The file was modifiedlibcxx/docs/TestingLibcxx.rst
The file was modifiedlibcxx/include/__random/cauchy_distribution.h
Commit 41e7665c4b8ed47d1802b1dc8a41be3eacf805ad by avogelsgesang
[libc++] Implement `operator<=>` for `thread::id`

The new operator<=> is mapped onto the existing functions
__libcpp_thread_id_equal and __libcpp_thread_id_less. Introducing a
new __libcpp_thread_id_compare_three_way might lead to more efficient
code. Given that we can still introduce __libcpp_thread_id_compare_three_way
later, for this commit I opted to not break ABI. If requested, I will
add __libcpp_thread_id_compare_three_way in a follow-up commit.

Implements part of P1614R2 "The Mothership has Landed"

Differential Revision: https://reviews.llvm.org/D131362
The file was removedlibcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/eq.pass.cpp
The file was removedlibcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/lt.pass.cpp
The file was addedlibcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.id/cmp.pass.cpp
The file was modifiedlibcxx/include/thread
The file was modifiedlibcxx/include/__threading_support
The file was modifiedlibcxx/docs/Status/SpaceshipProjects.csv
Commit 83aa91bda0fae725e86982b408770f3f90bcca83 by i
[llvm-readobj] Remove unused member variable. NFC
The file was modifiedllvm/tools/llvm-readobj/COFFDumper.cpp
Commit df308cab28bdf53bb159d2927fc25ffab5a79fe7 by regehr
fix some bad logic that was removing all successor phi nodes, not just
out of chunk ones. the non-default second argument to
removePredecessor() is necessary to avoid creating invalid IR on
examples like the one in the provided test case

Differential Revision: https://reviews.llvm.org/D131843
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
The file was addedllvm/test/tools/llvm-reduce/remove-bbs-nocrash.ll
Commit cf1521e8cc7160008d1f148a159cd64c4a188f5b by blangmuir
[llvm] Update FileSystem test that failed spuriously

This test failed spuriously in an environment that appears to ignore the
'x' bit permission on directories. Allow for that possibility.
The file was modifiedllvm/unittests/Support/Path.cpp
Commit 8b69549dc5c5fa0f5f8632cde1c740bb2c7d8957 by phoebe.wang
[X86][FP16] Promote FP16->[U]INT to FP16->FP32->[U]INT

This is to avoid f16->i64 being lowered to `__fixhfdi/__fixunshfdi` on 32-bits since neither libgcc nor compiler-rt provide them. https://godbolt.org/z/cjWEsea5v

It also helps to improve the performance by promoting the vector type.

Reviewed By: LuoYuanke

Differential Revision: https://reviews.llvm.org/D131828
The file was modifiedllvm/test/CodeGen/X86/half.ll
The file was modifiedllvm/test/CodeGen/X86/vector-half-conversions.ll
The file was modifiedllvm/test/CodeGen/X86/fpclamptosat_vec.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit b2f31cac28c8a03ceb908b544f5790f4f9f2d9ab by i
[Triple] Add llvm::Triple::isRISCV{32,64}

Reviewed By: vitalybuka, MaskRay, craig.topper

Differential Revision: https://reviews.llvm.org/D131339
The file was modifiedllvm/include/llvm/ADT/Triple.h