Skip to content

Commit

Permalink
Merge pull request #50 from kc611/region_testing
Browse files Browse the repository at this point in the history
[WIP] Added region aware testing
  • Loading branch information
esc authored Jul 31, 2023
2 parents 187bdb8 + cadd031 commit b10fb94
Show file tree
Hide file tree
Showing 9 changed files with 1,798 additions and 632 deletions.
17 changes: 17 additions & 0 deletions numba_rvsdg/core/datastructures/basic_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from dataclasses import dataclass, replace

from numba_rvsdg.core.utils import _next_inst_offset
from numba_rvsdg.core.datastructures import block_names


@dataclass(frozen=True)
Expand Down Expand Up @@ -384,3 +385,19 @@ def replace_exiting(self, new_exiting):
The new exiting block of the region represented by the RegionBlock.
"""
object.__setattr__(self, "exiting", new_exiting)


block_type_names = {
block_names.BASIC: BasicBlock,
block_names.PYTHON_BYTECODE: PythonBytecodeBlock,
block_names.SYNTH_HEAD: SyntheticHead,
block_names.SYNTH_BRANCH: SyntheticBranch,
block_names.SYNTH_TAIL: SyntheticTail,
block_names.SYNTH_EXIT: SyntheticExit,
block_names.SYNTH_ASSIGN: SyntheticAssignment,
block_names.SYNTH_RETURN: SyntheticReturn,
block_names.SYNTH_EXIT_LATCH: SyntheticExitingLatch,
block_names.SYNTH_EXIT_BRANCH: SyntheticExitBranch,
block_names.SYNTH_FILL: SyntheticFill,
block_names.REGION: RegionBlock,
}
18 changes: 18 additions & 0 deletions numba_rvsdg/core/datastructures/block_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,21 @@
SYNTH_RETURN = "synth_return"
SYNTH_EXIT_LATCH = "synth_exit_latch"
SYNTH_FILL = "synth_fill"
SYNTH_EXIT_BRANCH = "synth_exit_branch"

REGION = "region"

block_types = {
BASIC,
PYTHON_BYTECODE,
SYNTH_HEAD,
SYNTH_BRANCH,
SYNTH_TAIL,
SYNTH_EXIT,
SYNTH_ASSIGN,
SYNTH_RETURN,
SYNTH_EXIT_LATCH,
SYNTH_EXIT_BRANCH,
SYNTH_FILL,
REGION,
}
Loading

0 comments on commit b10fb94

Please sign in to comment.