diff options
author | Kévin Petit <kevin.petit@arm.com> | 2024-03-12 09:09:46 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-12 09:09:46 +0000 |
commit | f869d391a5eaff5e121428a568c80823a2cafbda (patch) | |
tree | 0fdc28b0eb38431cd0a15accd504c9817b9908a9 | |
parent | d15a7aa25dad142adfbc91caf6fc8261c7752856 (diff) | |
download | spirv-tools-f869d391a5eaff5e121428a568c80823a2cafbda.tar.gz |
[OPT] Fix handling of analyses rebuild (#5608)
All tests treat kAnalysisEnd like STL end iterators, which
means its value must be greater than that of the last valid
Analysis.
Change-Id: Ibfaaf60bb450c508af0528dbe9c0729e6aa07b3b
Signed-off-by: Kevin Petit <kevin.petit@arm.com>
-rw-r--r-- | source/opt/ir_context.cpp | 3 | ||||
-rw-r--r-- | source/opt/ir_context.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source/opt/ir_context.cpp b/source/opt/ir_context.cpp index 239d316c..d864b7c0 100644 --- a/source/opt/ir_context.cpp +++ b/source/opt/ir_context.cpp @@ -88,6 +88,9 @@ void IRContext::BuildInvalidAnalyses(IRContext::Analysis set) { if (set & kAnalysisDebugInfo) { BuildDebugInfoManager(); } + if (set & kAnalysisLiveness) { + BuildLivenessManager(); + } } void IRContext::InvalidateAnalysesExceptFor( diff --git a/source/opt/ir_context.h b/source/opt/ir_context.h index 5685db80..ef7c4580 100644 --- a/source/opt/ir_context.h +++ b/source/opt/ir_context.h @@ -84,7 +84,7 @@ class IRContext { kAnalysisTypes = 1 << 15, kAnalysisDebugInfo = 1 << 16, kAnalysisLiveness = 1 << 17, - kAnalysisEnd = 1 << 17 + kAnalysisEnd = 1 << 18 }; using ProcessFunction = std::function<bool(Function*)>; |