mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
aco: introduce a generic label for labelling instructions
When one instruction doesn't fit into the existing labels, use the generic one. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7425>
This commit is contained in:
parent
1a5400a9e9
commit
bda35ae6b9
1 changed files with 12 additions and 1 deletions
|
|
@ -114,10 +114,11 @@ enum Label {
|
|||
label_scc_needed = 1 << 26,
|
||||
label_b2i = 1 << 27,
|
||||
label_constant_16bit = 1 << 29,
|
||||
label_usedef = 1 << 30, /* generic label */
|
||||
};
|
||||
|
||||
static constexpr uint64_t instr_usedef_labels = label_vec | label_mul | label_mad | label_add_sub |
|
||||
label_bitwise | label_uniform_bitwise | label_minmax | label_vopc;
|
||||
label_bitwise | label_uniform_bitwise | label_minmax | label_vopc | label_usedef;
|
||||
static constexpr uint64_t instr_mod_labels = label_omod2 | label_omod4 | label_omod5 | label_clamp;
|
||||
|
||||
static constexpr uint64_t instr_labels = instr_usedef_labels | instr_mod_labels;
|
||||
|
|
@ -506,6 +507,16 @@ struct ssa_info {
|
|||
return label & label_b2i;
|
||||
}
|
||||
|
||||
void set_usedef(Instruction *label_instr)
|
||||
{
|
||||
add_label(label_usedef);
|
||||
instr = label_instr;
|
||||
}
|
||||
|
||||
bool is_usedef()
|
||||
{
|
||||
return label & label_usedef;
|
||||
}
|
||||
};
|
||||
|
||||
struct opt_ctx {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue