Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
phschaad committed Jan 15, 2025
1 parent e668e7d commit f490f72
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions dace/frontend/fortran/fortran_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -733,11 +733,6 @@ def ifstmt2sdfg(self, node: ast_internal_classes.If_Stmt_Node, sdfg: SDFG, cfg:
condition = ast_utils.ProcessedWriter(sdfg, self.name_mapping, self.placeholders, self.placeholders_offsets,
self.replace_names).write_code(node.cond)

<<<<<<< Updated upstream
if_body = ControlFlowRegion(cond_block.label + '_if_body')
cond_block.add_branch(CodeBlock(condition), if_body)
self.translate(node.body, sdfg, if_body)
=======
cond_block = ConditionalBlock(name)
cfg.add_node(cond_block, ensure_unique_name=True, is_start_block=is_start)
if not is_start:
Expand All @@ -751,19 +746,15 @@ def ifstmt2sdfg(self, node: ast_internal_classes.If_Stmt_Node, sdfg: SDFG, cfg:
# If there's nothing inside the branch, add a noop state to get a valid SDFG and let simplify take care of
# the rest.
if_body.add_state('noop', is_start_block=True)
>>>>>>> Stashed changes

if len(node.body_else.execution) > 0:
else_body = ControlFlowRegion(cond_block.label + '_else_body')
cond_block.add_branch(None, else_body)
self.translate(node.body_else, sdfg, else_body)

<<<<<<< Updated upstream
=======
if len(else_body.nodes()) == 0:
else_body.add_state('noop', is_start_block=True)

>>>>>>> Stashed changes

def whilestmt2sdfg(self, node: ast_internal_classes.While_Stmt_Node, sdfg: SDFG, cfg: ControlFlowRegion):
"""
Expand Down

0 comments on commit f490f72

Please sign in to comment.