[llvm-branch-commits] [llvm] [AArch64] Prepare for split ZPR and PPR area allocation (NFCI) (PR #142391)
Sander de Smalen via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jul 10 05:20:06 PDT 2025
================
@@ -19,6 +19,11 @@
namespace llvm {
+struct SVEStackSizes {
----------------
sdesmalen-arm wrote:
The only places where `SVEStackSizes` are used, are in the context of unsigned values (the function `setStackSizeSVE` and the variables `SVELocals` and `SVEStackSize`), except for the case where you chose to use `int64_t` for `SVELocals` and `SVEStackSize` even though their sizes are always non-negative. If the value can never be negative and it's only ever used in contexts where the derived value is never negative, then I think it should be an unsigned value.
The size will at some point need converting to a signed offset, but that's already the case and the code that does the conversion from a size -> offset will need to guarantee the value does not overflow. Which brings me to the data-type `uint64_t`; other places for these sizes use `unsigned` at the moment, so if you change this to `unsigned`, then the conversion to `int64_t` (as used in `StackOffset`) will never result in a different signedness.
https://github.com/llvm/llvm-project/pull/142391
More information about the llvm-branch-commits
mailing list