[PATCH] D36795: [SystemZ] Increase number of LOCRs emitted by passing regalloc hints

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 05:12:27 PDT 2017


jonpa added a comment.

> So my thought that if both registers are still GRX32, then getRegAllocationHints for the first register would return both high and low options. Then, once regalloc chooses one of them, and getRegAllocationHints is later called on the *other* register, we know it must be in the same class, so we return only the low or only the high options. Does it not work this way?

My understanding is that once one of the registers are allocated, we can only try to pass *hints* for the other register. Regalloc will then first try to use any hint, but if all of them are allocated it is still free to use other registers in GRX32. So I think if we want to make a guarantee, we must constrain the reg-class of the register. Or could it perhaps be possible to add a method to AllocationOrder such as "hardenHints()", which would actually remove non-hinted registers from the allocation order?


https://reviews.llvm.org/D36795





More information about the llvm-commits mailing list