Attributor: Get the associated value of a call site argument from its use
IRPosition::getAssociatedValue computed the argument number of a call site
argument from its use to look up the argument operand, which is the value
of the use. NFC.
CTMark instructions:u with -attributor-enable=light changes by O3 -0.19%,
ThinLTO -0.20%. The attributor-light pass itself is 2.1-4.2% faster
(callgrind), and 1.2-1.6% faster with the other pending Attributor
compile-time changes applied.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Attributor: Only look for callback arguments of call site arguments
IRPosition::getArgNo called getAssociatedArgument for any position when
asked for the callee argument number, e.g., for the attribute index of
every argument position, although only call site arguments can be
associated with a different argument. NFC.
Exact instructions (callgrind) on pre-optimization CTMark bitcode, on top
of the other Attributor compile-time changes:
light module light CGSCC module CGSCC
sqlite3 -0.32% -0.28% -0.10% -0.13%
kimwitu++ k.cc -0.44% -0.36% -0.23% -0.24%
SPASS cnf.c -0.30% -0.27% -0.13% -0.37%
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[InstCombine] Fix demanded classes for fptrunc/fptrunc_round (#240523)
Fixes `simplifyDemandedUseFPClassFPTrunc` so that `bf16 = fptrunc(f32)`
and `f80 = fptrunc(f128)` both demand a `fcSubnormal` source for a
`fcNormal` result. This is because `bf16 =
fptrunc(float32-max-subnormal)` rounds up to `bfloat16-min-normal`.
This PR also adds non-trivial test coverage for `fptrunc.round`.
AI Disclosure:
I used Claude Opus 5 to help write the tests.
[InstCombine] Correctly handle input denormal modes for roundToIntegral subnormal folds (#238204)
Fixes https://github.com/llvm/llvm-project/issues/237855
Corrects input denormal handling for the subnormal and copysign folds
for the `roundToIntegral` family of functions. Also adds test coverage
for these folds.
[CIR] Do not assume function aliases are dso_local under PIC (#234753)
For PIC code that is not a PIE, shouldAssumeDSOLocal marks a function
dso_local when it can use a local alias, as classic codegen does.
Classic applies that only to real functions, never to aliases. CIR
represents a function alias as a FuncOp with an aliasee, so the check
now skips aliases. The flag does not reach LLVM IR yet, because MLIR's
translation drops dso_local on aliases. #234012 fixes that.
Assisted-by: Cursor / claude-opus-5.5
[clang][Builtins] West Const (#240926)
Make these more consistent with the rest of the code base, despite not
documenting the preference in the style guide. The builtins emitter
needs an update as a result.
Link:
https://github.com/llvm/llvm-project/pull/231696#discussion_r4492428422
Attributor: Query the memory effects of a call site once (#240725)
Instead of separately checking mayRead / mayWrite, directly compute
the full memory effects.
attributor-light is 0.1-0.25% faster (callgrind).
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[Mips] Update newpm-pipeline.ll after #235051 (#240924)
#235051 dropped the emit-debug-entry-values parameter from the printed
live-debug-values pass and updated the X86 and RISC-V pipeline tests,
but the Mips NewPM pipeline test had gained checks for it in the
meantime, so it fails on main.
Assisted-by: Claude Opus 5.5
Remove the TrueSearch warning from the SMB search_protocols docs
The description of search_protocols in v27 and v28 is again the text
that it had before TrueSearch. The WebShare search field keeps its
warning.
[AMDGPU] Reduce resource align when shrinking buffer loads
Since the `align` on buffer intrinsics includes the offset argument,
the demand, `simplifyAMDGCNMemoryIntrinsicDemanded` needs to account
for the value added to that offset, which might reduce the alignment
of the load.
AI disclosure: Claude wrote the code, I looked at it and wrote the
commit message.
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[mlir][mem2reg] Allow memory operations to own wrapped blocking uses (#233705)
Allow PromotableMemOpInterface operations to own blocking uses of a
wrapped memory access, enabling Mem2Reg to promote loads and stores
through the wrapper. Add Test dialect coverage for supported and
rejected cases.
This is to extend mem2reg mechanism to handle masked
trasnfer_read/write, where mask op uses region just to embed one op. See
follow-up PR for the interface usage:
https://github.com/llvm/llvm-project/pull/234251
assisted-by-claude
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply at anthropic.com>
[AMDGPU] Pre-commit tests for buffer load shrinking with align
Buffer load demanded elements analysis isn't shrinking the `align`
annotated on the intrinsic correctly.
AI disclosure: Claude wrote these, I wrote this message
Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
[mlir][flang][OpenMP] Honor inclusive iterator bounds in translation
Translation of omp.iterator ignored the `inclusive` flag and always treated
the upper bound as inclusive, so `(%c1 to %c5 step %c1)` produced five
iterations instead of four.
Compute each range's trip count according to the flag, and document that a
range excludes its upper bound unless `inclusive` is specified. Flang now
marks the iterators it creates as `inclusive`, so its DEPEND and AFFINITY
lists are unchanged.
Translation flattens all ranges into one loop and recovers each iterator
value by dividing by its range's trip count. An empty range makes the loop
run zero times, but with constant bounds the body still contained a division
by zero. Divide by one in that case; the body only runs when every trip
count is nonzero, so results are unchanged. Equal bounds now form an empty
range unless `inclusive` is set, which makes this case more common.
Assisted with Claude Opus 5.5.
[libc][test][NFC] Align typed test macros and names with GoogleTest (#240608)
LibcTest's typed test support used 3-argument TYPED_TEST and
TYPED_TEST_F
macros, testing::TypeList, ParamType, and manual REGISTER_TYPE_NAME
specializations. GoogleTest instead uses testing::Types,
TYPED_TEST_SUITE,
and a 2-argument TYPED_TEST macro that exposes TypeParam.
Align LibcTest and its typed unit tests with GoogleTest's macro
signatures
and type names so typed tests compile unchanged against either backend.
Naming the GetTypeName template parameter TypeParam produces
"[TypeParam = ...]" directly from __PRETTY_FUNCTION__ without
<typeinfo>,
making the unused REGISTER_TYPE_NAME macro unnecessary.
Part of #91630
Assisted-by: Gemini
tpm_crb: Use locality registers only with plain CRB
The locality release wait times out on every command on a Framework 13
(Pluton start method), logging every 10 seconds.
Reported by: emaste, tuexen
Reviewed by: kbowling
Approved by: kbowling
Fixes: bfe4be85a935 ("tpm_crb: wait for idle and locality release after each command")
Attributor: Test the allowed kinds of abstract attributes with a bit mask (#240914)
The set of enabled AAs was previously a dense set of the attribute ID
pointers which were constructed every run and have many hash table
collisions. Replace it with a compile time bitmask and array. The
kinds declared in Attributor.h are tested with a compile-time computed
bitmask and other kinds declared in AMDGPUAttributor use the array.
CTMark instructions:u with -attributor-enable=light changes by O3
-0.07%,
ThinLTO -0.09%. attributor-light is 0.7-4.4% faster (callgrind).
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
NAS-145072 / 27.0.0 / Use truenas_smbhad for SMB stateful failover (by anodos325) (#20165)
Samba now replicates SMB durable handles to the standby controller with
the truenas_smbhad daemon. This replaces the ctdb implementation.
- Remove ctdb and the clustered TDB code. passdb, group mapping, share
ACLs and secrets are local to each controller again.
- Stop setting "clustering" in smb.conf.
- Write /etc/truenas_smbhad.conf with the controller node on HA systems.
Reload the daemon when a license change modifies the file.
- Keep smbd stopped on the standby. Restart it on takeover, because it
restores handles only at startup.
- Log the daemon to /var/log/truenas_smbhad.log.
- Remove the update block for stateful failover.
- Add unit tests and HA tests.
Original PR: https://github.com/truenas/middleware/pull/20072
Co-authored-by: Andrew Walker <andrew.walker at truenas.com>
18650 l2arc_arcstats_pos reads misspelled kstat arcsats.l2_asize
Reviewed by: Toomas Soome <tsoome at me.com>
Approved by: Gordon Ross <gordon.w.ross at gmail.com>
18582 raw receive of an encrypted dataset fails when the target has user accounting
Portions contributed by: George Amanakis <gamanakis at gmail.com>
Portions contributed by: Rich Ercolani <rincebrain at gmail.com>
Portions contributed by: Alexander Motin <mav at FreeBSD.org>
Portions contributed by: loli10K <ezomori.nozomu at gmail.com>
Portions contributed by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed by: George Wilson <gwilson at zfsmail.com>
Approved by: Gordon Ross <gordon.w.ross at gmail.com>
18624 Fix consistency of ztest_device_removal_active
Imported from: OpenZFS c40a1124e1d1010b665909ad31d2904630018f6f
Reviewed by: Matthew Ahrens <mahrens at delphix.com>
Reviewed by: Serapheim Dimitropoulos <serapheim at delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed by: George Wilson <gwilson at zfsmail.com>
Approved by: Gordon Ross <gordon.w.ross at gmail.com>