[CIR][LoweringPrepare] Emit guard variables for static local initialization
This implements the lowering of static local variables with the Itanium C++ ABI
guard variable pattern in LoweringPrepare.
When a GlobalOp has the static_local attribute and a ctor region, this pass:
1. Creates a guard variable global (mangled name from AST)
2. Inserts the guard check pattern at each GetGlobalOp use site:
- Load guard byte with acquire ordering
- If zero, call __cxa_guard_acquire
- If acquire returns non-zero, inline the ctor region code
- Call __cxa_guard_release
3. Clears the static_local attribute and ctor region from the GlobalOp
[clang][bytecode] Add a path to MemberPointers (#179050)
Add a path and an `IsDerivedMember` member to our `MemberPointer` class.
Fix base-to-derived/derived-to-base casts. Add tests and unit tests,
since regular tests allow a lot and we want to check the path size
exactly.
graphics/py-pycairo: rename and update to 1.29.0
Changelog: https://pycairo.readthedocs.io/en/latest/changelog.html#v1-29-0
Notably, experimental support for free-threaded Python (3.13t, soon 3.14t)
Port and PKGNAME renamed to match Python package metadata, and to
properly build with USE_PYTHON=pep517. Test suite also now exposed.
Remove PORTSCOUT since this does not follow the even-odd version
split.
[CIR][LoweringPrepare] Emit guard variables for static local initialization
This implements the lowering of static local variables with the Itanium C++ ABI
guard variable pattern in LoweringPrepare.
When a GlobalOp has the static_local attribute and a ctor region, this pass:
1. Creates a guard variable global (mangled name from AST)
2. Inserts the guard check pattern at each GetGlobalOp use site:
- Load guard byte with acquire ordering
- If zero, call __cxa_guard_acquire
- If acquire returns non-zero, inline the ctor region code
- Call __cxa_guard_release
3. Clears the static_local attribute and ctor region from the GlobalOp
[flang][cuda] Resolve generic tie‑breaks using per‑arg CUDA distance (#181038)
Switch CUDA generic resolution to compare per‑argument CUDA matching
distances lexicographically instead of summing them. This prevents
ambiguous matches when different specifics yield the same total
distance.
[CIR][LoweringPrepare] Emit guard variables for static local initialization
This implements the lowering of static local variables with the Itanium C++ ABI
guard variable pattern in LoweringPrepare.
When a GlobalOp has the static_local attribute and a ctor region, this pass:
1. Creates a guard variable global (mangled name from AST)
2. Inserts the guard check pattern at each GetGlobalOp use site:
- Load guard byte with acquire ordering
- If zero, call __cxa_guard_acquire
- If acquire returns non-zero, inline the ctor region code
- Call __cxa_guard_release
3. Clears the static_local attribute and ctor region from the GlobalOp
[CIR] Add CIRGen support for static local variables with non-constant initializers (#179827)
This adds CIRGen infrastructure for C++ function-local static variables
that require guarded initialization (Itanium C++ ABI).
Changes:
- Add ASTVarDeclAttr to carry VarDecl AST through the pipeline
- Add emitGuardedInit() to CIRGenCXXABI for guarded initialization
- Add emitCXXGuardedInit() to CIRGenFunction
- Replace NYI in addInitializerToStaticVarDecl() with ctor region emission
- Set static_local attribute on GlobalOp and GetGlobalOp
This doesn't unwrap the high level constructs just yet - The global's ctor region contains the initialization code, which will be lowered by LoweringPrepare to emit the actual guard variable pattern with __cxa_guard_acquire/__cxa_guard_release calls.
PR bin/59996 - handle hidden swap list reordering
A different attempt to achieve what 2 revs back was attempting.
The swap lists must be locked (uvm_swap_data_lock) when we are traversing
the lists of swap devices, as otherwise the lists can reorder themselves
behind our back. But we cannot hold that lock when actually doing the
processing, as our process might need to page/swap to copy out data,
and doing that will also attempt to take the lock - panic (or doom).
Instead, traverse the lists with the lock held, so they are stable, but do
nothing but keep a record of all of the swapdevs (independent of their lists)
and then use this new list of swapdevs to actually do the work. The number
or identity of the swap devices cannot change during all of this, as we also
hold swap_syscall_lock which prevents any other swapctl() operations (like
adding or deleting devices) from occurring.
Once we have done that, the number of swap devices found is the number
returned from swapctl(SWAP_STATS) (provided it is no bigger than requested).
[5 lines not shown]
[CIR] Add CIRGen support for static local variables with non-constant initializers
This adds CIRGen infrastructure for C++ function-local static variables
that require guarded initialization (Itanium C++ ABI).
Changes:
- Add ASTVarDeclAttr to carry VarDecl AST through the pipeline
- Add emitGuardedInit() to CIRGenCXXABI for guarded initialization
- Add emitCXXGuardedInit() to CIRGenFunction
- Replace NYI in addInitializerToStaticVarDecl() with ctor region emission
- Set static_local attribute on GlobalOp and GetGlobalOp
The global's ctor region contains the initialization code, which will be
lowered by LoweringPrepare to emit the actual guard variable pattern with
__cxa_guard_acquire/__cxa_guard_release calls.
Merge tag 'riscv-for-linus-7.0-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux
Pull RISC-V updates from Paul Walmsley:
- Add support for control flow integrity for userspace processes.
This is based on the standard RISC-V ISA extensions Zicfiss and
Zicfilp
- Improve ptrace behavior regarding vector registers, and add some
selftests
- Optimize our strlen() assembly
- Enable the ISO-8859-1 code page as built-in, similar to ARM64, for
EFI volume mounting
- Clean up some code slightly, including defining copy_user_page() as
copy_page() rather than memcpy(), aligning us with other
[25 lines not shown]
[OpenMP][MLIR] Modify lowering OpenMP Dialect lowering to support attach mapping
This PR adjusts the LLVM-IR lowering to support the new attach map type that the runtime
uses to link data and pointer together, this swaps the mapping from the older
OMP_MAP_PTR_AND_OBJ map type in most cases and allows slightly more complicated ref_ptr/ptee
and attach semantics.
asmc: Convert driver to CTLFLAG_MPSAFE
Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE for all sysctls.
The driver already uses spin mutexes (sc->sc_mtx) for hardware
access protection and does not require the Giant lock.
This improves scalability by allowing concurrent sysctl access
without Giant serialization.
Reviewed by: ngie, adrian
Differential Revision: https://reviews.freebsd.org/D54613