[Mesa-dev] [PATCH 10/30] i965/vec4: Reverse inclusion dependency between brw_vec4_live_variables.h and brw_vec4.h.

Francisco Jerez currojerez at riseup.net
Mon Mar 14 03:47:14 UTC 2016


brw_vec4.h (in particular vec4_visitor) is logically a user of the
live variables analysis pass, not the other way around.
brw_vec4_live_variables.h requires the definition of some VEC4 IR data
structures to compile, but those can be obtained directly from
brw_ir_vec4.h without including brw_vec4.h.
---
 src/mesa/drivers/dri/i965/brw_vec4.cpp                | 1 -
 src/mesa/drivers/dri/i965/brw_vec4.h                  | 4 +---
 src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp | 2 +-
 src/mesa/drivers/dri/i965/brw_vec4_live_variables.h   | 3 +--
 4 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index baf72a2..a3d1f7c 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -27,7 +27,6 @@
 #include "brw_vs.h"
 #include "brw_nir.h"
 #include "brw_vec4_builder.h"
-#include "brw_vec4_live_variables.h"
 #include "brw_dead_control_flow.h"
 #include "program/prog_parameter.h"
 
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index d43a5a8..b56b35d 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -29,6 +29,7 @@
 
 #ifdef __cplusplus
 #include "brw_ir_vec4.h"
+#include "brw_vec4_live_variables.h"
 #endif
 
 #include "compiler/glsl/ir.h"
@@ -52,9 +53,6 @@ brw_vec4_generate_assembly(const struct brw_compiler *compiler,
 } /* extern "C" */
 
 namespace brw {
-
-class vec4_live_variables;
-
 /**
  * The vertex shader front-end.
  *
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp b/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp
index b4476ef..8e1efa4 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp
@@ -25,7 +25,7 @@
  *
  */
 
-#include "brw_cfg.h"
+#include "brw_vec4.h"
 #include "brw_vec4_live_variables.h"
 
 using namespace brw;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_live_variables.h b/src/mesa/drivers/dri/i965/brw_vec4_live_variables.h
index ae8e406..a6e04b2 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_live_variables.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4_live_variables.h
@@ -28,12 +28,11 @@
 #ifndef BRW_VEC4_LIVE_VARIABLES_H
 #define BRW_VEC4_LIVE_VARIABLES_H
 
+#include "brw_ir_vec4.h"
 #include "util/bitset.h"
-#include "brw_vec4.h"
 
 namespace brw {
 
-
 class vec4_live_variables {
 public:
    struct block_data {
-- 
2.7.0



More information about the mesa-dev mailing list