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

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 28 15:29:31 PDT 2017


MatzeB added a comment.

In https://reviews.llvm.org/D31908#740062, @Carrot wrote:

> In https://reviews.llvm.org/D31908#738929, @MatzeB wrote:
>
> > This hits on a known problem in llvms CodeGen today: There is no good way to differentiate between a register use/def that is required because of ABI (or other) constraints and just a normal assignment by the register allocator. Only the latter can be renamed/recolored which makes it tricky to it correctly today.
> >
> > I personally don't care about AggressiveAntiDepBreaker too much. However this "fix" seems pretty pessimistic/conservative to me: As I understand it you just exclude all the callee saves from renaming. I think targets that rely on the anti dep breaker (seems to be used by PowerPC/Hexagon today) should at least do some benchmarking before accepting this.
>
>
> The patch also checks (RegRefs.count(AntiDepReg) == 1), with this condition, it almost ensures the instruction is callee saved register restore instruction, if it is not, it should be some other rare cases.


Oh indeed that sounds a lot less conservative as I initially assumed. So the effect on performance is probably minimal/negligible.


https://reviews.llvm.org/D31908





More information about the llvm-commits mailing list