[llvm] Revert "[InlineSpiller] Check rematerialization before folding operand (#134015)" (PR #137801)

via llvm-commits llvm-commits at lists.llvm.org
Mon May 19 13:09:44 PDT 2025


weiguozhi wrote:

> > Can I pass RegClassInfo into InlineSpiller, and call RegClassInfo.getOrder() to get the similar information?
> 
> I'm not sure that's much better, it's still the inliner trying to perform an assignment

The spiller doesn't need to do actual register assignment, it needs to check if an assignment is possible. It is required to decide if rematerialization or folded load is better.

How about do this check in register allocator, then spiller can call this function through a RegAllocBase pointer?

https://github.com/llvm/llvm-project/pull/137801


More information about the llvm-commits mailing list