[PATCH] D98716: [NFC][CodeGen] Separate TargetRegisterInfo needsStackRealignment and canRealignStack
Tomas Matheson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 26 07:11:07 PDT 2021
tmatheson added a comment.
> needsStackRealignment feels too strong given that the target can say we're not realigning the stack anyway. How about something like hasImpliedStackRealignment? And a partner function to call both called something like hasStackRealignment? And a partner function to call both called something like hasStackRealignment?
How about the following naming?
- `shouldRealignStack` - true if there is any reason the stack should be realigned
- `canRealignStack` - true if we are still able to realign the stack (e.g. we can still reserve/have reserved a frame pointer)
- `hasStackRealignment = shouldRealignStack && canRealignStack` (not target customisable, for now at least)
Then targets are free to error on `shouldRealignStack && !canRealignStack` if appropriate, or ignore/work around it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98716/new/
https://reviews.llvm.org/D98716
More information about the llvm-commits
mailing list