summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/3rdparty/spirv-tools/source/opt/ir_context.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/3rdparty/spirv-tools/source/opt/ir_context.cpp')
-rw-r--r--3rdparty/bgfx/3rdparty/spirv-tools/source/opt/ir_context.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/3rdparty/bgfx/3rdparty/spirv-tools/source/opt/ir_context.cpp b/3rdparty/bgfx/3rdparty/spirv-tools/source/opt/ir_context.cpp
index 1c747b7a3a6..d940180da0b 100644
--- a/3rdparty/bgfx/3rdparty/spirv-tools/source/opt/ir_context.cpp
+++ b/3rdparty/bgfx/3rdparty/spirv-tools/source/opt/ir_context.cpp
@@ -94,6 +94,14 @@ void IRContext::InvalidateAnalyses(IRContext::Analysis analyses_to_invalidate) {
if (analyses_to_invalidate & kAnalysisTypes) {
analyses_to_invalidate |= kAnalysisConstants;
}
+
+ // The dominator analysis hold the psuedo entry and exit nodes from the CFG.
+ // Also if the CFG change the dominators many changed as well, so the
+ // dominator analysis should be invalidated as well.
+ if (analyses_to_invalidate & kAnalysisCFG) {
+ analyses_to_invalidate |= kAnalysisDominatorAnalysis;
+ }
+
if (analyses_to_invalidate & kAnalysisDefUse) {
def_use_mgr_.reset(nullptr);
}