brw: Add brw_reg::is_grf
v2: Add a function comment. Suggested by Caio. Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38315>
This commit is contained in:
@@ -704,8 +704,7 @@ try_copy_propagate(brw_shader &s, brw_inst *inst,
|
||||
|
||||
const struct intel_device_info *devinfo = s.devinfo;
|
||||
|
||||
assert(entry->src.file == VGRF || entry->src.file == UNIFORM ||
|
||||
entry->src.file == ATTR || entry->src.file == FIXED_GRF);
|
||||
assert(entry->src.is_grf());
|
||||
|
||||
/* Avoid propagating a LOAD_PAYLOAD instruction into another if there is a
|
||||
* good chance that we'll be able to eliminate the latter through register
|
||||
|
||||
@@ -233,6 +233,17 @@ typedef struct brw_reg {
|
||||
bool is_ip() const { return brw_reg_is_arf(*this, BRW_ARF_IP); }
|
||||
bool is_address() const;
|
||||
|
||||
/**
|
||||
* These are all the things that will eventually become FIXED_GRF. The
|
||||
* things that will live in regular registers can, for the most part, be
|
||||
* treated the same by optimization passes.
|
||||
*/
|
||||
bool is_grf() const
|
||||
{
|
||||
return file == FIXED_GRF || file == VGRF || file == ATTR ||
|
||||
file == UNIFORM;
|
||||
}
|
||||
|
||||
unsigned address_slot(unsigned byte_offset) const;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user