Skip to content

Commit

Permalink
Fix bug with repeated writing to memory.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkskeller committed Nov 26, 2024
1 parent 5acfb3a commit 8a4b029
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Compiler/allocator.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,11 @@ def handle_mem_access(addr, reg_type, last_access_this_kind,
if this[-1] < other[0]:
del this[:]
this.append(n)
for inst in other:
if last_access_this_kind == last_mem_write_of:
insts = itertools.chain(other, this)
else:
insts = other
for inst in insts:
add_edge(inst, n)

def mem_access(n, instr, last_access_this_kind, last_access_other_kind):
Expand Down

0 comments on commit 8a4b029

Please sign in to comment.