pan/bi: Add high-latency property for classes
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 3 Mar 2020 18:55:33 +0000 (13:55 -0500)
committerMarge Bot <eric+marge@anholt.net>
Thu, 5 Mar 2020 14:35:38 +0000 (14:35 +0000)
This is required to know how to schedule legally, and also influences
some issues relating to RA.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4061>

src/panfrost/bifrost/bi_tables.c
src/panfrost/bifrost/compiler.h

index 5d3de06e2227818bf22c0fc2eec230ff9830c816..3239e5670f600dc68d28e2b108695a13a1aea06a 100644 (file)
 
 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,
 };
index 4d9ab0789b8859b8d26bf24cb717c3ee51c3712e..7ffe9e51a3592db3dc6f8c78fcffca6e504041b3 100644 (file)
@@ -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