C++: While here, let's avoid materializing 'ensuresEq' and 'ensuresLt' when computing unreachable nodes in dataflow.

This commit is contained in:
Mathias Vorreiter Pedersen
2024-12-17 15:27:54 +00:00
parent 9b6f39c1fe
commit f351558547
2 changed files with 5 additions and 2 deletions

View File

@@ -1237,12 +1237,14 @@ module IsUnreachableInCall {
int getValue() { result = value }
}
pragma[nomagic]
bindingset[right]
pragma[inline_late]
private predicate ensuresEq(Operand left, Operand right, int k, IRBlock block, boolean areEqual) {
any(G::IRGuardCondition guard).ensuresEq(left, right, k, block, areEqual)
}
pragma[nomagic]
bindingset[right]
pragma[inline_late]
private predicate ensuresLt(Operand left, Operand right, int k, IRBlock block, boolean areEqual) {
any(G::IRGuardCondition guard).ensuresLt(left, right, k, block, areEqual)
}

View File

@@ -51,6 +51,7 @@ class ValueNumber extends TValueNumber {
/**
* Gets an `Operand` whose definition is exact and has this value number.
*/
pragma[nomagic]
final Operand getAUse() { this = valueNumber(result.getDef()) }
final string getKind() {