[all-commits] [llvm/llvm-project] 06e2b4: [RISCV] Optimize scalable frame setup when VLEN is...
Philip Reames via All-commits
all-commits at lists.llvm.org
Fri Nov 18 15:37:22 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 06e2b44c46243a74ba5682aa3225d79e45038651
https://github.com/llvm/llvm-project/commit/06e2b44c46243a74ba5682aa3225d79e45038651
Author: Philip Reames <preames at rivosinc.com>
Date: 2022-11-18 (Fri, 18 Nov 2022)
Changed paths:
M llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
M llvm/test/CodeGen/RISCV/rvv/rv64-spill-vector-csr.ll
Log Message:
-----------
[RISCV] Optimize scalable frame setup when VLEN is precisely known
If we know the exact value of VLEN, the frame offset adjustment for scalable stack slots becomes a fixed constant. This avoids the need to read vlenb, and may allow the offset to be folded into the immediate field of an add/sub.
We could go further here, and fold the offset into a single larger frame adjustment - instead of having a separate scalable adjustment step - but that requires a bit more code reorganization. I may (or may not) return to that in a future patch.
Differential Revision: https://reviews.llvm.org/D137593
More information about the All-commits
mailing list