intel/compiler: Reverse inclusion dependency between brw_fs_live_variables.h and...
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 10 Mar 2016 01:03:57 +0000 (17:03 -0800)
committerMatt Turner <mattst88@gmail.com>
Fri, 6 Mar 2020 18:20:26 +0000 (10:20 -0800)
brw_fs.h (in particular fs_visitor) is logically a user of the live
variables analysis pass, not the other way around.
brw_fs_live_variables.h requires the definition of some FS IR data
structures to compile, but those can be obtained directly from
brw_ir_fs.h without including brw_fs.h.  The dependency of
fs_live_variables on fs_visitor is rather accidental and will be
removed in a future commit, a forward declaration is enough for the
moment.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4012>

src/intel/compiler/brw_fs.h
src/intel/compiler/brw_fs_live_variables.cpp
src/intel/compiler/brw_fs_live_variables.h

index 543e760b3fe894d501dd53190b296b9d544babc1..c4af8e9d7091b17fa9350530995d598c10f48fde 100644 (file)
@@ -31,6 +31,7 @@
 #include "brw_shader.h"
 #include "brw_ir_fs.h"
 #include "brw_fs_builder.h"
+#include "brw_fs_live_variables.h"
 #include "compiler/nir/nir.h"
 
 struct bblock_t;
@@ -39,7 +40,6 @@ namespace {
 }
 
 namespace brw {
-   class fs_live_variables;
 }
 
 struct brw_gs_compile;
index 1e3e83a791864bb7a2f301a9759a21bfe7575c7d..cd19f41eab4acf079dde32ec25c0b62e2fb83a9b 100644 (file)
@@ -25,7 +25,7 @@
  *
  */
 
-#include "brw_cfg.h"
+#include "brw_fs.h"
 #include "brw_fs_live_variables.h"
 
 using namespace brw;
index d37901d6f8a0adb1e6b9941701daece0e2753df1..cdf48d004762af7d039ac9b833711c2fb47b3809 100644 (file)
 #ifndef BRW_FS_LIVE_VARIABLES_H
 #define BRW_FS_LIVE_VARIABLES_H
 
-#include "brw_fs.h"
+#include "brw_ir_fs.h"
 #include "util/bitset.h"
 
 struct cfg_t;
+class fs_visitor;
 
 namespace brw {