@@ -566,6 +566,9 @@ private Overlap getVariableMemoryLocationOverlap(
566
566
use .getEndBitOffset ( ) )
567
567
}
568
568
569
+ bindingset [ result , b]
570
+ private boolean unbindBool ( boolean b ) { result != b .booleanNot ( ) }
571
+
569
572
MemoryLocation getResultMemoryLocation ( Instruction instr ) {
570
573
exists ( MemoryAccessKind kind , boolean isMayAccess |
571
574
kind = instr .getResultMemoryAccess ( ) and
@@ -578,15 +581,16 @@ MemoryLocation getResultMemoryLocation(Instruction instr) {
578
581
exists ( Allocation var , IRType type , IntValue startBitOffset , IntValue endBitOffset |
579
582
hasResultMemoryAccess ( instr , var , type , _, startBitOffset , endBitOffset , isMayAccess ) and
580
583
result =
581
- TVariableMemoryLocation ( var , type , _, startBitOffset , endBitOffset , isMayAccess )
584
+ TVariableMemoryLocation ( var , type , _, startBitOffset , endBitOffset ,
585
+ unbindBool ( isMayAccess ) )
582
586
)
583
587
else result = TUnknownMemoryLocation ( instr .getEnclosingIRFunction ( ) , isMayAccess )
584
588
)
585
589
or
586
590
kind instanceof EntireAllocationMemoryAccess and
587
591
result =
588
592
TEntireAllocationMemoryLocation ( getAddressOperandAllocation ( instr .getResultAddressOperand ( ) ) ,
589
- isMayAccess )
593
+ unbindBool ( isMayAccess ) )
590
594
or
591
595
kind instanceof EscapedMemoryAccess and
592
596
result = TAllAliasedMemory ( instr .getEnclosingIRFunction ( ) , isMayAccess , false )
0 commit comments