Skip to content

Commit

Permalink
i
Browse files Browse the repository at this point in the history
  • Loading branch information
jketema committed Jan 11, 2025
1 parent 530e39e commit 9da3243
Showing 1 changed file with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,24 @@ class MemoryLocation extends FinalMemoryLocation {
MemoryLocation() { not useOverlapWithBusyDef(this) }
}

bindingset[fun]
pragma[inline_late]
private MemoryLocation getUnknownMemoryLocation(IRFunction fun, boolean isMayAccess) {
result = TUnknownMemoryLocation(fun, isMayAccess)
}

bindingset[fun]
pragma[inline_late]
private MemoryLocation getAllAliasedMemory(IRFunction fun, boolean isMayAccess) {
result = TAllAliasedMemory(fun, isMayAccess)
}

bindingset[fun]
pragma[inline_late]
private MemoryLocation getAllNonLocalMemory(IRFunction fun, boolean isMayAccess) {
result = TAllNonLocalMemory(fun, isMayAccess)
}

MemoryLocation getResultMemoryLocation(Instruction instr) {
not canReuseSsaForOldResult(instr) and
exists(MemoryAccessKind kind, boolean isMayAccess |
Expand Down Expand Up @@ -926,7 +944,7 @@ MemoryLocation getResultMemoryLocation(Instruction instr) {
// And otherwise we assign it a memory location that groups all the relevant memory locations into one.
result = getGroupedMemoryLocation(var, unbindBool(isMayAccess), false)
)
else result = jazz(instr.getEnclosingIRFunction(), isMayAccess)
else result = getUnknownMemoryLocation(instr.getEnclosingIRFunction(), isMayAccess)
)
or
kind instanceof EntireAllocationMemoryAccess and
Expand All @@ -935,32 +953,14 @@ MemoryLocation getResultMemoryLocation(Instruction instr) {
unbindBool(isMayAccess))
or
kind instanceof EscapedMemoryAccess and
result = bar(instr.getEnclosingIRFunction(), isMayAccess)
result = getAllAliasedMemory(instr.getEnclosingIRFunction(), isMayAccess)
or
kind instanceof NonLocalMemoryAccess and
result = foo(instr.getEnclosingIRFunction(), isMayAccess)
result = getAllNonLocalMemory(instr.getEnclosingIRFunction(), isMayAccess)
)
)
}

bindingset[f]
pragma[inline_late]
private MemoryLocation foo(IRFunction f, boolean isMayAccess) {
result = TAllNonLocalMemory(f, isMayAccess)
}

bindingset[f]
pragma[inline_late]
private MemoryLocation bar(IRFunction f, boolean isMayAccess) {
result = TAllAliasedMemory(f, isMayAccess)
}

bindingset[f]
pragma[inline_late]
private MemoryLocation jazz(IRFunction f, boolean isMayAccess) {
result = TUnknownMemoryLocation(f, isMayAccess)
}

private MemoryLocation0 getOperandMemoryLocation0(MemoryOperand operand, boolean isMayAccess) {
not canReuseSsaForOldResult(operand.getAnyDef()) and
exists(MemoryAccessKind kind |
Expand Down

0 comments on commit 9da3243

Please sign in to comment.