Reland "[SSAF][clang-reforge] Add end-to-end clang-reforge tests (#219085)" (#220124)
This reverts commit 459dffa2ef4af2e3fd96ff35a235a301bdeeb32c
The new test added in the original PR uses 'clang-apply-replacements'
conditionally now. It checks if the tool is available before using it.
When the tool is not there, it only checks against replacement offsets
and texts.
Final step of:
rdar://185840466
[CIR][CUDA] Support built-in CUDA texture type (#214781)
Related: #179278
This patch adds initial support for CUDA built-in texture types in CIR
for device-side compilation.
CUDA texture references are lowered to the NVPTX device-handle
representation (`i64`), matching existing Clang CodeGen behavior.
## Changes
- Add `getCUDADeviceBuiltinTextureDeviceType()` target hook to
`TargetCIRGenInfo`
- Implement NVPTX texture lowering in `NVPTXTargetCIRGenInfo`
- Handle CUDA built-in texture types in `CIRGenTypes::convertType`
- Add initial CUDA texture variable registration bookkeeping in
`CIRGenNVCUDARuntime`
- Add CIR CUDA test coverage for device-side texture lowering
[8 lines not shown]
[BOLT] Parse .eh_frame CFI programs on demand to reduce memory
BOLT read the entire .eh_frame up front via DwCtx->getEHFrame(), which
parses and caches the CFI instruction program of every CIE/FDE in the
binary for the whole run. On a large binary, this dominated
file-object discovery: CFIProgram::parse accounted for ~6.5 GB and the
cached DWARFDebugFrame ~6.9 GB of live memory. Yet the CFI programs
are only consumed in CFIReaderWriter::fillCFIInfoFor, and only for the
functions BOLT actually disassembles. discoverFileObjects itself needs
nothing but each FDE's address and range for function-boundary checks.
Here we parse .eh_frame for its index only, and decode each function's
CFI program on demand, lazily, only for the functions that really need
it. In a large binary, DWARFDebugFrame::parse drops from 6922.2 MB
to 587.6 MB, the residual being the lightweight FDE/CIE index (entries
without instruction programs), and readSpecialSections falls from
7078.7 MB to 738.6 MB on the tested binary for which BOLT's RSS is
about 80-120GB.
[mlir][acc] Use atomicrmw for simple atomic captures (#219552)
Example:
```fortran
!$acc atomic capture
nSmall = nSmall + 1
indx = nSmall
!$acc end atomic
```
acc.atomic.capture always generated a cmpxchg loop, while
acc.atomic.update already mapped a simple binop to atomicrmw. On a
partition loop with 204800 threads contending on one scalar, the CAS
retries dominate.
Fix: give the capture conversion the same atomicrmw path. atomicrmw
returns the old value, so `{read, update}` stores it directly and
`{update, read}` reapplies the binop to it.
[HLSL] Implement TextureCubeArray resource type (#218521)
Fixes https://github.com/llvm/llvm-project/issues/194948
This PR adds the TextureCubeArray type to HLSL.
A rather straight-forward change since TextureCube and array textures
were already implemented before.
There are a couple test changes to accomodate the combination of cube
with array textures.
Assisted by: Claude Opus 5
---
<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
Improve metadirective loop checks
Tie lastprivate guards and updates to their induction-variable
computations. Require the fallback SIMD linear clause to contain only the
expected variable.
Capture loop-bound and step producers in the dynamic and static collapse
checks. Require the last-iteration comparisons to use those values so the
tests reject internally consistent but semantically incorrect guards.
[WebAssembly] Fix memory operand names for memory.copy in tablegen. NFC (#220115)
The first immediate is the destination memory index and the second is
the source memory index according to the WebAssembly specification and
`LowerMemcpy` in `WebAssemblyISelLowering.cpp`.
[sanitizer_common] Add operator new chain-handling framework (#201151)
Groundwork for #196388
[sanitizer_common] Add operator new chain-handling framework
Implement the operator new wrapper machinery required by
[new.delete.single]/3+/4 in shared sanitizer_common files so every
sanitizer can reuse it (avoids ~130 lines of duplication).
sanitizer_new_handler.h provides three main templates in namespace
__sanitizer (plus a NORETURN InvokeOnExhausted wrapper used internally):
* RunNewHandlerChain<Alloc>(alloc)
Runs std::get_new_handler() in a loop until either the
allocation succeeds or the chain is exhausted (returns nullptr).
* NewImplThrowing<Alloc, OnExhausted>(alloc, on_exhausted)
Throwing operator new: runs the chain; on exhaustion either
[66 lines not shown]
[LV] Auto generate RISCV analysis tests. NFC (#219879)
This patch re-generate some analysis RISCV tests by automatic update
scripts to make tests easier to update.
Reland "[SSAF][clang-reforge] Add end-to-end clang-reforge tests (#219085)"
This reverts commit 459dffa2ef4af2e3fd96ff35a235a301bdeeb32c
The new test added in the original PR uses 'clang-apply-replacements'
conditionally now. It checks if the tool is available before using it.
When the tool is not there, it only checks against replacement offsets
and texts.
Final step of:
rdar://185840466
[VPlan] Compute SCEV for ptrtoaddr. (#219848)
SCEV models ptrtoaddr via getPtrToAddrExpr. Mirror that in
getSCEVExprForVPValue. ptrtoint stays unmodelled, as createSCEV returns
an unknown for it.
Adds m_PtrToAddr to VPlanPatternMatch.