From ab9abc9052f1fe3b2067e6513114dda3c24decd0 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 14 Oct 2020 18:57:20 -0400 Subject: [PATCH] pan/bi: Add no_spill flag to IR Will be used to prevent double spills. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_print.c | 3 +++ src/panfrost/bifrost/compiler.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/panfrost/bifrost/bi_print.c b/src/panfrost/bifrost/bi_print.c index 00644cce2fb..447f89982ce 100644 --- a/src/panfrost/bifrost/bi_print.c +++ b/src/panfrost/bifrost/bi_print.c @@ -285,6 +285,9 @@ bi_print_instruction(bi_instruction *ins, FILE *fp) if (ins->skip) fprintf(fp, ".skip"); + if (ins->no_spill) + fprintf(fp, ".no_spill"); + if (ins->vector_channels) fprintf(fp, ".v%u", ins->vector_channels); diff --git a/src/panfrost/bifrost/compiler.h b/src/panfrost/bifrost/compiler.h index 1debc43f87b..65be6d0a7fa 100644 --- a/src/panfrost/bifrost/compiler.h +++ b/src/panfrost/bifrost/compiler.h @@ -314,6 +314,10 @@ typedef struct { /* For memory ops, base address */ enum bi_segment segment; + /* Can we spill the value written here? Used to prevent + * useless double fills */ + bool no_spill; + /* A class-specific op from which the actual opcode can be derived * (along with the above information) */