[llvm-dev] ShrinkWrap pass problems
林作健 via llvm-dev
llvm-dev at lists.llvm.org
Thu Aug 15 00:21:21 PDT 2019
Hi,
I find ShrinkWrap pass has two problems in the function useOrDefCSROrFI:
1. When a MI is a terminator, it doesn't return false immediately.
The tail call returns may clobber the CSRs, but should not treat as
use the CSRs.
2. When a MO is a register, it determines if it's used by checking
if it is inside the LastCalleeSavedAlias set. But I think its better
to check if it is inside the set returned by getCurrentCSRs.
getCurrentCSRs's return value comes from target frame lowering's
determineCalleeSaves. Actually, my project add some extra registers
got spilled as CSR at the entry of a function.
So, pay attention to these problems and thank you for a discussion.
---
Zuojian Lin
More information about the llvm-dev
mailing list