[llvm] [RISCV64] liveness analysis (PR #167454)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 6 05:47:40 PST 2025
hiraditya wrote:
> * Not clear to me why RiscV needs another analysis when we already have `LiveIntervals` (and we also have the old/deprecated `LiveVariables`; this would add a 3rd variant into the mix...)
LiveInterval is quite heavy and best suitable for reg-alloc (as it is being used today) but...
> * If you want to use this pass anyway: At least consider using the existing `LivePhysRegs` / `LiveRegUnits` helpers to perform liveness analysis within a basic block. They reduce the risk of getting tricky bits like early clobbers or the unintuitive/bad moddeling for return blocks ("pristine registers", ...); subregisters/aliasing, ...
... I'll look into this if these can be repurposed. For now, the reg alias set (MCRegAliasIterator) combined with RISCVLiveVariables::isTrackableRegister should be taking care of the non-interesting registers.
https://github.com/llvm/llvm-project/pull/167454
More information about the llvm-commits
mailing list