[Mesa-dev] [PATCH 00/24] i965: Refactor register classes
Kenneth Graunke
kenneth at whitecape.org
Wed Nov 11 15:20:42 PST 2015
On Monday, November 02, 2015 04:29:10 PM Matt Turner wrote:
> backend_reg (from which fs_reg, src_reg, and dst_reg inherit) includes a
> brw_reg that's used for "hardware regs" -- precolored registers or architecture
> registers. This leads to properties like source modifiers, the register type,
> swizzles, and writemasks being duplicated between the derived classes and the
> brw_reg and of course often being out of sync.
>
> This series removes the "fixed_hw_reg" field from backend_reg by just making
> backend_reg inherit from brw_reg, and then removes fields duplicated in the
> derived classes. In the process, it gets rid of HW_REG.
>
> This in turn simplifies a lot of code -- no longer do you have to check a
> number of subfields if file == HW_REG.
>
> The last few patches begin some clean ups -- since the base of our register
> classes is now brw_reg we don't need to do as many conversions. I've only
> handled immediates so far and more is planned, but the series is growing large
> and is a lot of churn already.
>
> The sizes of the register classes all shrink by 8 bytes:
>
> backend_reg 20 -> 12
> fs_reg 40 -> 32
> src_reg 32 -> 24?
> dst_reg 32 -> 24?
>
> The remaining fields in the classes are
>
> backend_reg: reg_offset
> fs_reg: reladdr, subreg_offset, stride
> src_reg reladdr
> dst_reg reladdr
Assuming you address my and Emil's feedback, the series is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
This is an invasive enough refactor that I believe running the
assembly diffing tool would be worthwhile.
Nice work :) I like the result.
-------------- 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/20151111/4d2059ec/attachment.sig>
More information about the mesa-dev
mailing list