summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/lima/ir/pp/ppir.h
diff options
context:
space:
mode:
authorVasily Khoruzhick <anarsoul@gmail.com>2021-03-11 19:36:00 -0800
committerMarge Bot <eric+marge@anholt.net>2021-03-14 16:39:26 +0000
commit951788b5601de46132adfcb9c01e3d03eafd72b3 (patch)
tree0d669ccaa4bb539b8d7f375d2d49d405263a962c /src/gallium/drivers/lima/ir/pp/ppir.h
parentd2ca8be9985144ba5661a32e1ffdd23e988cfcfa (diff)
downloadmesa-951788b5601de46132adfcb9c01e3d03eafd72b3.tar.gz
lima/ppir: don't use list_length() in loop in regalloc and liveness analysis
list_length() complexity is O(n), so it's better to store number of regs separately and use it instead of list_length(). Reviewed-by: Erico Nunes <nunes.erico@gmail.com> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9570>
Diffstat (limited to 'src/gallium/drivers/lima/ir/pp/ppir.h')
-rw-r--r--src/gallium/drivers/lima/ir/pp/ppir.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/lima/ir/pp/ppir.h b/src/gallium/drivers/lima/ir/pp/ppir.h
index 8344a0038d6..8fce4fd0f4e 100644
--- a/src/gallium/drivers/lima/ir/pp/ppir.h
+++ b/src/gallium/drivers/lima/ir/pp/ppir.h
@@ -378,6 +378,7 @@ typedef struct ppir_compiler {
int cur_instr_index;
struct list_head reg_list;
+ int reg_num;
/* array for searching ssa/reg node */
ppir_node **var_nodes;