[PATCH][regalloc] Fix the interference calculation for register masks.

Andrew Trick atrick at apple.com
Tue Nov 12 21:14:09 PST 2013

On Nov 12, 2013, at 8:30 PM, Juergen Ributzka <juergen at apple.com> wrote:

> Hi @ll,
> this patch fixes a false interference for register masks.
> Register masks are defined in the normal use/def register slot and therefore any register defined in the register mask should not interfere with a register assigned to the result of the same instruction.
> This hasn’t been a problem until now, because register make are used by call instructions and they don't have an explicit def. The patchpoint intrinsic may have an explicit def and the resulting code has unnecessary register copy instructions. This was due to the false interference with the register mask.
> This fixes <rdar://problem/15440848>

Thanks Juergen,

This isn’t the only place we check regmask interference. There’s also RAGreedy::tryLocalSplit. Let’s keep them consistent. Also, I think we should add a comment explaining why a regmask at the calls ‘r’ slot does not interfere with a live range defined at the same ‘r’ slot.

I don’t see a better way to do this, but copying Jakob just to be sure it’s the right fix.


More information about the llvm-commits mailing list