[spirv-reader] remove exclusive_false_head_for
Code cleanup
Bug: tint:3
Change-Id: I8d1c4e8a486b3c3cccb13e0a265269606278fb97
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/23080
Reviewed-by: dan sinclair <dsinclair@google.com>
diff --git a/src/reader/spirv/function.cc b/src/reader/spirv/function.cc
index 2763c9a..bf9ce5f 100644
--- a/src/reader/spirv/function.cc
+++ b/src/reader/spirv/function.cc
@@ -1343,9 +1343,6 @@
false_head_info->false_head_for = construct.get();
if_header_info->false_head = false_head_info;
}
- if ((!contains_true) && contains_false) {
- false_head_info->exclusive_false_head_for = construct.get();
- }
if ((true_head_info->header_for_merge != 0) &&
(true_head_info->header_for_merge != construct->begin_id)) {
diff --git a/src/reader/spirv/function.h b/src/reader/spirv/function.h
index db753f2..30fe252 100644
--- a/src/reader/spirv/function.h
+++ b/src/reader/spirv/function.h
@@ -149,10 +149,6 @@
/// control reconverges between the "then" and "else" clauses, but before
/// the merge block for that selection.
const Construct* premerge_head_for = nullptr;
- /// The construct for which this block is the false head, and that construct
- /// does not have a true head.
- /// TODO(dneto): I think we can remove |exclusive_false_head_for|
- const Construct* exclusive_false_head_for = nullptr;
/// If not null, then this block is an if-selection header, and |true_head| is
/// the target of the true branch on the OpBranchConditional.
/// In particular, true_head->true_head_for == this
diff --git a/src/reader/spirv/function_cfg_test.cc b/src/reader/spirv/function_cfg_test.cc
index 4150cae..3984f3b 100644
--- a/src/reader/spirv/function_cfg_test.cc
+++ b/src/reader/spirv/function_cfg_test.cc
@@ -6687,7 +6687,6 @@
EXPECT_EQ(bi->false_head_for, nullptr);
EXPECT_EQ(bi->premerge_head_for, nullptr);
EXPECT_EQ(bi->premerge_head_for, nullptr);
- EXPECT_EQ(bi->exclusive_false_head_for, nullptr);
}
TEST_F(SpvParserTest, FindIfSelectionInternalHeaders_ThenElse) {
@@ -6718,7 +6717,6 @@
EXPECT_EQ(bi20->true_head_for->begin_id, 10u);
EXPECT_EQ(bi20->false_head_for, nullptr);
EXPECT_EQ(bi20->premerge_head_for, nullptr);
- EXPECT_EQ(bi20->exclusive_false_head_for, nullptr);
auto* bi30 = fe.GetBlockInfo(30);
ASSERT_NE(bi30, nullptr);
@@ -6726,7 +6724,6 @@
ASSERT_NE(bi30->false_head_for, nullptr);
EXPECT_EQ(bi30->false_head_for->begin_id, 10u);
EXPECT_EQ(bi30->premerge_head_for, nullptr);
- EXPECT_EQ(bi30->exclusive_false_head_for, nullptr);
}
TEST_F(SpvParserTest, FindIfSelectionInternalHeaders_IfOnly) {
@@ -6754,7 +6751,6 @@
EXPECT_EQ(bi30->true_head_for->begin_id, 10u);
EXPECT_EQ(bi30->false_head_for, nullptr);
EXPECT_EQ(bi30->premerge_head_for, nullptr);
- EXPECT_EQ(bi30->exclusive_false_head_for, nullptr);
}
TEST_F(SpvParserTest, FindIfSelectionInternalHeaders_ElseOnly) {
@@ -6782,8 +6778,6 @@
ASSERT_NE(bi30->false_head_for, nullptr);
EXPECT_EQ(bi30->false_head_for->begin_id, 10u);
EXPECT_EQ(bi30->premerge_head_for, nullptr);
- ASSERT_NE(bi30->exclusive_false_head_for, nullptr);
- EXPECT_EQ(bi30->exclusive_false_head_for->begin_id, 10u);
}
TEST_F(SpvParserTest, FindIfSelectionInternalHeaders_Regardless) {
@@ -6817,14 +6811,12 @@
ASSERT_NE(bi20->false_head_for, nullptr);
EXPECT_EQ(bi20->false_head_for->begin_id, 10u);
EXPECT_EQ(bi20->premerge_head_for, nullptr);
- EXPECT_EQ(bi20->exclusive_false_head_for, nullptr);
auto* bi80 = fe.GetBlockInfo(80);
ASSERT_NE(bi80, nullptr);
EXPECT_EQ(bi80->true_head_for, nullptr);
EXPECT_EQ(bi80->false_head_for, nullptr);
EXPECT_EQ(bi80->premerge_head_for, nullptr);
- EXPECT_EQ(bi80->exclusive_false_head_for, nullptr);
}
TEST_F(SpvParserTest, FindIfSelectionInternalHeaders_Premerge_Simple) {
@@ -6860,7 +6852,6 @@
EXPECT_EQ(bi80->false_head_for, nullptr);
ASSERT_NE(bi80->premerge_head_for, nullptr);
EXPECT_EQ(bi80->premerge_head_for->begin_id, 10u);
- EXPECT_EQ(bi80->exclusive_false_head_for, nullptr);
}
TEST_F(SpvParserTest,
@@ -6897,7 +6888,6 @@
EXPECT_EQ(bi20->true_head_for->begin_id, 10u);
EXPECT_EQ(bi20->false_head_for, nullptr);
EXPECT_EQ(bi20->premerge_head_for, nullptr);
- EXPECT_EQ(bi20->exclusive_false_head_for, nullptr);
auto* bi30 = fe.GetBlockInfo(30);
ASSERT_NE(bi30, nullptr);
@@ -6906,14 +6896,12 @@
EXPECT_EQ(bi30->false_head_for->begin_id, 10u);
ASSERT_NE(bi30->premerge_head_for, nullptr);
EXPECT_EQ(bi30->premerge_head_for->begin_id, 10u);
- EXPECT_EQ(bi30->exclusive_false_head_for, nullptr);
auto* bi80 = fe.GetBlockInfo(80);
ASSERT_NE(bi80, nullptr);
EXPECT_EQ(bi80->true_head_for, nullptr);
EXPECT_EQ(bi80->false_head_for, nullptr);
EXPECT_EQ(bi80->premerge_head_for, nullptr);
- EXPECT_EQ(bi80->exclusive_false_head_for, nullptr);
}
TEST_F(SpvParserTest,
@@ -6951,7 +6939,6 @@
EXPECT_EQ(bi20->false_head_for, nullptr);
ASSERT_NE(bi20->premerge_head_for, nullptr);
EXPECT_EQ(bi20->premerge_head_for->begin_id, 10u);
- EXPECT_EQ(bi20->exclusive_false_head_for, nullptr);
auto* bi30 = fe.GetBlockInfo(30);
ASSERT_NE(bi30, nullptr);
@@ -6959,14 +6946,12 @@
ASSERT_NE(bi30->false_head_for, nullptr);
EXPECT_EQ(bi30->false_head_for->begin_id, 10u);
EXPECT_EQ(bi30->premerge_head_for, nullptr);
- EXPECT_EQ(bi30->exclusive_false_head_for, nullptr);
auto* bi80 = fe.GetBlockInfo(80);
ASSERT_NE(bi80, nullptr);
EXPECT_EQ(bi80->true_head_for, nullptr);
EXPECT_EQ(bi80->false_head_for, nullptr);
EXPECT_EQ(bi80->premerge_head_for, nullptr);
- EXPECT_EQ(bi80->exclusive_false_head_for, nullptr);
}
TEST_F(SpvParserTest,