SuccessChanges

Summary

  1. [InstSimplify] add/move tests for fmin/fmax; NFC (details)
  2. [InstSimplify] reduce code duplication for fmin/fmax folds; NFC (details)
  3. Add support for casting elements in vectors for certain Std dialect type conversion operations. (details)
  4. [libcxx] ostream{,buf}_iterator::difference_type changes in C++20 (details)
  5. Assert we've found the size of each (non-overlapping) structure. NFCI. (details)
  6. [MemorySSA] Precommit test case for PR47498. (details)
  7. [MemorySSA] Make sure PerformedPhiTrans is updated for each visited def. (details)
  8. [InstSimplify] allow folds for fmin/fmax with 'ninf' (details)
  9. Sema: add support for `__attribute__((__swift_objc_members__))` (details)
  10. [InstSimplify] add folds for fmin/fmax with 'nnan' (details)
  11. [flang] Correctly detect overlapping integer cases (details)
  12. [libc] Decouple string functions. (details)
Commit dae68fdf9ece930ad158e15966cb99a15636e8c7 by spatel
[InstSimplify] add/move tests for fmin/fmax; NFC

The new tests are duplicated from the sibling patch for codegen:
D87571
The file was addedllvm/test/Transforms/InstSimplify/fminmax-folds.ll
The file was modifiedllvm/test/Transforms/InstSimplify/floating-point-arithmetic.ll
Commit 22c583c3d03a6750d6474ad46e5d52eb9974e2b0 by spatel
[InstSimplify] reduce code duplication for fmin/fmax folds; NFC

We use the same code structure for folding integer min/max.
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit ef7a255c037ca462f71ddd3d2b5a46310b08f6eb by Lubomir.Litchev
Add support for casting elements in vectors for certain Std dialect type conversion operations.

Added support to the Std dialect cast operations to do casts in vector types when feasible.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D87410
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
Commit 71a16e40f78adee12663816edf6635b96dca09dc by Louis Dionne
[libcxx] ostream{,buf}_iterator::difference_type changes in C++20

In C++20, since P0896R4, std::ostream_iterator and std::ostreambuf_iterator
must have std::ptrdiff_t instead of void as a difference_type.

Tests by Casey Carter (thanks!).

Differential Revision: https://reviews.llvm.org/D87459
The file was modifiedlibcxx/include/iterator
The file was modifiedlibcxx/test/std/iterators/stream.iterators/ostreambuf.iterator/types.pass.cpp
The file was modifiedlibcxx/test/std/iterators/stream.iterators/ostream.iterator/types.pass.cpp
Commit 3b7708e2deb48befcef764fb69f9217f55ac1155 by llvm-dev
Assert we've found the size of each (non-overlapping) structure. NFCI.

Fixes clang static analyzer warning.
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp
Commit f07f3c72375b872bfb988f7531d4e0485233ade1 by flo
[MemorySSA] Precommit test case for PR47498.
The file was modifiedllvm/test/Analysis/MemorySSA/phi-translation.ll
Commit c4f1b3144184e4c276a7e7c801cbcd4ac3c573ba by flo
[MemorySSA] Make sure PerformedPhiTrans is updated for each visited def.

1ce82015f6d0 added a fix to restrict phi optimizations after phi
translations. But the current use of performedPhiTranslation only
checked whether phi translation happened for the first iterator and
missed cases where phi translations happens at subsequent
iterators/upwards defs.

This patch changes upward_defs_iteartor to take a pointer to a bool, so
we can easily ensure the final value includes all visited defs, while
still being able to conveniently use it with make_range & co.
The file was modifiedllvm/test/Analysis/MemorySSA/phi-translation.ll
The file was modifiedllvm/include/llvm/Analysis/MemorySSA.h
The file was modifiedllvm/lib/Analysis/MemorySSA.cpp
Commit 7526376164801cc758c94217931ab025bc226b0e by spatel
[InstSimplify] allow folds for fmin/fmax with 'ninf'

maxnum(ninf X, +FLT_MAX) --> +FLT_MAX
minnum(ninf X, -FLT_MAX) --> -FLT_MAX

This is based on the similar codegen transform proposed in:
D87571
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/fminmax-folds.ll
Commit 916b43403588a85425bbc82712427cf53ed877cc by Saleem Abdulrasool
Sema: add support for `__attribute__((__swift_objc_members__))`

This adds the `__swift_objc_members__` attribute to the semantic
analysis.  It allows for annotating ObjC interfaces to provide Swift
semantics indicating that the types derived from this interface will be
back-bridged to Objective-C to allow interoperability with Objective-C
and Swift.

This is based on the work of the original changes in
https://github.com/llvm/llvm-project-staging/commit/8afaf3aad2af43cfedca7a24cd817848c4e95c0c

Differential Revision: https://reviews.llvm.org/D87395
Reviewed By: Aaron Ballman, Dmitri Gribenko
The file was modifiedclang/include/clang/Basic/Attr.td
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was addedclang/test/SemaObjC/attr-swift_objc_members.m
The file was modifiedclang/include/clang/Basic/AttrDocs.td
The file was modifiedclang/test/Misc/pragma-attribute-supported-attributes-list.test
Commit 55d371abd7f470496f45d960c29bb66da0e81aee by spatel
[InstSimplify] add folds for fmin/fmax with 'nnan'

maximum(nnan X, +INF) --> +INF
minimum(nnan X, -INF) --> -INF

This is based on the similar codegen transform proposed in:
D87571
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/fminmax-folds.ll
Commit ed0abc8ad3f3be99f40c25238ec42065a8ba077f by tkeith
[flang] Correctly detect overlapping integer cases

Integer case values were being compared as unsigned by operator<
on evaluate::value::Integer. Change that to signed so that overlap
can be detected correctly.

Explicit CompareUnsigned and BLT are still available if unsigned
comparison is needed.

Fixes https://bugs.llvm.org/show_bug.cgi?id=47309

Differential Revision: https://reviews.llvm.org/D87595
The file was modifiedflang/test/Semantics/case01.f90
The file was modifiedflang/include/flang/Evaluate/integer.h
Commit c92d1aa44b132597d57523a90342b3e620dbdb1e by gyurgyikcp
[libc] Decouple string functions.

This revision removes dependencies that exist between different string functions. This allows for the libc user to use a specific function X of this library without also depending on Y and Z.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D87421
The file was modifiedlibc/src/string/strcat.cpp
The file was modifiedlibc/src/string/memchr.cpp
The file was modifiedlibc/src/string/CMakeLists.txt
The file was modifiedlibc/src/string/string_utils.h
The file was modifiedlibc/src/string/strcpy.cpp
The file was modifiedlibc/src/string/strlen.cpp
The file was modifiedlibc/src/string/strnlen.cpp