Hi,
On 21.12.2017 22:19, Mark Janes wrote:
This patch doesn't apply to master as formatted.
It was against master. Could you try the attached patch instead?
I assume I had screwed something when I inlined it to my earlier mail. :-/
I've reverted the bisected commit, since it disables testing on master.
My fix is rather obvious, just moving few lines, to make sure loop is
incremented every round, like it was before the bad commit.
- Eero
Eero Tamminen <eero.t.tammi...@intel.com> writes:
Fixes: 9702fac68e (spirv: consider bitsize when handling OpSwitch cases)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104359
---
src/compiler/spirv/vtn_cfg.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/compiler/spirv/vtn_cfg.c b/src/compiler/spirv/vtn_cfg.c
index 9c4cbe2..3d5de37 100644
--- a/src/compiler/spirv/vtn_cfg.c
+++ b/src/compiler/spirv/vtn_cfg.c
@@ -549,19 +549,19 @@ vtn_cfg_walk_blocks(struct vtn_builder *b, struct
list_head *cf_list,
struct vtn_block *case_block =
vtn_value(b, *w, vtn_value_type_block)->block;
- if (case_block == break_block)
- continue;
-
- vtn_assert(case_block->switch_case);
-
- vtn_order_case(swtch, case_block->switch_case);
-
if (bitsize <= 32) {
w += 2;
} else {
assert(bitsize == 64);
w += 3;
}
+
+ if (case_block == break_block)
+ continue;
+
+ vtn_assert(case_block->switch_case);
+
+ vtn_order_case(swtch, case_block->switch_case);
}
enum vtn_branch_type branch_type =
--
2.7.4
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
diff --git a/src/intel/compiler/brw_fs_copy_propagation.cpp b/src/intel/compiler/brw_fs_copy_propagation.cpp
index af5635eacef..92cc0a8de58 100644
--- a/src/intel/compiler/brw_fs_copy_propagation.cpp
+++ b/src/intel/compiler/brw_fs_copy_propagation.cpp
@@ -186,8 +186,7 @@ fs_copy_prop_dataflow::setup_initial_values()
/* Populate the initial values for the livein and liveout sets. For the
* block at the start of the program, livein = 0 and liveout = copy.
- * For the others, set liveout to 0 (the empty set) and livein to ~0
- * (the universal set).
+ * For the others, set liveout and livein to ~0 (the universal set).
*/
foreach_block (block, cfg) {
if (block->parents.is_empty()) {
@@ -197,7 +196,7 @@ fs_copy_prop_dataflow::setup_initial_values()
}
} else {
for (int i = 0; i < bitset_words; i++) {
- bd[block->num].liveout[i] = 0u;
+ bd[block->num].liveout[i] = ~0u;
bd[block->num].livein[i] = ~0u;
}
}
@@ -228,34 +227,17 @@ fs_copy_prop_dataflow::run()
do {
progress = false;
- /* Update liveout for all blocks. */
foreach_block (block, cfg) {
if (block->parents.is_empty())
continue;
for (int i = 0; i < bitset_words; i++) {
const BITSET_WORD old_liveout = bd[block->num].liveout[i];
-
- bd[block->num].liveout[i] =
- bd[block->num].copy[i] | (bd[block->num].livein[i] &
- ~bd[block->num].kill[i]);
-
- if (old_liveout != bd[block->num].liveout[i])
- progress = true;
- }
- }
-
- /* Update livein for all blocks. If a copy is live out of all parent
- * blocks, it's live coming in to this block.
- */
- foreach_block (block, cfg) {
- if (block->parents.is_empty())
- continue;
-
- for (int i = 0; i < bitset_words; i++) {
- const BITSET_WORD old_livein = bd[block->num].livein[i];
BITSET_WORD livein_from_any_block = 0;
+ /* Update livein for this block. If a copy is live out of all
+ * parent blocks, it's live coming in to this block.
+ */
bd[block->num].livein[i] = ~0u;
foreach_list_typed(bblock_link, parent_link, link, &block->parents) {
bblock_t *parent = parent_link->block;
@@ -278,7 +260,12 @@ fs_copy_prop_dataflow::run()
*/
bd[block->num].livein[i] &= livein_from_any_block;
- if (old_livein != bd[block->num].livein[i])
+ /* Update liveout for this block. */
+ bd[block->num].liveout[i] =
+ bd[block->num].copy[i] | (bd[block->num].livein[i] &
+ ~bd[block->num].kill[i]);
+
+ if (old_liveout != bd[block->num].liveout[i])
progress = true;
}
}
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev