[RFC][NFCI][Constants] Add `Constant::isZeroValue`
The old `isZeroValue` was removed because it was functionally identical to
`Constant::isNullValue`. Currently, a "null value" in LLVM means a zero value.
We are moving toward changing the semantics of `ConstantPointerNull` to
represent a semantic null pointer instead of a zero-valued pointer. As a result,
the meaning of "null value" will also change in the future.
This PR series is the first step toward renaming the two widely used "null
value" interfaces to "zero value". As the first PR in the series, this change
adds a "new" `isZeroValue` alongside `isNullValue`, and makes `isNullValue` call
`isZeroValue` directly. Then, all uses of `isNullValue` in LLVM are replaced
with `isZeroValue`. Uses in other projects will be updated in separate PRs.
The plan is to eventually remove `isNullValue` after all uses have been
migrated.
Add middleware support for LIO ALUA HA
Wire up the middleware side of LIO ALUA high-availability: load
lio_ha.ko with per-node addresses on service start, manage ALUA
state across failover events, clean up STANDBY configfs on pool
export, and add pre-flight validation that targets have static
initiator ACLs before ALUA can be enabled.
For each target, create a portal-less phantom TPG carrying the peer
node's controller group so that a single RTPG response from any
connected port lists both ALUA groups. Write tpgt_N/rtpi explicitly
before enable so that relative target port IDs in RTPG match the
tag formula (portal.tag on Node A, portal.tag + 32000 on Node B)
rather than being auto-assigned sequentially by the kernel.
ALUA group states are driven by role and ha_state:
MASTER + synced local=OPTIMIZED remote=NONOPTIMIZED
MASTER + connected local=OPTIMIZED remote=TRANSITIONING
[4 lines not shown]
dns/powerdns-recursor: fix cherry-pick misadventure
In the original cherry-pick, I had not cherry-picked the update to
5.4.0, causing some required hunks to be missing. This should fix
those missing bits for real.
PR: 294749
Fixes: 2eb9a17bf93c7001a27b30e09a323b7cf79c3469
Reported by: Ralf van der Enden <tremere at cainites.net>
[lldb] IRForTarget::UnfoldConstant should return an llvm::Error (#195322)
UnfoldConstant returns a boolean and logs errors to a stream. However,
the prevailing pattern is to return an Error object and let the caller
decide what to do with it.
Currently, these error messages are dumped out to stdout when LLDB
encoutners an issue. I decided not to change that behavior with this
commit to keep it simple and self-contained.
I also reformatted and simplified some code in UnfoldConstant where it
was relatively easy.
[docs] Document the usage of operators on RVV sized types (#194979)
We have existing support in clang for operator overloading on RVV
builtin types when those types are sized. This can be achieved through a
combination of the -mrvv-vector-bits=N command line (to communicate
exact VLEN to the compiler) and the riscv_rvv_vector_bits attribute on
the types themselves. We have fairly complete test coverage for this in
clang/test/CodeGen/RISCV/rvv-vls-*.ll.
Our documentation did not reflect this reality, so this patch updates
the documentation to match the actual support.
Patch written by Claude, with minor sanity checking by me.
[RFC][NFCI][Constants] Add `Constant::isZeroValue`
The old `isZeroValue` was removed because it was functionally identical to
`Constant::isNullValue`. Currently, a "null value" in LLVM means a zero value.
We are moving toward changing the semantics of `ConstantPointerNull` to
represent a semantic null pointer instead of a zero-valued pointer. As a result,
the meaning of "null value" will also change in the future.
This PR series is the first step toward renaming the two widely used "null
value" interfaces to "zero value". As the first PR in the series, this change
adds a "new" `isZeroValue` alongside `isNullValue`, and makes `isNullValue` call
`isZeroValue` directly. Then, all uses of `isNullValue` in LLVM are replaced
with `isZeroValue`. Uses in other projects will be updated in separate PRs.
The plan is to eventually remove `isNullValue` after all uses have been
migrated.
[Codegen] Initialize RValue IsVolatile field in constructor (#195556)
Static analysis flagged that in some cases IsVolatile is left
uninitialzed. I adjusted the constructor to initialize IsVolatile.
[clang] Add formal linkage to textual AST dump (#194600)
This PR adds formal linkage (external, module, internal) to the textual
AST dumps. The motivation is to inform users (including ourselves) what
Clang thinks the linkage is, and to prevent situations where `extern` is
mistaken for an indication of external linkage (see #192116 for an
example).
The wording around linkage is known to be defective, but that's the best
we have: [[basic.link]](https://eel.is/c++draft/basic.link) paragraphs 3
through 7.
There are enough changes in this PR, so I decided to defer adding formal
linkage to JSON dumps to another PR.
(Open questions and suggestions for reviewers are in
https://github.com/llvm/llvm-project/pull/194600#issuecomment-4360515791)
---------
Co-authored-by: Matheus Izvekov <mizvekov at gmail.com>