diff --git a/src/graphics/shader/recompiler/ir/passes/SsaRewrite.cpp b/src/graphics/shader/recompiler/ir/passes/SsaRewrite.cpp index fa6455145..566555cd8 100644 --- a/src/graphics/shader/recompiler/ir/passes/SsaRewrite.cpp +++ b/src/graphics/shader/recompiler/ir/passes/SsaRewrite.cpp @@ -165,7 +165,6 @@ Value InitialValue(M0Tag) { enum class ReadStep { Start, SetValue, PushPhiArgument }; -template struct ReadState { Block* block = nullptr; Value result; @@ -183,8 +182,8 @@ public: template Value Read(T variable, Block* root) { - std::vector> stack {{}, {.block = root}}; - const auto prepare_phi = [&]() { + stack.assign({{}, {.block = root}}); + const auto prepare_phi = [&]() { auto& state = stack.back(); const auto predecessors = state.block->ImmPredecessors(); if (state.pred == predecessors.size()) { @@ -290,6 +289,7 @@ private: std::unordered_map> incomplete_phis; DefTable definitions; + std::vector stack; }; void VisitInstruction(Pass& pass, Block* block, Inst& inst) {