[all-commits] [llvm/llvm-project] a9b9c6: change rvv frame layout
luxufan via All-commits
all-commits at lists.llvm.org
Sat Mar 13 00:11:53 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a9b9c64fd4c8d456f11dcbd409cdd62116eb021f
https://github.com/llvm/llvm-project/commit/a9b9c64fd4c8d456f11dcbd409cdd62116eb021f
Author: luxufan <932494295 at qq.com>
Date: 2021-03-13 (Sat, 13 Mar 2021)
Changed paths:
M llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
M llvm/lib/Target/RISCV/RISCVFrameLowering.h
M llvm/lib/Target/RISCV/RISCVMachineFunctionInfo.h
M llvm/test/CodeGen/RISCV/rvv/access-fixed-objects-by-rvv.ll
M llvm/test/CodeGen/RISCV/rvv/allocate-lmul-2-4-8.ll
M llvm/test/CodeGen/RISCV/rvv/localvar.ll
M llvm/test/CodeGen/RISCV/rvv/memory-args.ll
M llvm/test/CodeGen/RISCV/rvv/rv32-spill-vector-csr.ll
M llvm/test/CodeGen/RISCV/rvv/rv32-spill-vector.ll
M llvm/test/CodeGen/RISCV/rvv/rv64-spill-vector-csr.ll
M llvm/test/CodeGen/RISCV/rvv/rv64-spill-vector.ll
A llvm/test/CodeGen/RISCV/rvv/rvv-framelayout.ll
M llvm/test/CodeGen/RISCV/rvv/vaadd-rv32.ll
M llvm/test/CodeGen/RISCV/rvv/vaaddu-rv32.ll
M llvm/test/CodeGen/RISCV/rvv/vadd-rv32.ll
M llvm/test/CodeGen/RISCV/rvv/vand-rv32.ll
M llvm/test/CodeGen/RISCV/rvv/vasub-rv32.ll
M llvm/test/CodeGen/RISCV/rvv/vasubu-rv32.ll
M llvm/test/CodeGen/RISCV/rvv/vssra-rv32.ll
M llvm/test/CodeGen/RISCV/rvv/vssrl-rv32.ll
Log Message:
-----------
change rvv frame layout
This patch change the rvv frame layout that proposed in D94465. In patch D94465, In the eliminateFrameIndex function,
to eliminate the rvv frame index, create temp virtual register is needed. This virtual register should be scavenged by class
RegsiterScavenger. If the machine function has other unused registers, there is no problem. But if there isn't unused registers,
we need a emergency spill slot. Because of the emergency spill slot belongs to the scalar local variables field, to access emergency
spill slot, we need a temp virtual register again. This makes the compiler report the "Incomplete scavenging after 2nd pass" error.
So I change the rvv frame layout as follows:
```
|--------------------------------------|
| arguments passed on the stack |
|--------------------------------------|<--- fp
| callee saved registers |
|--------------------------------------|
| rvv vector objects(local variables |
| and outgoing arguments |
|--------------------------------------|
| realignment field |
|--------------------------------------|
| scalar local variable(also contains|
| emergency spill slot) |
|--------------------------------------|<--- bp
| variable-sized local variables |
|--------------------------------------|<--- sp
```
Differential Revision: https://reviews.llvm.org/D97111
More information about the All-commits
mailing list