[PATCH] D46315: [RegUsageInfoCollector] Fix handling of callee saved registers with CSR optimization.

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 14:56:03 PDT 2018


qcolombet added a comment.

> Would it work to instead use RegUnits, so that we first collect all saved/restored RegUnits, and then check which registers have all their RegUnits saved?

No, unless you can prove that the units cover the whole register.  For instance, there is no unit covering the high part of ymm0. So we would think it is okay to make it preserved when only the known unit is preserved whereas it is not.

That said, Krzysztof added the support to describe such "anonymous" units in r328016, so if we can prove that all the registers are properly covered, we can do that. An alternative of proving that, would be to have the target explicitly say whether or not their register units covers the full registers.


https://reviews.llvm.org/D46315





More information about the llvm-commits mailing list