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

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 14:20:25 PDT 2017


Carrot added a comment.

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.


https://reviews.llvm.org/D31908





More information about the llvm-commits mailing list