[Mesa-dev] [PATCH 07/10] i965/fs: Add pass to combine immediates.
Kenneth Graunke
kenneth at whitecape.org
Tue Feb 17 16:47:07 PST 2015
On Tuesday, February 17, 2015 04:17:48 PM Matt Turner wrote:
> On Tue, Feb 17, 2015 at 3:45 PM, Kenneth Graunke <kenneth at whitecape.org> wrote:
> > On Wednesday, February 04, 2015 08:21:24 PM Matt Turner wrote:
[snip]
> >> + /* Remove constants from the table that don't have enough uses to make them
> >> + * profitable to store in a register.
> >> + */
> >> + for (int i = 0; i < table.len;) {
> >> + struct imm *imm = &table.imm[i];
> >> +
> >> + if (imm->uses_by_coissue < 4) {
> >> + table.imm[i] = table.imm[table.len - 1];
> >> + table.len--;
> >> + continue;
> >> + }
> >> + i++;
> >
> > Whatever reason i++ had for being here doesn't appear to exist anymore -
> > move it inside the for(...)?
>
> I think it is right, actually.
>
> If we find an immediate we don't want to promote, we overwrite it with
> the last element in the table and then continue without incrementing i
> so that we get the same i value again.
I missed that. Nevermind then :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150217/7d924e17/attachment.sig>
More information about the mesa-dev
mailing list