[AMDGPU] Re-enable AAInstanceInfo in AMDGPUAttributor
This was enabled and then disabled because of its compile time impact. This
recent changes, the compile time issue should have been resolved.
[CIR] Add TBAA support for scalar loads and stores (#246079)
Port classic CodeGenTBAA to CIR. CIRGen attaches access tags to
`cir.load` and `cir.store`, following classic CodeGen at each site where
an access is built, and LowerToLLVM turns them into `!tbaa` metadata.
The attributes follow the ClangIR incubator, except that type
descriptors store no CIR type. Tags therefore survive passes that
rewrite types, and lowering does not need the AST.
Left for follow-ups: vtable-pointer tags, `tbaa.struct`, atomics,
`!llvm.errno.tbaa` (needed for `-fmath-errno`), and `-new-struct-path-tbaa`.
This relates to #160387 and #169226.
Co-authored-by: PikachuHy <pikachuhy at linux.alibaba.com>
[DebugInfo][FLMD] Add MIR printing/parsing support for !!dbgLoc
Extending from the IR printing/parsing support, this adds !!dbgLoc parsing
to the MIR parser, and has the MIR printing passes access the conversion
layer via the ModuleSlotTracker. Just as with regular debug-location
attachments in MIR, we print the attachments in their expanded/in-line form
if the same attachment did not appear in the IR, because the IR module may
have already been printed, and thus we cannot add new metadata IDs to the
printed output - in this case, we cannot add to the SrcLocs or InlinedAts
storage arrays.
Note that we can meaningfully print the SrcLoc in-line, but not the
InlinedAt, since that has a unique identity - this is a case that is very
unlikely to be stimulated however, and (I believe) already exists as a
deficiency in current IR, so we accept its absence for now. If this were
to become a significant issue, then we could implement in-line InlinedCall
printing.
AI assistance was used to partially generate the test input in this patch;
all test comments/checks were hand-written.
[DebugInfo][FLMD] Add Bitcode read/write support for !!dbgLoc
This patch adds support for reading and writing !!dbgLoc attachments to
instructions/debug records (FLDebugLoc), and also for !DIDbgLoc which
contains an FLDebugLoc argument. Besides adding the bitcode representation
itself, this adds support for converting from FLDebugLoc->DILocation in the
MetadataLoader.
[DebugInfo][FLMD] Add parsing for expanded !!dbgLoc attachments
This patch expands the textual IR parsing support added previously, to
also support parsing "expanded" FLDebugLocs, where the SrcLoc fields (line,
column, scope) are all printed in-line. This adds some complications to
parsing, primarily in that it requires us to read and write to the
MDFunctionLocalContext pre-verifier, and that we need yet another form of
"forward-reference" state tracking.
[DebugInfo][FLMD] Add !!dbgLoc and !DIDbgLoc textual IR parsing
This patch adds support for parsing !!dbgLoc attachments to Instructions
and DbgRecords, and also !DIDbgLoc nodes which contain !!dbgLoc fields.
This patch necessarily makes use of the DebugLoc Conversion Map, which is
used this time to read FLDebugLocs and convert to DILocations.
This patch doesn't add support for parsing the expanded form of !!dbgLoc;
that is added in the next patch, which extends the FLMDAttachment variant
to include expanded dbgLocs.
AI assistance was used in generating the test IR added in this commit; all
comments are human-written and the test expects are generated by
update_test_checks, and the IR is unmodified (besides comments) opt output.
[DebugInfo][FLMD] Add printing support for FLDebugLoc+DIDbgLoc
This patch follows up on the preceding patch by adding support for
printing FLDebugLoc as an attachment `!!dbgLoc(...)` for instructions and
debug records, and for printing DIDbgLoc nodes which contain a !!dbgLoc
operand.
A major component of this patch is the addition of a "DebugLoc conversion"
layer, which allows for conversion between DILocation and FLDebugLoc
formats. This is currently only used for converting DILocation->FLDebugLoc
for printing, but provides a common mechanism that will later be used for
FLDebugLoc<->DILocation conversion for printing+parsing, switching between
the two depending on which format is currently being used in-memory. Due to
the constraint of needing to support consistent conversions at different
points in time (primarily for MIR printing and lazy bitcode
materialization), some information is stored in the LLVMContext, including
a third representation of source location information, stored in a format
which is easy to convert to/from either existing format.
[11 lines not shown]
[FLMD][DebugInfo] Add classes for function-local DebugLocs
This patch adds two new classes. The first, FLDebugLoc, represents a
DebugLoc in a function-local context; combined with the correct
`!MDFunctionLocalContext`, this class is equivalent in information to a
`!DILocation`, with some exceptions (IsImplicitCode is not included,
IRLayers are to-be-implemented). The second, DIDbgLoc, is a new
MDNode type which wraps an `MDFunctionLocalContext*` and an `FLDebugLoc`.
This makes it an effective substitute for `DILocation` in metadata,
able to replicate the interface of `DILocation` entirely. Implementation
of this interface is added in a later patch.
Add MDFunctionLocalContext support to update_test_checks
The new `!MDFunctionLocalContext` metadata type is unique in that it may
be printed across multiple lines, which causes the update_test_checks
script to only generate checks, and transitively find other metadata, for
the opening line. This patch fixes this by recording multiple lines for
metadata, where the first line ends with '[' and the last line ends with
'])', matching the printed format of `!MDFunctionLocalContext`.
[DebugInfo][FLMD] Add bitcode printing/parsing for function context (#236801)
This patch adds support for bitcode printing/parsing for
MDFunctionLocalContext. This is an unusual entry in that it contains
multiple variable-length arrays, and collectively comprises a
potentially very large (technically up to ~2^32, realistically >10000 is
possible) number of records. There is no abbreviation, since the
existing abbreviation mechanism does not easily translate to this case.
Also unique is that, as with the LLParser, we use a custom forward
reference resolution. In this case, we track the metadata IDs rather
than maintaining a TrackingMDRef, and resolve these at the general
metadata resolution step, where the MetadataList has been finalized.
Finally, the ValueEnumerator for an MDFunctionLocalContext has to be
adapted to examine the `getUsedMDNodes` result from the context; this is
done by using an operand index instead of an `MDNode::op_iterator`, and
examining either `operands` or `getUsedNodes` accordingly.
NAS-144444 / 27.1.0 / Start SMB after upgrade when no DC is reachable (by anodos325) (#20347)
A new boot environment has no machine account entries in secrets.tdb, so
winbindd and smbd fail at boot. The restore from the config DB ran only
after a DC lookup, and when that failed directoryservices.setup stopped
before starting SMB.
- Restore secrets.tdb before the DC lookup.
- If recovery fails, still restart the dependent services, then
re-raise.
- Add an AD integration test that blocks the DCs.
Original PR: https://github.com/truenas/middleware/pull/20342
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
Resume the ZIL when zil_suspend() fails with a cookie
On a pool older than version 27, if a snapshot fails because the
dataset's ZIL can't be written out (for example, the pool suspends),
the ZIL stays suspended and the dataset stays held, so it can't be
destroyed and the pool can't be exported. zil_suspend() hands the
snapshot code a cookie even when it fails, and the snapshot code only
resumes on success.
Have zil_suspend() resume the ZIL itself whenever it fails, as it
already does on its other error paths.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Matthew Ahrens <matt at mahrens.org>
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Closes #19887
Bump -current mbedtls package so that it stays ahead of -stable
Their signature is different because of the libmbedtls.so minor bump
in -stable vs major bump in -current.
ZTS: don't mix files and disks where 4K disks reject it
zpool_add_001_pos, slog_013_pos and zvol_misc_fua fail on disks with 4K
sectors: "adding devices with different physical sector sizes is not
allowed". Each adds file or loop vdevs (512-byte sectors) and $DISKS to
the same pool without -f, which only works when the disks have 512-byte
physical sectors too, as in upstream CI.
- zpool_add_001_pos: add sparse files instead of $DISKS, so that every
pool is made only of files.
- zvol_misc_fua: use a second disk as the log instead of a file.
- slog_013_pos: this test adds file and loop logs to a disk pool on
purpose, so pass --allow-ashift-mismatch to those zpool add calls.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alan Somers <asomers at gmail.com>
Signed-off-by: Matthew Ahrens <matt at mahrens.org>
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
Closes #19881
Closes #19893
ZTS: use a 128k block in zdb_decompress
zdb_decompress fails on pools whose ashift is 12 (disks with 4K
physical or logical sectors). Its 4K lzjb block can't save a whole
sector at ashift 12, so it is stored uncompressed (1000L/1000P), and
"zdb -R :d" finds nothing to decompress. Upstream CI uses 512-byte
vdevs, where the block compresses.
- Use a 128K recordsize, which compresses by at least one sector at
any ashift.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: Alan Somers <asomers at gmail.com>
Signed-off-by: Matthew Ahrens <matt at mahrens.org>
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
Closes #19893
SECURITY update to mbedtls-3.6.8
See https://github.com/Mbed-TLS/mbedtls/releases/#release-mbedtls-3.6.8
for a list of CVEs/issues.
Backporting this to -stable with a minor bump only, the only removed
symbol - mbedtls_ssl_tls13_key_schedule_stage_early - was internal and
unused by ports/the ecosystem. Shortcut double-checked by tb@
ZTS: create the gang_blocks ashift=9 pools on file vdevs
On disks with 4K logical sectors (4Kn), "zpool create -o ashift=9"
gives ashift 12, since a disk vdev's ashift can't be below its logical
sector size. Three gang_blocks tests depend on 512-byte sectors:
- gang_blocks_redundant and gang_blocks_special_fallback force every
allocation of 1500 bytes or more to gang. At ashift 12, compressed
blocks and gang members take at least 4K, and a 4K block can't be
split into gang members, so the forced ganging fails the write,
testpool suspends, and the test hangs until the pool is cleared.
- gang_blocks_dyn_header_neg fails, because the pool it checks for
not using dynamic gang headers is really ashift 12.
Upstream CI uses 512-byte file and loop vdevs, where the tests pass.
- Create the pools of these three tests on sparse files, which
cleanup removes.
[5 lines not shown]
[X86] LowerFunnelShift - don't pre-apply modulo mask before splitting large vectors with a splat shift amount (#247715)
We should prefer SPLAT(AND(AMT,BW-1)) to AND(SPLAT(AMT),BW-1)) - we're
unwrapping the SPLAT anyhow, but splitting the instruction can prevent
further shuffle folding.
Avoids a use case for the AND(X,0) SimplifyDemandedVectorElts fold that
is causing so many POISON issues.