[llvm-dev] live-in lists during register allocation

Matthias Braun via llvm-dev llvm-dev at lists.llvm.org
Wed Jun 19 06:21:51 PDT 2019


The per-block live-in lists? No. (assuming things have changed since last year).

They were intended only for post-ra passes and are only setup during the final rewriting pass.

- Matthias

> On Jun 18, 2019, at 10:12 PM, Jonas Paulsson <paulsson at linux.vnet.ibm.com> wrote:
> 
> Hi,
> 
> I wonder if live-in lists can be trusted to be accurate during register allocation / foldMemoryOperandImp().
> 
> On SystemZ, a compare register-register which has one of the registers spilled can fold that reload into a compare register-memory instruction. In order to do this also with the first (LHS) register, the operands must be swapped. This can only reasonably be done when all the CC users are in the same basic block and so can be found in order to reverse their condition operands, which must be done. The first check for this is to know if the CC register is live into any successor block.
> 
> I know there has been corrupt live-in lists in the past found, but I think that was some passes after register allocation.
> 
> Would it be safe to rely on live-in lists in foldMemoryOperandImpl()?
> 
> Thanks,
> 
> Jonas
> 



More information about the llvm-dev mailing list