[all-commits] [llvm/llvm-project] 82c820: [RISCV] Enable the LocalStackSlotAllocation pass s...

luxufan via All-commits all-commits at lists.llvm.org
Wed Oct 19 01:16:27 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 82c820b95cf7ec284baf182cf838ca9e26758098
  Author: luxufan <luxufan at iscas.ac.cn>
  Date:   2022-10-19 (Wed, 19 Oct 2022)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVFrameLowering.h
    M llvm/lib/Target/RISCV/RISCVRegisterInfo.cpp
    M llvm/lib/Target/RISCV/RISCVRegisterInfo.h
    M llvm/test/CodeGen/RISCV/local-stack-slot-allocation.ll

  Log Message:
  [RISCV] Enable the LocalStackSlotAllocation pass support

For RISC-V, load/store(exclude vector load/store) instructions only
has a 12 bit immediate operand. If the offset is out-of-range, it
must make use of a temp register to make up this offset. If between
these offsets, they have a small(IsInt<12>) relative offset,
LocalStackSlotAllocation pass can find a value as frame base register's
value, and replace the origin offset with this register's value plus
the relative offset.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D98101

More information about the All-commits mailing list