[OpenACC] set CollapseCountAttr for scf.parallel (#211676)
During compute lowering, also set the collapse count attribute when
creating scf.parallel ops from acc.loop ops. While this collapse count
is implied by the number of IVs, later canonicalizations may use this
information to decide whether or not to collapse the loop nest further
[Driver] Print C++ standard library info (#207798)
Users and tools sometimes need to know which C++ standard library Clang
selected, and which include directories the driver added for it. Today
they have to inspect verbose or `-###` output.
Add options to print this information directly:
`--print-cxx-stdlib`
`--print-cxx-stdlib-include-dirs`
For MSVC targets, the default printed library is `msvcstl`. Explicit
`-stdlib=` values are still reported as requested. The include-dir query
reuses toolchain logic, including the MSVC STL include path for the
default MSVC case.
[mlir][OpenACC] Support partial ThreadX reduction launches (#211665)
Example:
```fortran
!$acc parallel loop collapse(2) num_gangs(10) reduction(+:a)
do i = 1, n
do j = 1, n
do k = 1, m
a(k) = a(k) + x(k,i) * y(k,j)
end do
end do
end do
```
In this code, ACCCG pads ThreadX to the subgroup size because
`gpu.all_reduce` uses subgroup shuffles. This unnecessarily increases
private reduction storage when only one Y/Z row is active.
Fix: preserve partial ThreadX launches for a single row, while retaining
alignment when Y/Z rows could share a subgroup.
[DWARFLinker] Treat DW_AT_LLVM_alloc_type as a type reference (#211655)
The parallel linker's getODRAttributes() did not list
`DW_AT_LLVM_alloc_type`, so the dependency tracker treated it as a live
reference rather than a type reference. A type reachable only through
DW_AT_LLVM_alloc_type was therefore never kept: the enclosing subprogram
is marked live, and its type-table-candidate children are skipped during
live marking on the assumption they are retained through the type path.
The attribute then resolved to offset 0, landing on the compile unit
header, which got correctly caught by the DWARF verifier.
The classic linker already lists `DW_AT_LLVM_alloc_type` in
isODRAttribute(), so this PR restores parity between the two.
Assisted-by: Claude
rdar://182715403
[SimplifyCFG] Remove conservative fcmp guard from speculativelyExecuteBB
Previously it rejected to perform if conversion when the condition was
an FCmpInst. That guard predated the current cost model which now takes
into consideration target-dependent knobs such as getCmpSelInstrCost()
via validateAndCostRequiredSelects.
Also propagate fast-math flags from the phi to the replacement select using
CreateSelectFMF instead of CreateSelect.
Bound vulnerability database handling
The audit updater writes an unbounded remote download and decompressed
output before validation. An HTTP attacker can fill temporary or package
database storage.
Set fixed maxima and also limit each stage to half its filesystem.
Build a temporary database and atomically replace the existing one after
success.
Drop privileges in sandboxed callbacks
The callback sandbox processes untrusted archive and signature parsers
after forking, but retains root identity. It also inherits a descriptor
for /, so Capsicum alone does not remove root filesystem authority.
Drop to nobody before entering Capsicum, matching the string-returning
callback path.
[x86] Handle implicit sections when determining if a global is large (#206210)
Just like explicit sections.
We were seeing globals with implicit sections marked large under the
medium code model.
Reland of #204247, with a fix to not crash on declarations with an
explicit section. Implicit sections are not applied to declarations, so
don't check isDeclarationForLinker() globals for implicit sections.
Assisted-by: Gemini