diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-03-03 13:55:33 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-05 14:35:38 +0000 |
commit | 07228a6895b4b57efaf55e7e6b180e308ceab879 (patch) | |
tree | 512b4764ba201a5fa3ebd1e3f18d499f44503e89 | |
parent | 546c301ff6d12cad678b6feb1c83cf75eb36def1 (diff) |
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 <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>
-rw-r--r-- | src/panfrost/bifrost/bi_tables.c | 22 | ||||
-rw-r--r-- | 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 |