[flang-rt] Add support for formatted I/O on the GPU (#182580)
Summary:
Expands on the previous support to enable formatted output, characters,
and checking basic iostat. We intentionally do not handle cases where
the descriptor is non-null as this is a non-trivial class that cannot
easily be shepherded across the wire.
Reapply "[flang] Lowering a ArrayCoorOp to arithmetic computations" (#182585)
Reapplying the changes. Reverted it wrongly yesterday
This reverts commit 3c6523dcb8ebc0396f69c578285599b66e16dce7.
[LoopFusion] Improve collectFusionCandidates() (#182571)
The order of visiting loops in collectFusionCandidates() guarantees that
a new member can only possibly be added to the end of a set.
Also currently `NumFusionCandidates` counts any loop that is added to a
candidate set. Usually large majority of candidate sets have a single
members so they are not really candidates for fusion. Only the second
member of a candidate set and the ones that come after that could be
counted as fusion candidates.
[CIR][CUDA] Add CUDAKernelNameAttr for device stubs (#180051)
Besides the Attribute description. It is worth noting that this
attribute will later be consumed when handling runtime registration on
loweringPrepare.
[flang] OPTIONAL char dummy has no defining op; add null check (#182582)
size.getDefiningOp() returns nullptr for block arguments when a OPTIONAL
character length generated the conditional "fir.if". Check for a nullptr
before calling mlir::isa<> to avoid the crash.
Addresses: https://github.com/llvm/llvm-project/issues/182436
Passes check-flang, check-flang-rt, and llvm-test-suite (x86_64)
---------
Co-authored-by: Valentin Clement (バレンタイン クレメン) <clementval at gmail.com>
[clang][ssaf] Refactor `JSONFormatTest` into a directory with a shared fixture header (#182523)
This change converts `Serialization/JSONFormatTest.cpp` into a directory
to support reuse of the `JSONFormatTest` fixture by upcoming test files
for additional data structures with JSON serialization support. New test
files for other serializable data structures can now include
`JSONFormatTest.h`, inherit from `JSONFormatTest`, and add their own
fixture and tests without duplicating the filesystem scaffolding.
AMDGPU: Try to fix leak in AMDGPULibFunc
I don't know why this was trying to do placement do. I guess
this was overriding the unique_ptr, bypassing its destructor.
[clang][ARM] Refactor argument handling in `EmitAArch64BuiltinExpr` (2/2) (NFC) (#181974)
Refactor `EmitAArch64BuiltinExpr` so that all AArch64/NEON builtins
handled by this hook _and marked as overloaded_ share a common path
for generating LLVM IR arguments (collected into the `Ops`
`SmallVector<Value*>`) (*). This is a follow-up for #181794 - please
refer to that PR for more context.
As in the previous PR, the key change is implemented in
`HasExtraNeonArgument` , i.e. in the hook that identifies Builtins with
the extra argument. In this PR, I am replacing the ad-hoc switch
statement with a more principled approach borrowed from SemaARM.cpp,
namely:
```cpp
static bool HasExtraNeonArgument(unsigned BuiltinID) {
// (...)
uint64_t mask = 0;
switch (BuiltinID) {
#define GET_NEON_OVERLOAD_CHECK
[29 lines not shown]
[c-index-test] Avoid loading a module input file when we need a file name only. (#182426)
Loading a module input file triggers its validation. Avoid this process
when we need only a file name.
rdar://167647519
[RISCV] Pre-commit tests for #182389 (#182558)
Split clmul.ll into 3 files to reduce size.
Add RUN lines without M extension. Add RUN lines with M+Zbs.
[lldb][RISCV] Make char an unsigned type for RISC-V by default (#182260)
According to RISC-V ELF psABI, Section 4.3 (C/C++ Type Representations)
"char is unsigned".
This patch makes plain `char` unsigned by default on RISC-V. Also this
fixes TestConstStaticIntegralMember.py on RISC-V
[CI][lldb] Add a github workflow that runs pylint on LLDB API test changes (#182003)
The motivator here is that Python allows class methods to be redefined.
But in the vast majority of cases this is a bug. E.g., in our API
test-suite two methods with the same name cause the latest definition to
shadow the earlier, in which case only one test-case runs. This happens
silently. Every couple of months i've been running the script from
https://github.com/llvm/llvm-project/pull/97043 manually on the
code-base and it catches a handful of these every time.
This patch sets up a github action that runs on pull requests that
change any files under `lldb/test/API`. The action runs `pylint` on the
changed Python files. The caveat here is that `pylint` isn't set up to
run cleanly on our test-suite. So I just use the [specific redefinition
error
code](https://pylint.readthedocs.io/en/stable/user_guide/messages/error/function-redefined.html).
Any other errors won't cause `pylint` to fail for now (hence the
`--error-under=0`).
[3 lines not shown]
[clang][ssaf] Add UnsafeBufferUsage summary data structures (#181067)
An UnsafeBufferUsage summary is the ssaf representation of the set of
unsafe buffer pointers found by `-Wunsafe-buffer-usage` in a translation
unit.
rdar://170176278
---------
Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>