@@ -899,6 +899,24 @@ class MemoryLocation extends FinalMemoryLocation {
899899 MemoryLocation ( ) { not useOverlapWithBusyDef ( this ) }
900900}
901901
902+ bindingset [ fun]
903+ pragma [ inline_late]
904+ private MemoryLocation getUnknownMemoryLocation ( IRFunction fun , boolean isMayAccess ) {
905+ result = TUnknownMemoryLocation ( fun , isMayAccess )
906+ }
907+
908+ bindingset [ fun]
909+ pragma [ inline_late]
910+ private MemoryLocation getAllAliasedMemory ( IRFunction fun , boolean isMayAccess ) {
911+ result = TAllAliasedMemory ( fun , isMayAccess )
912+ }
913+
914+ bindingset [ fun]
915+ pragma [ inline_late]
916+ private MemoryLocation getAllNonLocalMemory ( IRFunction fun , boolean isMayAccess ) {
917+ result = TAllNonLocalMemory ( fun , isMayAccess )
918+ }
919+
902920MemoryLocation getResultMemoryLocation ( Instruction instr ) {
903921 not canReuseSsaForOldResult ( instr ) and
904922 exists ( MemoryAccessKind kind , boolean isMayAccess |
@@ -926,7 +944,7 @@ MemoryLocation getResultMemoryLocation(Instruction instr) {
926944 // And otherwise we assign it a memory location that groups all the relevant memory locations into one.
927945 result = getGroupedMemoryLocation ( var , unbindBool ( isMayAccess ) , false )
928946 )
929- else result = TUnknownMemoryLocation ( instr .getEnclosingIRFunction ( ) , isMayAccess )
947+ else result = getUnknownMemoryLocation ( instr .getEnclosingIRFunction ( ) , isMayAccess )
930948 )
931949 or
932950 kind instanceof EntireAllocationMemoryAccess and
@@ -935,10 +953,10 @@ MemoryLocation getResultMemoryLocation(Instruction instr) {
935953 unbindBool ( isMayAccess ) )
936954 or
937955 kind instanceof EscapedMemoryAccess and
938- result = TAllAliasedMemory ( instr .getEnclosingIRFunction ( ) , isMayAccess )
956+ result = getAllAliasedMemory ( instr .getEnclosingIRFunction ( ) , isMayAccess )
939957 or
940958 kind instanceof NonLocalMemoryAccess and
941- result = TAllNonLocalMemory ( instr .getEnclosingIRFunction ( ) , isMayAccess )
959+ result = getAllNonLocalMemory ( instr .getEnclosingIRFunction ( ) , isMayAccess )
942960 )
943961 )
944962}
0 commit comments