SuccessChanges

Summary

  1. [clang-format] fix conflict between FormatStyle::BWACS_MultiLine and (details)
  2. [mlir][Linalg] Reimplement and extend getStridesAndOffset (details)
Commit d45aafa2fbcf66f3dafdc7c5e0a0ce3709914cbc by mitchell
[clang-format] fix conflict between FormatStyle::BWACS_MultiLine and
BeforeCatch/BeforeElse
Summary: Found a bug introduced with BraceWrappingFlags
AfterControlStatement MultiLine. This feature conflicts with the
existing BeforeCatch and BeforeElse flags.
For example, our team uses BeforeElse.
if (foo ||
   bar) {
doSomething();
} else {
doSomethingElse();
}
If we enable MultiLine (which we'd really love to do) we expect it to
work like this:
if (foo ||
   bar)
{
doSomething();
} else {
doSomethingElse();
}
What we actually get is:
if (foo ||
   bar)
{
doSomething();
} else
{
doSomethingElse();
}
Reviewers: MyDeveloperDay, Bouska, mitchell-stellar
Patch by: pastey
Subscribers: Bouska, cfe-commits
Tags: clang
Differential Revision: https://reviews.llvm.org/D71939
The file was modifiedclang/lib/Format/UnwrappedLineFormatter.cpp
The file was modifiedclang/unittests/Format/FormatTest.cpp
Commit d67c4cc2eb4ddc450c886598b934c111e721ab0c by ntv
[mlir][Linalg] Reimplement and extend getStridesAndOffset
Summary: This diff reimplements getStridesAndOffset in a significantly
simpler way by operating on the AffineExpr and calling into
simplifyAffineExpr instead of rolling its own saturating arithmetic.
As a consequence it becomes quite simple to extend the behavior of
getStridesAndOffset to encompass more cases by manipulating the
AffineExpr more directly. The divisions are still filtered out and
continue to yield fully dynamic strides. Simplifying the divisions is
left for a later time if compelling use cases arise.
Relevant tests are added.
Reviewers: ftynse
Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen,
antiagainst, arpith-jacob, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D72098
The file was modifiedmlir/lib/IR/StandardTypes.cpp
The file was modifiedmlir/test/AffineOps/memref-stride-calculation.mlir