[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.
py-ruff: updated to 0.15.13
0.15.13
Preview features
Add a rule to flag lazy imports that are eagerly evaluated
[pylint] Standardize diagnostic message (PLR0914, PLR0917)
Bug fixes
Fix F811 false positive for class methods
Fix setting selection for multi-folder workspace
[eradicate] Fix false positive for lines with leading whitespace (ERA001)
[flake8-pyi] Fix false positive for f-string debug specifier (PYI016)
Rule changes
Always include panic payload in panic diagnostic message
[27 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.
[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