[PATCH] D31908: [AntiDepBreaker] Don't rename callee saved register restore instruction

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 16:56:05 PDT 2017


Carrot added a comment.

In https://reviews.llvm.org/D31908#744019, @MatzeB wrote:

> > 1 The function MFI.getPristineRegs(MF) gets all registers actually saved in the function, not necessary at the prolog position if shrink wrapping has occurred.
>
> This statement is wrong! getPristineRegs() gives you all ABI callee saved registers that are not save/restored anywhere in the function (because the register was never modified or clobbered, so the save/restore so there was no need for a save/restore).


Thank you for the correction, actually I want to say

The condition !Pristine.test(Reg) can only check if the specified callee saved register has been saved in the function, but not necessary at the prolog position if shrink wrapping has occurred.


https://reviews.llvm.org/D31908





More information about the llvm-commits mailing list