[libc++] Fix std::variant comparators not working on recursive instantiations (#182238)
We currently have an instantiation cycle in `variant`'s comparison
operators. This patch fixes that by replacing a `decltype(auto)` with an
explicit return type, removing the requirement to instantiate the
function in order to know the return type.
Fixes #182232
libclc: Avoid duplicated get_local_size/get_global_size functions
Move opencl handling on top of clc into opencl generic, delete
amdgpu implementations in opencl.
[libunwind][PAC] Defang ptrauth's PC in valid CFI range abort
It turns out making the CFI check a release mode abort causes many,
if not the majority, of JITs to fail during unwinding as they do not
set up CFI sections for their generated code. As a result any JITs
that do nominally support unwinding (and catching) through their JIT
or assembly frames trip this abort.
rdar://170862047
[libc++] Don't double-wrap iterators when bounded iterators are used (#182264)
There is no reason to double-wrap iterators, since we can already
achieve anything we want within `__bounded_iter`itself.
This is technically ABI breaking, but people using bounded iterators
shouldn't require ABI stability currently.
Fixes #178521
[CIR] Add Commutative/Idempotent traits to binary ops
Add missing MLIR traits to CIR binary operations, matching the arith
dialect conventions:
- AndOp, OrOp: Commutative, Idempotent (fixes FIXME)
- AddOp, MulOp, XorOp, MaxOp: Commutative
Add these ops to the CIRCanonicalize pass op list so trait-based
folding is exercised by applyOpPatternsGreedily.
Update testFloatingPointBinOps in binop.cpp to use computed values,
preventing DCE of the now-canonicalized ops.
[ubsan_minimal] Build on Solaris (#184976)
Two tests currently `FAIL` on Solaris/amd64 and Solaris/sparcv9:
```
SafeStack-Standalone-i386 :: overflow.c
SafeStack-Standalone-x86_64 :: overflow.c
```
This happens because `libclang_rt.ubsan_minimal.a` isn't built on
Solaris although it's required with `-fsanitize-minimal-runtime`.
This patch fixes this.
Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.
[CIR] Fix operator-precedence bugs in assert conditions (#185119)
Due to && binding tighter than ||, asserts of the form
assert(A || B && "msg") always pass when A is true. Add
parentheses so the string message is properly attached:
assert((A || B) && "msg").
[CIR] Fix spurious MemRead on pure pointer-arithmetic ops
Remove incorrect [MemRead] annotations from ops that only perform
pointer arithmetic without loading memory. Add Pure trait to ops
that were missing it.
Affected ops:
- VTableGetVPtrOp, VTableGetVirtualFnAddrOp, VTableGetTypeInfoOp:
remove [MemRead] (already had Pure)
- GetMemberOp, GetRuntimeMemberOp, BaseClassAddrOp, DerivedClassAddrOp:
remove [MemRead] and add Pure
[ORC] Refactor WaitingOnGraph::processExternalDeps. NFCI. (#185152)
Refactor WaitingOnGraph::processExternalDeps to use the recently
introduced ContainerElementsMap::visit and ElementSet::remove_if
methods.
[NFC] Move fusion- to start of Fusion Feature Name (#185146)
This makes it a lot easier to see all the available fusions, because
they appear together in the list.
[CIR] Change CmpOp assembly format to use bare keyword style
Update the assembly format of cir.cmp from the parenthesized style
cir.cmp(gt, %a, %b) : !s32i, !cir.bool
to the bare keyword style used by other CIR ops like cir.cast:
cir.cmp gt %a, %b : !s32i
The result type (!cir.bool) is now automatically inferred as it is
always cir::BoolType.
[CIR] Fix convertSideEffectForCall header/definition signature mismatch (#185118)
Add missing bool &noReturn parameter to the declaration in
LowerToLLVM.h to match the definition in LowerToLLVM.cpp.
[mlir][reducer] Refactor reduction-tree test (#184974)
Consolidate reduction-tree pass tests into a single file using
mlir-reduce's -split-input-file feature. See
https://github.com/llvm/llvm-project/pull/184970.
[clang-doc] Introduce Serializer class (#184873)
Serialization has mostly been done with static functions, but soon we
will need to share state, like alocator references. To avoid blowing up
our parameter lists, we can just wrap the local functions within a
class.
[clang-tidy] Correctly handle attributes in readability-inconsistent-ifelse-braces (#184095)
Improved the check to correctly handle `[[likely]]` and `[[unlikely]]`
attributes placed between the if/else keyword and the opening brace.
As of AI Usage: Gemini 3 is used for pre-commit reviewing.
Closes https://github.com/llvm/llvm-project/issues/184081
[clang-doc] Introduce Serializer class
Serialization has mostly been done with static functions, but soon we
will need to share state, like alocator references. To avoid blowing up
our parameter lists, we can just wrap the local functions within a
class.
[clang-doc] Introduce abstractions for pointer operations (#184872)
Since we're migrating from std::unique_ptr to raw pointers via
arena allocation, we want to have some interfaces that abstract
these operations away, and can be changed to keep the system
working without introducing a lot of unnecessary churn in the code.
[clang-doc] Introduce abstractions for pointer operations
Since we're migrating from std::unique_ptr to raw pointers via
arena allocation, we want to have some interfaces that abstract
these operations away, and can be changed to keep the system working
without introducing a lot of unnecessary chrun in the code.
[clang-doc] Introduce Serializer class
Serialization has mostly been done with static functions, but soon we
will need to share state, like alocator references. To avoid blowing up
our parameter lists, we can just wrap the local functions within a
class.
[clang-doc] Introduce type alias for OwningPtrVec/Array (#184871)
We commonly have vectors/arrays of owned pointers. This should simplify
future refactoring when switching to arena allocation.
[ORC] Add WaitingOnGraph::visitWithRemoval, refactor some loops. (#185001)
visitWithRemoval visits the elements of a vector performing a
swap-and-pop to remove any for which the visitor returns true.
Use this to refactor some loops in WaitingOnGraph that used this idiom.