[lldb] Replace remaining uses of `UnwindLogMsg()` with UNWIND_LOG macro (#192038)
This mostly replaces `"0x%" PRIx64` with `"{:x}"`, but also replaces
'%d' (used for register / scheme numbers and CFA offsets) and '%s' with
simple `{}`, removing the now redundant casts and calls to
`GetCString()` / `AsCString()`.
`UnwindLogMsg()` is no longer used and has been removed.
[CIR] Add noundef to memchr declaration and call sites (#191457)
The memchr LLVM declaration created by MemChrOp lowering had no
arg_attrs, so the lowered IR was missing `noundef` on all three
parameters. OGCG emits `noundef` on them.
Adds `noundef` to both the `@memchr` declaration and each
`call @memchr` instruction.
Made with [Cursor](https://cursor.com)
[CIR] Fix union RecordType::getTypeSizeInBits to return bits (#191516)
RecordType::getTypeSizeInBits for unions was calling
dataLayout.getTypeSize (which returns bytes) instead of
dataLayout.getTypeSizeInBits. This returned a value 8x too
small. Also handle the empty-union case where
getLargestMember returns nullptr.
[mlir][quant] Print actual quant storage type when signed (#187300)
Without the fix, bytecode serialization roundtrip breaks for types that
don't have custom bytecode serializers and contain quant types, since
the fallback mechanism prints the type and the quant printer coerces
signed to signless types. E.g. `!custom<!quant.uniform<ui8:f32, 0.1>>`
will print as `u8` when serializing and later be created as a signless
`i8` when deserializing.
[NFCI][VPlan] Split initial mem-widening into a separate transformation (#182592)
Preparation change before implementing stride-multiversioning as a
VPlan-based transformation. Might help
https://github.com/llvm/llvm-project/pull/147297/ as well.
[libc][NFC] Fix GCC build in __futex_word.h (#192078)
Included __llvm-libc-common.h in __futex_word.h to fix a build failure
with GCC.
GCC in C++ mode does not recognize _Alignas without the mapping to
alignas provided in __llvm-libc-common.h.
The failure was introduced in commit 91c0fdfe1392.
[clang] Add support for SerenityOS (#187941)
Adds support for the $arch-unknown-serenity target to the Clang front
end. This makes the compiler look for libraries and headers in the right
places, and enables some security mitigations like stack-smashing
protection and position-independent code by default.
----
A first attempt at upstreaming this patch was made
[here](https://reviews.llvm.org/D154396). I hope I fixed everything
mentioned there.
I intentionally kept `/usr/local/` in the default lookup path. I
consider it the more practical option, and I’d prefer to have the patch
merged as is and revisit the FIXME later. If this is absolutely
unacceptable to the maintainers, I will happily drop it and keep it as a
local patch until we address the underlying issue.
[7 lines not shown]
[CIR] Disable CIR pipeline for LLVM IR inputs (#187729)
When -fclangir is passed and the input is LLVM IR (e.g. during the
backend phase of OpenMP offloading), the CIR frontend pipeline is not
applicable.
Co-authored-by: Claude Opus 4.6 <noreply at anthropic.com>
[InstCombine] Fold (X + C) + (Y & ~C) to X + (Y | C) (#191334)
Add an InstCombine fold for masked overwrite patterns where the add
constant matches the cleared bits in the mask:
(X + C) + (Y & ~C) -> X + (Y | C)
Since `Y & ~C` clears all bits set in C, adding C cannot generate carry
through those bits and is equivalent to setting them with `or`.
Proof: https://alive2.llvm.org/ce/z/277UFK
Fixed: https://github.com/llvm/llvm-project/issues/191171