Mesa (main): intel/compiler: Add cfg_t::adjust_block_ips() method
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 14 17:20:18 UTC 2021
Module: Mesa
Branch: main
Commit: 8ca1bc5f947d17483f778c3abec99ca9f225b748
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=8ca1bc5f947d17483f778c3abec99ca9f225b748
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Thu Jul 1 10:24:01 2021 -0700
intel/compiler: Add cfg_t::adjust_block_ips() method
Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11632>
---
src/intel/compiler/brw_cfg.h | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/src/intel/compiler/brw_cfg.h b/src/intel/compiler/brw_cfg.h
index 90af5a95f14..9e2726f453b 100644
--- a/src/intel/compiler/brw_cfg.h
+++ b/src/intel/compiler/brw_cfg.h
@@ -324,6 +324,12 @@ struct cfg_t {
void dump();
void dump_cfg();
+
+ /**
+ * Propagate bblock_t::end_ip_delta data through the CFG.
+ */
+ inline void adjust_block_ips();
+
#endif
const struct backend_shader *s;
void *mem_ctx;
@@ -437,6 +443,21 @@ cfg_t::last_block() const
__scan_inst = (__type *)__scan_inst->prev)
#ifdef __cplusplus
+inline void
+cfg_t::adjust_block_ips()
+{
+ int delta = 0;
+
+ foreach_block(block, this) {
+ block->start_ip += delta;
+ block->end_ip += delta;
+
+ delta += block->end_ip_delta;
+
+ block->end_ip_delta = 0;
+ }
+}
+
namespace brw {
/**
* Immediate dominator tree analysis of a shader.
More information about the mesa-commit
mailing list