C++: Implement Instruction.isResultConflated

This predicate replaces `isChiForAllAliasedMemory`, which was always
intended to be temporary. A test is added to `IRSanity.qll` to verify
that the new predicate corresponds exactly with (a fixed version of) the
old one.

The implementation of the new predicate,
`Cached::hasConflatedMemoryResult` in `SSAConstruction.qll`, is faster
to compute than the old `isChiForAllAliasedMemory` because it uses
information that's readily available during SSA construction.
This commit is contained in:
Jonas Jensen
2020-03-20 17:57:18 +01:00
parent 67cb8525bf
commit f6f9afe462
26 changed files with 314 additions and 14 deletions

View File

@@ -20,6 +20,8 @@ lostReachability
backEdgeCountMismatch
useNotDominatedByDefinition
switchInstructionWithoutDefaultEdge
notMarkedAsConflated
wronglyMarkedAsConflated
missingCanonicalLanguageType
multipleCanonicalLanguageTypes
missingIRType

View File

@@ -20,6 +20,8 @@ lostReachability
backEdgeCountMismatch
useNotDominatedByDefinition
switchInstructionWithoutDefaultEdge
notMarkedAsConflated
wronglyMarkedAsConflated
missingCanonicalLanguageType
multipleCanonicalLanguageTypes
missingIRType

View File

@@ -20,6 +20,8 @@ lostReachability
backEdgeCountMismatch
useNotDominatedByDefinition
switchInstructionWithoutDefaultEdge
notMarkedAsConflated
wronglyMarkedAsConflated
missingCanonicalLanguageType
multipleCanonicalLanguageTypes
missingIRType

View File

@@ -16,6 +16,8 @@ lostReachability
backEdgeCountMismatch
useNotDominatedByDefinition
switchInstructionWithoutDefaultEdge
notMarkedAsConflated
wronglyMarkedAsConflated
missingCanonicalLanguageType
multipleCanonicalLanguageTypes
missingIRType

View File

@@ -16,6 +16,8 @@ lostReachability
backEdgeCountMismatch
useNotDominatedByDefinition
switchInstructionWithoutDefaultEdge
notMarkedAsConflated
wronglyMarkedAsConflated
missingCanonicalLanguageType
multipleCanonicalLanguageTypes
missingIRType

View File

@@ -568,6 +568,8 @@ lostReachability
backEdgeCountMismatch
useNotDominatedByDefinition
switchInstructionWithoutDefaultEdge
notMarkedAsConflated
wronglyMarkedAsConflated
missingCanonicalLanguageType
multipleCanonicalLanguageTypes
missingIRType

View File

@@ -631,6 +631,8 @@ useNotDominatedByDefinition
| try_catch.cpp:21:13:21:24 | Address | Operand 'Address' is not dominated by its definition in function '$@'. | try_catch.cpp:19:6:19:23 | IR: throw_from_nonstmt | void throw_from_nonstmt(int) |
| vla.c:3:27:3:30 | Address | Operand 'Address' is not dominated by its definition in function '$@'. | vla.c:3:5:3:8 | IR: main | int main(int, char**) |
switchInstructionWithoutDefaultEdge
notMarkedAsConflated
wronglyMarkedAsConflated
missingCanonicalLanguageType
multipleCanonicalLanguageTypes
missingIRType

View File

@@ -577,6 +577,8 @@ lostReachability
backEdgeCountMismatch
useNotDominatedByDefinition
switchInstructionWithoutDefaultEdge
notMarkedAsConflated
wronglyMarkedAsConflated
missingCanonicalLanguageType
multipleCanonicalLanguageTypes
missingIRType