[OpenMP] Honour memory-order clauses on the flush directive (#241295)
At present the acquire, release and acq_rel clauses on 'flush' are
accepted but have no effect. Flushes are emitted as `__kmpc_flush`
runtime calls, which implement a seq_cst fence.
AMD have had a downstream patch for a while (by Carlo Bertolli) which
adds per-ordering `__kmpc_flush_*` entry points to the device runtime.
This patch takes a slightly different approach: for the host, a seq_cst
flush still calls `__kmpc_flush`, and a flush with any other ordering
calls the `__kmpc_flush_explicit` entry point from #133325, so it needs
a runtime that has that. For the GPU, it emits a fence directly.
This has mild benefits: OpenMPOpt already handles fences when it
converts kernels to SPMD mode, but has no knowledge of the new
`__kmpc_flush` calls (either _explicit or Carlo's per-ordering flush
calls). Scope names differ per-GPU: they are determined using the
mechanism introduced by #213810 ("[LLVM] Unify atomic scope handling
between LLVM and Clang").
[19 lines not shown]
[VPlan] Create interleave groups before scalarization decisions. (#245585)
Move createInterleaveGroups to right after the memory widening
decisions,so makeScalarizationDecisions sees the group's single
address use. Mostly no change yet, as the legacy cost model still
marks those addresses uniform.
Needed by https://github.com/llvm/llvm-project/pull/244728.
Follow-up to earlier
movehttps://github.com/llvm/llvm-project/pull/243789
[SystemZ] Select WCEFB/WCELFB/WCFEB/WCLFEB for vector-element conversions (#245369)
On z15, use the scalar-in-vector convert instructions when one side of
an i32<->f32 conversion already lives in a vector register:
* (s|u)itofp of an extracted <4 x i32> element -> WCEFB/WCELFB, using
VREPF first for elements 1-3.
* fptosi/fptoui whose i32 result goes into element 0 of a vector
(scalar_to_vector, insert into undef, or splat) -> WCFEB/WCLFEB.
This avoids the GPR round trip (vlgvf + cefbr, cfebr + vlvgf). GPR<->FPR
conversions and variable-index extracts are unchanged.
Also fix the dest/source operand types of VCFEB/VCLFEB/WCFEB/WCLFEB
(which were reversed) and VCEFB/VCELFB (v128g -> v128f).
Add vec-conv-04.ll and vec-strict-conv-04.ll, including negative and z14
checks.
Assisted by: IBM Bob
[SystemZ] Add missing CC def to TRANSLATE EXTENDED (TRE) (#245460)
TRE sets the condition code (0: operand processed, 1: test character
found, 3: CPU-determined amount processed), but its definition did not
list CC as an implicit def.
Adding the def raises TRE's write count from two to three, so update the
TRE scheduling entries for z196 through z17 to match (as for CU41/CU42).
Assisted by: IBM Bob
[SystemZ] Support ISD::AVGCEILS and ISD::AVGCEILU (#244786)
Mark ISD::AVGCEILS and ISD::AVGCEILU as legal for vector types on z13+
and for i128 on z17 (VectorEnhancements3). Match them to VAVG* and
VAVGL* instructions while preserving mappings for existing s390
intrinsics.
Assisted by: IBM Bob
acpi_spmc: Make Intel device-specific state optional
The Intel Low Power S0 Idle _DSM specification marks the minimum
device-specific state of a constraint package as optional, and its own
example returns {0xFF, 0}. Requiring three elements rejected such
constraints, with one boot message each.
Reviewed by: olce
Approved by: olce
Fixes: 508efe35e577 ("acpi_spmc: Check Intel constraint packages")
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/134
fetch: look the server list up once
When the SRV records or the mirror list of a repository cannot be resolved,
pkg falls back on the host of its URL, but the list was only cached on
success: the failing lookup, which is slow on a network without DNS, was
done again for every file fetched from the repository, and its error was
reported as many times.
Remember that the list could not be resolved for the repository, so that a
run looks it up once and reports it once.
Reported in #2786.
[clang] Make documentation warnings faster with --warning-suppression-mappings= (#244714)
...when the warning suppression mapping does not modify documentation
warnings.
Sema::areDocumentationDiagsEnabled() used to always go into the
sourceloc-dependent slow path if --warning-suppression-mappings= was
used.
Instead, only go down the slow path if the warning suppression mappings
actually modify documentation warning diags.
Reorder the existing code a bit to make sure this new logic can't get out
of sync with the existing logic, and make DiagSuppressionMapping a
unique_ptr to a pImpl instead of a functor to give easy access to its keys.
For 119 Chromium TUs drawn with probability proportional to their
compile time in a build of `chrome`:
[6 lines not shown]
[X86][GlobalISel] Use a class with sub_8bit for G_ZEXT from s1 (#245181)
selectZext lowers G_ZEXT from s1 to an INSERT_SUBREG of IMPLICIT_DEF
followed by an AND. The INSERT_SUBREG result used the full destination
class, but in 32-bit mode only some registers have 8-bit subregisters,
and in 64-bit mode GR64 includes RIP which has none. TwoAddress turns the
INSERT_SUBREG into a sub_8bit def of that register, which fails machine
verification with "Invalid subregister index for virtual register".
Use getSubClassWithSubReg to pick a class that supports sub_8bit.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[offload][debug] Add REPORT_WARN and REPORT_FATAL macros
Add two new macros in the same style as REPORT(). REPORT_WARN prints a warning,
while REPORT_FATAL prints a fatal error and aborts the program.
Assisted-by: Claude Sonnet 5.5
[X86][GlobalISel] Use INSERT_SUBREG of IMPLICIT_DEF for any-extensions (#242335)
G_ANYEXT, the any-extension of copies into wider physical registers
generated by ABI lowering, and the any-extension of a 16-bit GPR copied
to an XMM register were all selected to SUBREG_TO_REG. SUBREG_TO_REG
means that the instruction defining the source register also defined
the other bits of the wider register, which is not true for 8-bit and
16-bit x86 operations, or for copies of 32-bit values from physical
registers. Use INSERT_SUBREG into an IMPLICIT_DEF instead, which leaves
the other bits undefined, as SelectionDAG does for any-extensions.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
install|upgrade: tell that --fetch-only only downloads
The summary of a --fetch-only operation was the one of a real operation:
it asked to proceed with "this action" and announced the space which would
be freed or required, although nothing is installed, upgraded or removed
and only the packages are downloaded.
Say so in the summary, ask to proceed with the download, and leave the
space announcement out. Add pkg_jobs_get_flags(), the counterpart of
pkg_jobs_set_flags(), to let the frontend know about the flags of the
jobs.
Reported in #2716.
install: resolve the ownership in the root directory
The users and groups of a package were resolved with getpwnam(3) and
getgrnam(3), which read the database of the host: a file declared as
belonging to a user of the root directory pkg installs into was given the
id the host knows for that name, or 0 when the host does not know it at
all, so the files were not owned by their user in the target.
Read the user and group databases of the root directory instead when pkg
installs into one, and keep resolving on the host when the files are not
there or do not carry the name. pkg check, which resolves the names the
same way, compares against the right ids too.
Reported in #2179.
fetch: retry a transfer which fails in the middle
Only the connection set up was retried, FETCH_RETRY times per server, so a
connection which died in the middle of a large package aborted the whole
transaction and the bytes already downloaded were dropped.
Retry the transfer itself, the same number of times, resuming the package
where it stopped: the archives are opened for appending and the request is
ranged, which is the mechanism already used to resume a package left over
by an interrupted run.
Reported in #2786.
geom: Restore group operator
Traditionally, in BSD, the operator group has been intended for backup
operators and has been granted read-only access to disks and related
devices. This includes geom.ctl, because backup operators need to be
able to dump partition tables.
Unfortunately, the geom.ctl device previously lacked proper access
control, and anyone with read access to it was able to modify GEOM
configuration, including modifying or destroying partitions, RAID
volumes, etc. As a workaround, the ownership of geom.ctl was changed to
root:wheel so that only users who presumably already have root
privileges were able to access it.
Now that access control has been implemented, we can restore the
original ownership so backup operators can once more dump partition
tables.
This reverts commit 7d576f1d657fc21f97cedc28cc971621ee2490a7.