Skip to content

Commit

Permalink
Patching debug logging calls and debug print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
kc611 committed Aug 8, 2023
1 parent 3c6fa71 commit b257faf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion numba_rvsdg/core/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ def extract_region(

def restructure_branch(parent_region: RegionBlock):
scfg: SCFG = parent_region.subregion
print("restructure_branch", scfg.graph)
# print("restructure_branch", scfg.graph)
doms = _doms(scfg)
postdoms = _post_doms(scfg)
postimmdoms = _imm_doms(postdoms)
Expand Down
4 changes: 2 additions & 2 deletions numba_rvsdg/core/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
# import logging

_logger = logging.getLogger(__name__)
# _logger = logging.getLogger(__name__)


class _LogWrap:
Expand Down
11 changes: 6 additions & 5 deletions numba_rvsdg/rendering/rendering.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import logging
# import logging
from numba_rvsdg.core.datastructures.basic_block import (
BasicBlock,
RegionBlock,
Expand Down Expand Up @@ -50,8 +50,10 @@ def render_block(
self.render_basic_block(digraph, name, block)
elif type(block) == RegionBlock:
self.render_region_block(digraph, name, block)
elif isinstance(block, BasicBlock):
self.render_basic_block(digraph, name, block)
else:
raise Exception("unreachable")
raise Exception(f"unreachable: {type(block)}")

def render_edges(self, scfg: SCFG):
"""Function that renders the edges in an SCFG.
Expand Down Expand Up @@ -169,8 +171,7 @@ def render_branching_block(
digraph.node(str(name), shape="rect", label=body)

def render_byteflow(self, byteflow: ByteFlow):
"""Renders the provided `ByteFlow` object.
"""
"""Renders the provided `ByteFlow` object."""
self.bcmap_from_bytecode(byteflow.bc)
# render nodes
for name, block in byteflow.scfg.graph.items():
Expand Down Expand Up @@ -292,7 +293,7 @@ def view(self, name: str):
self.g.view(name)


logging.basicConfig(level=logging.DEBUG)
# logging.basicConfig(level=logging.DEBUG)


def render_func(func):
Expand Down

0 comments on commit b257faf

Please sign in to comment.