From 07228a6895b4b57efaf55e7e6b180e308ceab879 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 3 Mar 2020 13:55:33 -0500 Subject: [PATCH] pan/bi: Add high-latency property for classes This is required to know how to schedule legally, and also influences some issues relating to RA. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_tables.c | 22 +++++++++++----------- src/panfrost/bifrost/compiler.h | 4 ++++ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/panfrost/bifrost/bi_tables.c b/src/panfrost/bifrost/bi_tables.c index 5d3de06e222..3239e5670f6 100644 --- a/src/panfrost/bifrost/bi_tables.c +++ b/src/panfrost/bifrost/bi_tables.c @@ -28,27 +28,27 @@ unsigned bi_class_props[BI_NUM_CLASSES] = { [BI_ADD] = BI_GENERIC | BI_MODS | BI_SCHED_ALL, - [BI_ATEST] = BI_SCHED_ADD, - [BI_BRANCH] = BI_SCHED_ADD, + [BI_ATEST] = BI_SCHED_HI_LATENCY, + [BI_BRANCH] = BI_SCHED_HI_LATENCY, [BI_CMP] = BI_GENERIC | BI_MODS | BI_SCHED_ALL, - [BI_BLEND] = BI_ADD, + [BI_BLEND] = BI_SCHED_HI_LATENCY, [BI_BITWISE] = BI_GENERIC | BI_SCHED_ALL, [BI_CONVERT] = BI_SCHED_ALL | BI_SWIZZLABLE, [BI_CSEL] = BI_SCHED_FMA, - [BI_DISCARD] = BI_SCHED_ADD, + [BI_DISCARD] = BI_SCHED_HI_LATENCY, [BI_FMA] = BI_ROUNDMODE | BI_SCHED_FMA, [BI_FREXP] = BI_SCHED_ALL, - [BI_LOAD] = BI_SCHED_ADD, - [BI_LOAD_ATTR] = BI_SCHED_ADD, - [BI_LOAD_VAR] = BI_SCHED_ADD, - [BI_LOAD_VAR_ADDRESS] = BI_SCHED_ADD, + [BI_LOAD] = BI_SCHED_HI_LATENCY, + [BI_LOAD_ATTR] = BI_SCHED_HI_LATENCY, + [BI_LOAD_VAR] = BI_SCHED_HI_LATENCY, + [BI_LOAD_VAR_ADDRESS] = BI_SCHED_HI_LATENCY, [BI_MINMAX] = BI_GENERIC | BI_SCHED_ALL, [BI_MOV] = BI_MODS | BI_SCHED_ALL, [BI_SHIFT] = BI_SCHED_ALL, - [BI_STORE] = BI_SCHED_ADD, - [BI_STORE_VAR] = BI_SCHED_ADD, + [BI_STORE] = BI_SCHED_HI_LATENCY, + [BI_STORE_VAR] = BI_SCHED_HI_LATENCY, [BI_SPECIAL] = BI_SCHED_ADD | BI_SCHED_SLOW, [BI_SWIZZLE] = BI_SCHED_ALL | BI_SWIZZLABLE, - [BI_TEX] = BI_SCHED_ADD, + [BI_TEX] = BI_SCHED_HI_LATENCY, [BI_ROUND] = BI_GENERIC | BI_ROUNDMODE | BI_SCHED_ALL, }; diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 4d9ab0789b8..7ffe9e51a35 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -105,6 +105,10 @@ extern unsigned bi_class_props[BI_NUM_CLASSES]; /* Swizzling allowed for the 8/16-bit source */ #define BI_SWIZZLABLE (1 << 6) +/* For scheduling purposes this is a high latency instruction and must be at + * the end of a clause. Implies ADD */ +#define BI_SCHED_HI_LATENCY ((1 << 7) | BI_SCHED_ADD) + /* It can't get any worse than csel4... can it? */ #define BIR_SRC_COUNT 4 -- 2.30.2