[libc++] Optimize std::swap of locales (#209760)
Currently we copy construct `locale`s whenever we swap, which is quite
expensive for locales since that does atomic increments and decrements.
We can just swap the pointers instead.
[X86] pr61923.ll - update IR to match middleend (#213908)
InstCombine converts vXi1 logic reductions to bitcasted scalar integer
ops - we should be testing that, not llvm.vector.reduce.and.v32i1 calls
[mlir][tensor] Preserve encoding in more canonicalizers (pad, convertToStaticExpandShape) (#207241)
Fixes encoding drop in `tensor.*` canonicalizers.
Patterns that only refine a tensor's shape (never merge/combine data)
now propagate the encoding: `ConvertToStaticExpandShape`,
`PadOp::inferResultType` (and its callers `FoldSourceTensorCast`,
`FoldStaticPadding`). An encoding implementing
`VerifiableTensorEncoding` is re-verified against the refined shape and
dropped if invalid (e.g. sparse); an opaque encoding (no interface) is
propagated as-is.
Patterns that merge/combine tensors (`ConcatOp::inferResultType`,
`InferConcatOperandTypes`, `CollapseShapeOp::inferCollapsedType`) keep
the existing drop-encoding behavior - there's no static way to verify an
arbitrary encoding survives a merge or rank change when dynamic dims are
involved.
Documents this contract on `VerifiableTensorEncoding` in
[4 lines not shown]
[AArch64][ISel] Recover ADDHN from OR comparison masks (#210943)
InstCombine converts the high-half addition of vector comparison masks
into an OR. Recognise the resulting trunc(or(setcc, setcc)) DAG and
reconstruct the canonical ADDHN pattern for the supported NEON types.
[InstCombine] Rebuild type-changing PHIs in PointerReplacer (#212429)
PointerReplacer mutates PHI types when replacing an alloca with a
pointer in another address space. Mutating a value type in place can
invalidate existing users whose result types or operand constraints were
formed from the original pointer type.
For example:
```
%p = phi ptr addrspace(5) [ %a, %bb0 ], [ %b, %bb1 ]
%g = getelementptr i8, ptr addrspace(5) %p, i64 1
```
Changing `%p` to `ptr addrspace(4)` leaves the existing GEP result in
`AS5` while its pointer operand is now in `AS4`. (This is what exposed
the bug). This triggered:
https://github.com/llvm/llvm-project/blob/0bcff14b1740cf32f9e0983726238dcf353c6ac8/llvm/lib/IR/Operator.cpp#L129-L131
[9 lines not shown]
Cpu features cross platform (#205447)
Also adds the place holders for other OS's as well as the structure for
cross platform code going forward.
Prefer sys calls as we can't be sure what runtime we may end up linking
with
Some features can be controlled via the kernel so this makes it easier
than relying on __cpuid for now.
The triples are now more accurate and include the os version on darwin.
All results are a string that are passed in the default map with the key are llvm subtarget features valid strings
orc-rt.Executor.SubtargetFeatures
Adds a new process regression test as well, with a best effort
guess that the triple returned is correct.
[libc++][NFC] Make __libcpp_is_trivially_relocatable a variable template (#213640)
Variable templates are a bit nicer to read and improve compile times a
bit.