Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Added region aware testing #50

Merged
merged 18 commits into from
Jul 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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