[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>
This commit is contained in:
Kévin Petit 2024-03-12 09:09:46 +00:00 committed by GitHub
parent d15a7aa25d
commit f869d391a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -88,6 +88,9 @@ void IRContext::BuildInvalidAnalyses(IRContext::Analysis set) {
if (set & kAnalysisDebugInfo) {
BuildDebugInfoManager();
}
if (set & kAnalysisLiveness) {
BuildLivenessManager();
}
}
void IRContext::InvalidateAnalysesExceptFor(

View File

@ -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*)>;