[PATCH][regalloc] Fix the interference calculation for register masks.
Jakob Stoklund Olesen
jolesen at apple.com
Wed Nov 13 08:54:44 PST 2013
On Nov 12, 2013, at 9:14 PM, Andrew Trick <atrick at apple.com> wrote:
> 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.
A register mask operand is supposed to be just a shortcut notation for a set of dead defs, with the same semantics. You seem to be introducing a different liveness model for register masks here that I don't quite understand. Can you clarify?
If you're actually changing the liveness model, I'm a bit skeptical that you can pull it off by tweaking a couple inequalities.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits