[clang-format] Align different categories together (#172242)
How the program figured out which lines to move along the aligned lines
changed in 75c85bafb830e5. Aligning the lines caused the information to
be out of date for aligning different categories later on. It caused a
regression.
Fixes #171021.
new, with the options `AlignConsecutiveAssignments` and
`AlignConsecutiveDeclarations` enabled
```C++
const char *const MatHtoolCompressorTypes[] = {"sympartialACA", "fullACA",
"SVD"};
const char HtoolCitation[] = "@article{marchand2020two,\n"
" "
" "
" "
[13 lines not shown]
[HWASan] Compatible with Windows path retrieval (#172194)
Fix #134853
Since the Windows path separator is typically `\\`, Here, we use `pathlib` to
ensure that the separator is in Unix format.
Additionally, since the file itself specifies the use of python3 (pathlib
requires python3), some python2 code has been removed.
[CodeGen] Fix volatile inst, to match MSVC code semantics on windows (#171862)
Fix #126516
Use AtomicOrdering::Monotonic's atomic loading to let the backend
automatically select the appropriate instructions to match MSVC semantics.
[SandboxIR] Refactor `SandboxIR::PHINode::removeIncomingValueIf()` to delegate the removal directly to the underlying `llvm::PHINode::removeIncomingValueIf`.
[WoA] Remove extra barriers after ARM LSE instructions with MSVC (#169596)
https://github.com/llvm/llvm-project/commit/c9821abfc023fba684c8ef8589c49cba8083f579
added extra fences after sequentially consistent stores for
compatibility with MSVC's seq_cst loads (ldr+dmb). These extra fences
should not be needed for ARM LSE instructions that have both
acquire+release semantics, which results in a two way barrier, and
should be enough for sequential consistency.
Fixes https://github.com/llvm/llvm-project/issues/162345
Change-Id: I9148c73d0dcf3bf1b18a0915f96cac71ac1800f2
[Github][CI] Bump Windows CI Container Python to v3.12.3 (#172383)
This is primarily intended to upgrade past python 3.9 so that we can
continue building MLIR after
https://discourse.llvm.org/t/rfc-adopt-regularly-scheduled-python-minimum-version-bumps/88841/9
lands. This also makes us consistent with the Linux container.
I tested this locally by building the container with this change applied
and running the entire premerge pipeline within the freshly built
container.
[CI] Fix generate_report call parameters
The recursive call to generate_report if the failure information was
too big was not type-correct because it was never updated after we added
support for parsing ninja logs. This did not cause test failures or
runtime failures because we never looked at that variable or any
afterwards in this case, and list_failures was set as a keyword arg.
This might have caused issues somewhere though, and certainly does trip
up a type checker.
Found using pyright in vscode.
[flang][NFC] Strip trailing whitespace from tests (13 of 14)
Only some fortran source files in flang/test/Semantics/OpenMP have been
modified. The remaining files will be cleaned up in subsequent commits.
[clang][lex] Introduce new single-module-parse mode (#135813)
This PR introduces new single-module preprocessing mode. It is very
similar to single-file-parse mode, but has the following differences:
* Single-file mode skips over all inclusion directives, while the
single-module mode skips only over import directives and does resolve
textual inclusion directives.
* Single-file mode enters all branches of a conditional directive with
an undefined identifier, while the single-module enters none of them.
This will be used from the dependency scanner to quickly discover a
subset of modular dependencies of a TU/module. The dependencies aren't
being imported in this mode, but the file-inclusion preprocessor
callback does get invoked.
[OpenMP][Clang] Use `ATTACH` map-type for list-items with base-pointers. (#153683)
This adds support for using `ATTACH` map-type for proper
pointer-attachment when mapping list-items that have base-pointers.
For example, for the following:
```c
int *p;
#pragma omp target enter data map(p[1:10])
```
The following maps are now emitted by clang:
```
(A)
&p[0], &p[1], 10 * sizeof(p[1]), TO | FROM
&p, &p[1], sizeof(p), ATTACH
```
[117 lines not shown]
[sanitizers] build symbolizer with lld (#172093)
Without this, we use the system /usr/bin/ld, which is an older LLD.
That can lead to problems with LTO and breaks the aarch64 buildbot.
Revert "[mlir][gpu] Use `SmallString`, `FailureOr` and `StringRef` in `module-to-binary` infra (NFC) (#172284)" (#172386)
This reverts commit c8b8b2f1f9ced8db1458dfdf1ea6a15152c695f0.
broke the bot
[mlir][AMDGPU] Add scaled wmma ops for gfx1250 (#169854)
This PR adds scaled WMMA ops (available on gfx1250) and the lowering to the AMDGPU dialect, wrapping the underlying intrinsics.
[mlir][gpu] Use `SmallString`, `FailureOr` and `StringRef` in `module-to-binary` infra (NFC) (#172284)
Instead of `std::string`, `std::optional` and `const std::string&`.
InstCombine: Fold absorbing fmul of compared 0 into select
This is similar to the select-bin-op identity case, except
in this case we are looking for the absorbing value for the
binary operator.
If the compared value is a floating-point 0, and the fmul is
implied to return a +0, put the 0 directly into the select
operand. This pattern appears in scale-if-denormal sequences
after optimizations assume denormals are treated as 0.
Fold:
%fabs.x = call float @llvm.fabs.f32(float %x)
%mul.fabs.x = fmul float %fabs.x, known_positive
%x.is.zero = fcmp oeq float %x, 0.0
%select = select i1 %x.is.zero, float %mul.fabs.x, float %fabs.x
To:
%fabs.x = call float @llvm.fabs.f32(float %x)
[5 lines not shown]
InstCombine: Add baseline test for fcmp-0-select combine
This is similar to the identity value case; if we know we are
going to be multiplying by 0 and will get the sign right,
we can pull the constant into the select.