[StringMap] Add remove_if and use it for erase-while-iterating (#202272)
Add a `remove_if` member to StringMap (and to HashKeyMap, the base of
SampleProfileMap) as a replacement for the erase-while-iterating idiom,
and convert the two in-tree users: SymbolStringPool::clearDeadEntries
and llvm-profdata's filterFunctions (a template over StringMap and
SampleProfileMap).
Extracted from #202237 - making StringMap's mutation invalidates
iterators
so that we can remove the tombstone state.
Aided by Claude Opus 4.8
[SPIR-V] Lower 1xN/Nx1 matrix transpose to a copy (#201332)
Remove extra `OpVectorShuffle` while lowering trivial matrix transpose that is in fact basically a reshape
[flang][hlfir] Extend InlineHLFIRCopy to inline copy_out with copy-back
Rename `InlineHLFIRCopyIn` to `InlineHLFIRCopy` and extend it to inline
the paired `hlfir.copy_out` operation. The copy_out is inlined at its
original location, after the call, ensuring proper ordering of copy-back
and deallocation.
Only inlines when no copy-back is required (intent(in)); intent(inout/out)
pairs are left untransformed.
Based on https://github.com/llvm/llvm-project/pull/179096.
Co-Authored-By: Kazuaki Matsumura <kmatsumura at nvidia.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
[Flang][CMake] Add missing CMakePushCheckState for standalone build (#202285)
Needed for the functions cmake_push_check_state/cmake_pop_check_state.
The corresponding include command was missing for flang-standalone
builds.
[flang][hlfir] Extend InlineHLFIRCopy to inline copy_out with copy-back
Rename `InlineHLFIRCopyIn` to `InlineHLFIRCopy` and extend it to inline
the paired `hlfir.copy_out` operation. The copy_out is inlined at its
original location, after the call, ensuring proper ordering of copy-back
and deallocation.
Only inlines when no copy-back is required (intent(in)); intent(inout/out)
pairs are left untransformed.
Based on https://github.com/llvm/llvm-project/pull/179096.
Co-Authored-By: Kazuaki Matsumura <kmatsumura at nvidia.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
compiler-rt: Consolidate regex checks for amdgpu targets
In the future the triple naming scheme will change, and this
will help avoid repeating the same longer regex in all of these
places.
Co-Authored-By: Claude Sonnet 4.5 <noreply at anthropic.com>
[llvm-ar] fix inconsistent case sensitivity for path matching on Windows (#196541)
When deleting or extracting with -N, member counting uses case sensitive
member arguments while path matching uses normalized paths.
This causes an issue (on Windows): if you have files: foo.txt and
FOO.txt, you can only extract one of them when using -N 1, and using -N
2 results in error.
[LV] Use index type for base pointer computation in convertToStridedAccesses (#201070)
The base pointer for strided accesses was computed as:
```
offset = canonicalIV * stride
base_ptr = ptradd start, offset
```
On a 64-bit target, if the canonical IV type is i32, the GEP operation
for ptradd will first sign-extend the offset to i64. Once the offset
multiplication has already overflowed in i32, it will ultimately result
in an incorrect base address.
This patch fixes this by extending the canonical IV to the index type
before the offset multiplication.
Based on #199647
Fixes #199640
[Loads] Always pass down context in isSafeToLoadUnconditionally() (#201833)
There is context-sensitive reasoning we can perform without a dominator
tree -- it doesn't make sense to drop the context instruction just
because there is no DT.
Also handle the case where the start instruction and the context
instruction are the same in willNotFreeBetween(). In that case we want
the function return true, not false.
Revert "[GlobalISel] Add a shared matcher for memcpy-family instructions (NFC)" (#202275)
broke sanitizer-aarch64-linux-bootstrap-ubsan:
https://lab.llvm.org/buildbot/#/builders/85/builds/22356
reverting while I fix
Reverts llvm/llvm-project#201766
[sanitizer_common] DenseMap: replace tombstone deletion with TAOCP 6.4 Algorithm R (#202231)
sanitizer_dense_map.h is a fork of llvm/ADT/DenseMap.h, which uses
quadratic probing with lazy deletion: an erased entry becomes a
tombstone, a third bucket state alongside empty and live that every
find/insert must inspect.
Port the upstream #200595 and getTombstoneKey() removal.
Aided by Claude Opus 4.8
[RISCV] Support sf_vtmv OFP8 intrinsics (#201598)
This patch supports OFP8 type vtmv_v_t and vtmv_t_v intrinsics which
were missing back then since there's no OFP8 vector types.