[Lldb-commits] [lldb] [lldb][AArch64][Linux] Track all register cache validity in one place (PR #197113)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Fri May 15 02:30:28 PDT 2026
DavidSpickett wrote:
> In this change I've expanded the existing RegisterSetType enum to be used as part of a singular cache tracking object which replaces all the separate booleans. These booleans were hard to track and set/reset in the right places.
An alternative to this would be to use `std::optional<whatever>` for all of the storage. This changes the order of operations to:
* storage.emplace() to make the thing valid
* ptrace(read whatever ....)
* if failure, reset the optional
I still think you would have some MakeValid type function that knows what to emplace, and some things (SME's ZA) would need an explicit validity bool, but it might work and if we could get free asserts from optional, that'd be nice.
I'm going to give that a go as an alternative approach.
https://github.com/llvm/llvm-project/pull/197113
More information about the lldb-commits
mailing list