Skip to content

Commit

Permalink
fix stability of SYNTH_ASSIGN block insertion
Browse files Browse the repository at this point in the history
This removes non-determinism from the insertion order of the
SYNTH_ASSIGN blocks such that the resulting SCFG output is stable and
can be tested appropriately.
  • Loading branch information
esc committed Jul 13, 2023
1 parent e4dd79c commit 42434fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numba_rvsdg/core/datastructures/scfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ def insert_block_and_control_blocks(
# Need to create synthetic assignments for each arc from a
# predecessors to a successor and insert it between the predecessor
# and the newly created block
for s in set(jt).intersection(successors):
for s in sorted(set(jt).intersection(successors)):
synth_assign = self.name_gen.new_block_name(SYNTH_ASSIGN)
variable_assignment = {}
variable_assignment[branch_variable] = branch_variable_value
Expand Down

0 comments on commit 42434fd

Please sign in to comment.