summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend/ir
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2021-05-16 23:06:13 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:31 +0200
commitf7a2340205b4fa2db32403f20d7b7afe32b15f33 (patch)
tree22059632c5f3bf068e686997d833368f6c22f6ec /src/shader_recompiler/frontend/ir
parentglasm: Implement rest of shared mem (diff)
downloadyuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar
yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar.gz
yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar.bz2
yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar.lz
yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar.xz
yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.tar.zst
yuzu-f7a2340205b4fa2db32403f20d7b7afe32b15f33.zip
Diffstat (limited to '')
-rw-r--r--src/shader_recompiler/frontend/ir/abstract_syntax_list.h11
-rw-r--r--src/shader_recompiler/frontend/ir/post_order.cpp2
2 files changed, 5 insertions, 8 deletions
diff --git a/src/shader_recompiler/frontend/ir/abstract_syntax_list.h b/src/shader_recompiler/frontend/ir/abstract_syntax_list.h
index e9afb4d92..b61773487 100644
--- a/src/shader_recompiler/frontend/ir/abstract_syntax_list.h
+++ b/src/shader_recompiler/frontend/ir/abstract_syntax_list.h
@@ -13,10 +13,6 @@ namespace Shader::IR {
class Block;
struct AbstractSyntaxNode {
- struct NonTrivialDummy {
- NonTrivialDummy() {}
- };
-
enum class Type {
Block,
If,
@@ -27,9 +23,7 @@ struct AbstractSyntaxNode {
Return,
Unreachable,
};
- Type type{};
- union {
- NonTrivialDummy dummy{};
+ union Data {
Block* block;
struct {
U1 cond;
@@ -55,6 +49,9 @@ struct AbstractSyntaxNode {
Block* skip;
} break_node;
};
+
+ Data data{};
+ Type type{};
};
using AbstractSyntaxList = std::vector<AbstractSyntaxNode>;
diff --git a/src/shader_recompiler/frontend/ir/post_order.cpp b/src/shader_recompiler/frontend/ir/post_order.cpp
index 1a28df7fb..16bc44101 100644
--- a/src/shader_recompiler/frontend/ir/post_order.cpp
+++ b/src/shader_recompiler/frontend/ir/post_order.cpp
@@ -20,7 +20,7 @@ BlockList PostOrder(const AbstractSyntaxNode& root) {
if (root.type != AbstractSyntaxNode::Type::Block) {
throw LogicError("First node in abstract syntax list root is not a block");
}
- Block* const first_block{root.block};
+ Block* const first_block{root.data.block};
visited.insert(first_block);
block_stack.push_back(first_block);