[llvm-dev] "Earlyclobber" but for a subset of the inputs
Roger Ferrer Ibáñez via llvm-dev
llvm-dev at lists.llvm.org
Mon May 4 23:37:43 PDT 2020
Hi Quentin,
> It sounds like you only need the earlyclobber description for the N, N
> variant.
> In other words, as long as you use different opcodes for widen-op NN and
> widen-op WN, you model exactly what you want.
>
> What am I missing?
>
we are using different opcodes for widen-op NN and widen-op WN.
My understanding is that not setting earlyclobber to the W, N variant would
allow the RegAlloc to do an allocation like this
W1 = widen-op W2, N3
but this is not correct in that target because W1 and N3 are of different
kind and W1 (being the group of registers N2, N3) overlaps N3.
If I understand earlyclobber semantics correctly, earlyclobber would
allocate the destination to something that doesn't overlap W2 and also
doesn't overlap N3. For instance
W3 = widen-op W2, N3
But because the dest is a W register the target's constraint only applies
to N3, not to W2, so the following should be OK (however RegAlloc would
never make such an assignment under earlyclobber)
W2 = widen-op W2, N3
In principle earlyclobber is always going to do allocations that are
correct for the target but there are a valid ones that will be missed.
Kind regards,
--
Roger Ferrer Ibáñez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200505/d6a4a207/attachment.html>
More information about the llvm-dev
mailing list