Merge pull request #2806 from jbj/coversEntireVariable-join

C++: Fix coversEntireVariable perf in AliasedSSA
This commit is contained in:
Mathias Vorreiter Pedersen
2020-02-10 16:38:28 +01:00
committed by GitHub

View File

@@ -220,9 +220,12 @@ class VariableMemoryLocation extends TVariableMemoryLocation, AllocationMemoryLo
/**
* Holds if this memory location covers the entire variable.
*/
final predicate coversEntireVariable() {
startBitOffset = 0 and
endBitOffset = var.getIRType().getByteSize() * 8
final predicate coversEntireVariable() { varIRTypeHasBitRange(startBitOffset, endBitOffset) }
pragma[noinline]
private predicate varIRTypeHasBitRange(int start, int end) {
start = 0 and
end = var.getIRType().getByteSize() * 8
}
}