================
@@ -250,6 +286,9 @@ struct MachineSMEABI : public MachineFunctionPass {
SmallVector<ZAState> BundleStates;
----------------
gbossu wrote:
We are starting to accumulate a lot of state, which makes the code harder to
follow as it allows any member function to modify it instead of having clear
ins/outs.
I know we discussed that already
[here](https://github.com/llvm/llvm-project/pull/149062#discussion_r2276758787),
but I feel it would be nice not to delay the refactoring too much. Even having
a first step that collects all the info in a struct would help. We could then
pass that info around by const ref to any function that needs it. If some info
needs to be mutable, then it should not be in the struct, and be a clear in/out
parameter.
Doing something like this would clearly decouple the "collection" phase from
the "let me correctly handle the state changes" phase.
https://github.com/llvm/llvm-project/pull/149064
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits