C++: Filter out instructions with incomplete SSA in range analysis.

This commit is contained in:
Mathias Vorreiter Pedersen
2025-05-12 19:47:47 +01:00
parent 510df38da2
commit 9d2eb3d9b8

View File

@@ -112,7 +112,14 @@ module SemanticExprConfig {
}
/** Holds if no range analysis should be performed on the phi edges in `f`. */
private predicate excludeFunction(Cpp::Function f) { count(f.getEntryPoint()) > 1 }
private predicate excludeFunction(Cpp::Function f) {
count(f.getEntryPoint()) > 1
or
exists(IR::IRFunction irFunction |
irFunction.getFunction() = f and
irFunction.hasIncompleteSsa()
)
}
SemType getUnknownExprType(Expr expr) { result = getSemanticType(expr.getResultIRType()) }