i965/vec4: Simplify opt_reduce_swizzle() using the swizzle utils.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_vec4_live_variables.h
index b8ab95a1d9978728543563740dcdd0aa07b4d965..e9d9fa18d0a562e7bbbefd701c32f7907ffe0a0a 100644 (file)
@@ -25,6 +25,7 @@
  *
  */
 
+#include "util/bitset.h"
 #include "brw_vec4.h"
 
 namespace brw {
@@ -36,38 +37,45 @@ struct block_data {
     * Note that for our purposes, "defined" means unconditionally, completely
     * defined.
     */
-   bool *def;
+   BITSET_WORD *def;
 
    /**
     * Which variables are used before being defined in the block.
     */
-   bool *use;
+   BITSET_WORD *use;
 
    /** Which defs reach the entry point of the block. */
-   bool *livein;
+   BITSET_WORD *livein;
 
    /** Which defs reach the exit point of the block. */
-   bool *liveout;
+   BITSET_WORD *liveout;
+
+   BITSET_WORD flag_def[1];
+   BITSET_WORD flag_use[1];
+   BITSET_WORD flag_livein[1];
+   BITSET_WORD flag_liveout[1];
 };
 
 class vec4_live_variables {
 public:
-   DECLARE_RZALLOC_CXX_OPERATORS(vec4_live_variables)
+   DECLARE_RALLOC_CXX_OPERATORS(vec4_live_variables)
 
    vec4_live_variables(vec4_visitor *v, cfg_t *cfg);
    ~vec4_live_variables();
 
+   int num_vars;
+   int bitset_words;
+
+   /** Per-basic-block information on live variables */
+   struct block_data *block_data;
+
+protected:
    void setup_def_use();
    void compute_live_variables();
 
    vec4_visitor *v;
    cfg_t *cfg;
    void *mem_ctx;
-
-   int num_vars;
-
-   /** Per-basic-block information on live variables */
-   struct block_data *bd;
 };
 
 } /* namespace brw */