nak/calc_instr_deps: Set a delay of 13 for flow ops pre-Volta

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30381>
This commit is contained in:
Faith Ekstrand
2024-07-23 23:40:02 -05:00
committed by Marge Bot
parent c29980b218
commit 8050b57c28
2 changed files with 25 additions and 8 deletions

View File

@@ -476,6 +476,10 @@ fn exec_latency(sm: u8, op: &Op) -> u32 {
// CCTL.C needs 8, CCTL.I needs 11
11
}
_ if sm < 70 && (op.is_crs_push() || op.is_branch()) => {
// pre-Volta needs a delay for control-flow ops
13
}
// Op::DepBar(_) => 4,
_ => 1, // TODO: co-issue
}

View File

@@ -5961,6 +5961,26 @@ pub enum Op {
}
impl_display_for_op!(Op);
impl Op {
pub fn is_crs_push(&self) -> bool {
match self {
Op::SSy(_) | Op::PBk(_) | Op::PCnt(_) => true,
_ => false,
}
}
pub fn is_branch(&self) -> bool {
match self {
Op::Bra(_)
| Op::Sync(_)
| Op::Brk(_)
| Op::Cont(_)
| Op::Exit(_) => true,
_ => false,
}
}
}
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
pub enum PredRef {
None,
@@ -6254,14 +6274,7 @@ impl Instr {
}
pub fn is_branch(&self) -> bool {
match &self.op {
Op::Bra(_)
| Op::Sync(_)
| Op::Brk(_)
| Op::Cont(_)
| Op::Exit(_) => true,
_ => false,
}
self.op.is_branch()
}
pub fn uses_global_mem(&self) -> bool {