[flang][OpenMP][NFC] Share declare mapper helpers for iterator modifier lowering
Move mapper lookup and implicit default mapper creation into reusable
OpenMP lowering helpers so regular map lowering and iterator-generated
map entries can use the same resolution path.
This prepares Flang iterator modifier lowering for map and motion clauses
without changing the generated IR for existing non-iterator maps.
[InstCombine] Use `isa<ConstantPointerNull>` for null pointer checks (#197722)
Make InstCombine pointer-null checks use `isa<ConstantPointerNull>`
rather than generic zero checks, and fold inttoptr comparisons against
the DataLayout null pointer value.
[Flang][OpenMP] Support iterator modifier in map and motion clauses
This patch supports iterator-dependent array elements and array sections for
target data, target enter data, target exit data, and target update.
It also preserves mapper resolution for iterated entries, including explicit
mappers, user-defined default mappers, declare mapper entries, and implicit
default mappers.
This patch is part of feature work for #188061.
Assisted with copilot.
[flang][OpenMP] NFC: Share declare mapper helpers for iterator modifier lowering
Move mapper lookup and implicit default mapper creation into reusable
OpenMP lowering helpers so regular map lowering and iterator-generated
map entries can use the same resolution path.
This prepares Flang iterator modifier lowering for map and motion clauses
without changing the generated IR for existing non-iterator maps.
[Frontend/Offloading] Fix use-after-reallocation in sycl::writeSymbolTable (#197612)
`writeSymbolTable` took raw pointers into the `SmallString` buffer
(`Header`, `Entries`) and then called `Out.append()` / `Out.push_back()`
inside the loop to write string data. When the `SmallString` needed to
grow, it reallocated, silently invalidating those pointers. All writes
through `Entries[I]` after the first reallocation were undefined
behaviour; UBSAN caught this as a crash (exit code -6 / SIGABRT) on the
sanitizer-x86_64-linux-bootstrap-ubsan builder.
The fix pre-computes the total buffer size (header + entry array +
all null-terminated name strings) and calls `reserve()` before any
pointers are taken, guaranteeing that the subsequent `append` and
`push_back` calls cannot trigger a reallocation.
[libc] Restore sysconf to default entrypoints (#197696)
Reverts the experimental gating of sysconf introduced in 1d93fc4f74fe
and restores it to the Scudo integration test entrypoints (undoing
8257855f77d5).
sysconf works correctly for the constants it handles. Moving it behind
the experimental flag broke the Scudo build since Scudo calls
sysconf(_SC_PAGESIZE).
Changes:
* libc/config/linux/{x86_64,aarch64,riscv}/entrypoints.txt: moved
sysconf back into TARGET_LIBC_ENTRYPOINTS, removed the
LLVM_LIBC_ENABLE_EXPERIMENTAL_ENTRYPOINTS guard.
* libc/test/integration/scudo/CMakeLists.txt: restored
libc.src.unistd.sysconf to the Scudo entrypoint library.
Assisted-by: Automated tooling, human reviewed.
[InstCombine] Use `isa<ConstantPointerNull>` for null pointer checks
Make InstCombine pointer-null checks use `isa<ConstantPointerNull>` rather than
generic zero checks, and fold inttoptr comparisons against the DataLayout null
pointer value.
[lldb][NFC] Use DenseMap in ObjCLanguageRuntime (#197444)
This is a multimap of Hash -> ObjCISA (lldb::addr_t), and it shows up
cpu traces of swift applications. This commit replaces
`std::multimap<hash, addr_t>` with `DenseMap<hash, SmallVector<addr_t,
2>>`.
This data structure was chosen because of the following experiment. When
evaluating a frame variable command for a SwiftUI variable, this object
gets populated with ~186,000 entries:
* over a thousand of them had 2 hash collisions.
* 300 of them had 3 hash collisions.
* 21 of them had 4 hash collisions.
* 1 of them had 5 hash collisions.
On a release build (no asserts), this patch brought down the CPU cycles
measured for that command from 487M cycles to 389M cycles.
[clang][deps] Consolidate types into new `DependencyActionController.h` (#197721)
This PR pulls types from multiple headers into new
`DependencyActionController.h`. This is just a cleanup, NFC.
[z/OS] Fix z/OS ASAN test failure (#197547)
Fix test failure when running `zos-archive-read.test` under asan.
AddressSanitizer detected a heap-buffer-overflow in
`ebcdicFieldToASCII()` when reading z/OS archive headers. The issue
occurred because `ZOSArchiveMemberHeader::setMemberHeaderStrings` was
called even when the base `ArchiveMemberHeader` constructor had already
set an error, causing reads past the end of fixed-size EBCDIC fields.
Fixed by checking for constructor errors before calling
`setMemberHeaderStrings`.
Original PR: #187110
[mlir][arith] Add subui_extended op (#197376)
Unsigned extended subtraction mirroring addui_extended. Gives a
primitive for unsigned underflow that maps cleanly to
llvm.usub.with.overflow and spirv.ISub
[lldb-dap] Enumerate platform processes via --list-processes (#197330)
In #128943, we decided that the VS Code extension should use LLDB's
platform abstraction to power the process picker. The benefits of this
approach are that it's cross platform and can support listing remote
processes when connected to a platform server.
In preparation for that, this PR adds a `--list-processes` flag. The
host platform is used by default. The `--platform` and `--platform-url`
flags allow specifying and connecting to a (remote) platform.
The result is a JSON array printed to stdout. Here's what that looks
like:
```
[ { "pid": number, "name": string, "triple": string,
"executable": string, "user": number }, ... ]
```
Keys other than `pid` are optional. A follow-up will teach the VS Code
extension to use this as input for the process picker.
[CIR] Lower static locals in C++ ctor and dtor bodies (#197089)
Static locals declared inside a C++ constructor or destructor body were
hitting `errorNYI("C++ constructors static var context")` (and the dtor
variant) in `CIRGenModule::getOrCreateStaticVarDecl`, even though the
rest of the static-local plumbing was already in place. The fix is to
mirror what classic CodeGen does at `CGDecl.cpp:328-334` — pick
`GlobalDecl(cd, Ctor_Base)` for ctors and `GlobalDecl(dd, Dtor_Base)`
for dtors instead of erroring.
Hit this trying to compile a couple of SPEC CPU 2026 benchmarks with
`-fclangir`: `flightdm` has a `static constexpr std::array` inside
`FGCondition::FGCondition`, and `gmsh` has a similar shape in
`MetaEl.cpp`. The minimum repro is the obvious one:
```c++
struct Foo { Foo() { static int x = 42; (void)x; } };
Foo f;
```
[6 lines not shown]
Fix for #177160 : [lldb] Real-time console pane for output in lldb tui (#197473)
This Change:
The stalling testcase in the PR: #177160 has been fixed.
- The cause of it was that the test required to get line 0 & line 99
from the console output with auto-scroll on. With limited display area,
this test was unreliable and impossible to achieve - which caused it to
wait / hang there.
Original Change :
New Console Pane that -
- captures stdout/stderr msgs from debugged process
- displays output to console in real-time
- provides scrolling and navigation features
- manages 10K line circular buffer
- auto-scroll on/off feature
[9 lines not shown]
[InstCombine] Use `isa<ConstantPointerNull>` for null pointer checks
Make InstCombine pointer-null checks use `isa<ConstantPointerNull>` rather than
generic zero checks, and fold inttoptr comparisons against the DataLayout null
pointer value.
[Clang][NFC] Add a regression test for #197067 (#197634)
Because concepts were checked for satisfaction in the wrong contexts, we
ended up creating deduction guides in the wrong contexts.
Fixes #197067
[clang] make evaluation of type constraint a SFINAE context (#197523)
Otherwise, errors when substituting a type constraint could
unintentionally make the program ill-formed.
This also strenghtens the assert which checks, when we are instantiating
templates, that we either have a code synthesis context, or that we are
in a SFINAE context.
[VPlan] Add helper to define CastInfo for casting to VP mixins (NFC) (#197494)
Add new generic VPMixinCast that can be used to define CastInfo from a
base class (like VPRecipeBase) to a mixin class (like VPIRMetadata)
through a list of supported recipe types.
Overall that makes defining the cast machinery quite a bit more compact.
It also adds a static_assert to prevent mis-use using std::is_base_of_v
PR: https://github.com/llvm/llvm-project/pull/197494