summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_opt_gcm.c
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2019-06-04 13:02:31 +0200
committerConnor Abbott <[email protected]>2019-06-19 14:08:28 +0200
commita1c737927c0d96f26ce487930aa9a2ed323814c9 (patch)
treee5a1de6ef6eaf87e9c51d317a45ec8c2353b87b7 /src/compiler/nir/nir_opt_gcm.c
parent6fc83c253f5b6eacf9497558173c1b01262facb9 (diff)
nir: Add a helper to determine if an intrinsic can be reordered
This is simple now, but we're going to be adding a few more conditions to this later. Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir_opt_gcm.c')
-rw-r--r--src/compiler/nir/nir_opt_gcm.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/compiler/nir/nir_opt_gcm.c b/src/compiler/nir/nir_opt_gcm.c
index e7d3f8ec424..aeae2ad6401 100644
--- a/src/compiler/nir/nir_opt_gcm.c
+++ b/src/compiler/nir/nir_opt_gcm.c
@@ -152,11 +152,7 @@ gcm_pin_instructions_block(nir_block *block, struct gcm_state *state)
break;
case nir_instr_type_intrinsic: {
- const nir_intrinsic_info *info =
- &nir_intrinsic_infos[nir_instr_as_intrinsic(instr)->intrinsic];
-
- if ((info->flags & NIR_INTRINSIC_CAN_ELIMINATE) &&
- (info->flags & NIR_INTRINSIC_CAN_REORDER)) {
+ if (nir_intrinsic_can_reorder(nir_instr_as_intrinsic(instr))) {
instr->pass_flags = 0;
} else {
instr->pass_flags = GCM_INSTR_PINNED;