[SelectOptimize] Update Missing PSI Error Message, Add Test (#193034)
Update the error message to omit a period/start with a lowercase letter
per the coding standards. Also add a test as suggested in post-commit
feedback on #192871.
---------
Co-authored-by: Matt Arsenault <arsenm2 at gmail.com>
[clang][SSAF] Add missing `explicit` to single-argument constructors (#193052)
This PR adds `explicit` to `TUSummary`,
`UnsafeBufferUsageTUSummaryExtractor`, and
`UnsafeBufferUsageEntitySummary` constructors. This ensures uniform use
of `explicit` for all SSAF single-argument constructors.
amd64: fix INVLPGB range invalidation
AMD64 Architecture Programmer's Manual Volume 3 says the following:
> ECX[15:0] contains a count of the number of sequential pages to
> invalidate in addition to the original virtual address, starting from
> the virtual address specified in rAX. A count of 0 invalidates a
> single page. ECX[31]=0 indicates to increment the virtual address at
> the 4K boundary. ECX[31]=1 indicates to increment the virtual address
> at the 2M boundary. The maximum count supported is reported in
> CPUID function 8000_0008h, EDX[15:0].
ECX[31] being what we call INVLPGB_2M_CNT, signaling to increment the
VA by 2M.
> This instruction invalidates the TLB entry or entries, regardless of
> the page size (4 Kbytes, 2 Mbytes, 4 Mbytes, or 1 Gbyte). [...]
Combined with this, my interpretation of the current code is: if
[20 lines not shown]
[lldb] Add target.process.always-run-thread-names setting (#192870)
Add a process setting that keeps named threads running during
single-stepping operations. Some programs install in-process Mach
exception handler threads that must continue running to forward
exceptions. When lldb single-steps and suspends all other threads, these
handler threads stall, potentially causing a deadlock if the stepped
instruction raises an exception.
The new `target.process.always-run-thread-names` setting accepts a list
of thread name strings. In `ThreadList::WillResume`, threads whose names
match an entry in this list are resumed with `eStateRunning` instead of
`eStateSuspended`, ensuring they appear in vCont packets even during
single-thread stepping.
rdar://175038920
[clang-format] Add BreakParametersAfter formatting option (#181281)
Adds the `BreakParametersAfter` option based on the feature request.
Resolves #54220.
[SPIR-V] Matrix in struct pointer legalization
When looking to load an object at the start of a struct, the types do
not always match exactly. When we have an HLSL matrix the type in the
load will not match the type in memory. We need to improve the pointer
legalization pass to look for any "compatible" type at the start of an
aggragate.
A compatible are two types that the pass knows know to convert from one
to another.
This involves a refactoring of the code to make the check more general.
Assisted-by: Gemini
[DAGCombiner] Preserve nsw when folding (mul x, 2^c) to (shl x, c) (#192366)
When the multiplier is a power of two strictly less than 2^(BitWidth-1),
the signed multiplication cannot overflow any more than the equivalent
shift, so nsw transfers from the mul to the shl. At 2^(BitWidth-1) the
multiplier is the signed minimum and the equivalence breaks, so keep
the existing behaviour of dropping nsw in that case.
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply at anthropic.com>
[NFC][VectorUtils] Simplify description of `TriviallyScalaraziable` intrinsics (#192505)
This pr allows us to specify if an intrinsic is `TriviallyScalarizable`
by specifying it in a more idiomatic way as an intrinsic property.
This was suggested here:
https://github.com/llvm/llvm-project/issues/120169#issuecomment-3805670982,
and would allow for the attached issue to be resolved in a similar
manner by having a `TriviallyVectorizable` property as well.
Assisted by: Github Copilot
[SPIR-V] Handle [N x i8] byte addressing in SPIRVEmitIntrinsics
LLVM started generating [N x i8] types on array indexing GEPs. Emit
intrinsiscs did not know what to do with it so it was generating a
cast to [N x i8] to perform the GEP. This does not work in logical
addressing.
The handle this, we expand the `i8` gep handling for logical addressing
mode to work for arbitrary size byte addressing.
[libc++] Update `__mbstate_t.h` to include path to Android's `mbstate_t.h` (#192307)
Ever since ce4ac9945 started including `__mbstate_t.h` in this C++
`wchar.h`, the Android NDK sees some redefinition errors with
`-fmodules`, likely because this Android `mbstate_t.h` was not included.
Elliot, enh-google from the Android team, suggested this inclusion to
fix it, and it worked for me in my local testing: see
swiftlang/swift#85365 for the errors and more info. This fixes
android/ndk#2230, once it gets into the NDK sysroot.
[CIR] Implement support for delete after new in a conditional branch (#192544)
This implements handling for calling delete in an EH handler after a
call to new when the new call appears inside a conditional operation,
which requires the new result to be spilled inside the cleanup scope and
reloaded after.
This implementation introduces the DominatingValue helper class, which
is adapted from classic codegen, but only the parts of that class that
are needed for the current change are implemented. This will likely be
expanded in a future change as other uses are added.
Assisted-by: Cursor / claude-4.6-opus-high
[Clang][AMDGPU] Deprecate `amdgpu-num-vgpr` and `amdgpu-num-sgpr` (#193023)
We will just emit a warning at this moment. This will still take effect
for regular compilation, but in object linking, we will simply ignore
them.