[PATCH] D125787: [RISCV] Fix RVV stack frame alignment bugs
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 20 13:19:52 PDT 2022
reames added a comment.
Still trying to wrap my head around this code. In the process, I've got a small cleanup to propose. https://reviews.llvm.org/D126088
Thinking about what this code does, I think we've got two pieces:
- Step 1 - Pick a base register (FP, SP, or BP). There's some legality aspects in this selection (we can't index across either dynamic realign or var sized objects since we don't know their sizes), but it's also a profitability decision.
- Step 2 - Given choice from 1, compute offset expression.
I'm wondering if it makes sense to separate the code out this way. If we had a function which only did step 2, then having the asserts to make sure we didn't try to cross var sized objects becomes easy. It also becomes easy to ensure that e.g. all the SP offset paths stay in sync.
Thoughts?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125787/new/
https://reviews.llvm.org/D125787
More information about the llvm-commits
mailing list