SuccessChanges

Summary

  1. SemaType.cpp - use castAs<> instead of getAs<> for dereferenced pointers (details)
  2. [mlir] Revert "Tighten access of RewritePattern methods." (details)
  3. [gn build] (manually) port db61b1844e11f (details)
  4. [coroutine] should disable inline before calling coro split (details)
  5. [libc++] [LWG3221] Add tests for wrapping operator+(year_month, months). (details)
Commit 25f5df7e0bc950ad244e8da000ce4248bd41c140 by llvm-dev
SemaType.cpp - use castAs<> instead of getAs<> for dereferenced pointers

Fix static analyzer warnings - castAs<> will assert the type is correct, but getAs<> just returns null, which would just result in a dereferenced null pointer.
The file was modifiedclang/lib/Sema/SemaType.cpp
Commit 2a9840900ccc0add8fc6aed0533ceec198b3514d by csigg
[mlir] Revert "Tighten access of RewritePattern methods."

This reverts commit 02c9050155dff70497b3423ae95ed7d2ab7675a8.
Painted myself into a corner with -Wvirtual_overload, private access, and final.

Differential Revision: https://reviews.llvm.org/D92855
The file was modifiedmlir/include/mlir/IR/PatternMatch.h
The file was modifiedmlir/include/mlir/Transforms/DialectConversion.h
The file was modifiedmlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
Commit 9935b0fc9023c071c07523350b4f343d22e478f6 by thakis
[gn build] (manually) port db61b1844e11f
The file was modifiedllvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn
Commit 31e60b9133596c185e6daac7f1761dc17e464826 by xun
[coroutine] should disable inline before calling coro split

This is a rework of D85812, which didn't land.
When callee coroutine function is inlined into caller coroutine function before coro-split pass, llvm will emits "coroutine should have exactly one defining @llvm.coro.begin". It seems that coro-early pass can not handle this quiet well.
So we believe that unsplited coroutine function should not be inlined.
This patch fix such issue by not inlining function if it has attribute "coroutine.presplit" (it means the function has not been splited) to fix this issue
test plan: check-llvm, check-clang

In D85812, there was suggestions on moving the macros to Attributes.td to avoid circular header dependency issue.
I believe it's not worth doing just to be able to use one constant string in one place.
Today, there are already 3 possible attribute values for "coroutine.presplit": https://github.com/llvm/llvm-project/blob/c6543cc6b8f107b58e7205d8fc64865a508bacba/llvm/lib/Transforms/Coroutines/CoroInternal.h#L40-L42
If we move them into Attributes.td, we would be adding 3 new attributes to EnumAttr, just to support this, which I think is an overkill.

Instead, I think the best way to do this is to add an API in Function class that checks whether this function is a coroutine, by checking the attribute by name directly.

Differential Revision: https://reviews.llvm.org/D92706
The file was addedllvm/test/Transforms/Coroutines/coro-inline.ll
The file was modifiedllvm/include/llvm/IR/Function.h
The file was modifiedllvm/lib/Transforms/IPO/AlwaysInliner.cpp
The file was addedllvm/test/Transforms/Coroutines/Inputs/sample.text.prof
The file was modifiedllvm/lib/Analysis/InlineCost.cpp
Commit 877170f3eb2a7f288eca1e226e5a07d607f96474 by marek.kurdej
[libc++] [LWG3221] Add tests for wrapping operator+(year_month, months).

The behaviour didn't change since commit 5b08c1742a536f54bd5e270b00ff851cbc7314ef (Recommit <chrono> changes with a couple xtra tests marked to fail on apple's clang.)

* http://wg21.link/lwg3221

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D92730
The file was modifiedlibcxx/test/std/utilities/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp
The file was modifiedlibcxx/docs/Cxx2aStatusIssuesStatus.csv