[PATCH] D130560: [RISCV] Handle register spill in branch relaxation
Aditya Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 28 20:52:30 PDT 2022
hiraditya added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVFrameLowering.cpp:1076
+ // Far branches over 20-bit offset require a spill slot for scratch register.
+ if (!isInt<20>(EstimateFunctionSizeInBytes(MF, *TII))) {
+ int FI = MFI.CreateStackObject(RegInfo->getSpillSize(*RC),
----------------
Can we make an API like `isFarBranch` or something like it? Other places can reuse it possibly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130560/new/
https://reviews.llvm.org/D130560
More information about the llvm-commits
mailing list