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

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 07:31:48 PDT 2017


uweigand added a comment.

The getRegAllocationHints implementation makes sense to me.  However, I'm wondering if we shouldn't also check for the *destination* register -- you only force one source register to the same class as the other source register, but I think we should check whether *any* of the three registers is already allocated, and then always force the other two to the same class.

I think if we do that consistently, we should be able to *guarantee* that we end up with a register assignment that is legal for the instruction, and can therefore completely remove the pass that creates a branch again.

Already constraining the the regclass in emitSelect may make sense as well, but we should verify that it still makes any difference once we've implemented the change above.  I agree that the LOCRXALTERNATE variant doesn't look very useful.


https://reviews.llvm.org/D36795





More information about the llvm-commits mailing list