parameters: (stmt, next_stmt, func_ir, call_table, alias_map)
return_statement: return False
docstring: Check dependencies to determine if a parfor can be reordered in the IR block
      with a non-parfor statement.
docstring_summary: Check dependencies to determine if a parfor can be reordered in the IR block
      with a non-parfor statement.
docstring_tokens: Check dependencies to determine if a parfor can be reordered in the IR block with a non - parfor statement .
function: def _can_reorder_stmts(stmt, next_stmt, func_ir, call_table, alias_map):
      """
      Check dependencies to determine if a parfor can be reordered in the IR block
      with a non-parfor statement.
      """
      # swap only parfors with non-parfors
      # don't reorder calls with side effects (e.g. file close)
      # only read-read dependencies are OK
      # make sure there is no write-write, write-read dependencies
      if (isinstance(
              stmt, Parfor) and not isinstance(
              next_stmt, Parfor) and not isinstance(
              next_stmt, ir.Print)
              and (not isinstance(next_stmt, ir.Assign)
                   or has_no_side_effect(
                  next_stmt.value, set(), call_table)
              or guard(is_assert_equiv, func_ir, next_stmt.value))):
          stmt_accesses = expand_aliases({v.name for v in stmt.list_vars()}, alias_map)
          stmt_writes = expand_aliases(get_parfor_writes(stmt), alias_map)
          next_accesses = expand_aliases({v.name for v in next_stmt.list_vars()}, alias_map)
          next_writes = expand_aliases(get_stmt_writes(next_stmt), alias_map)
          if len((stmt_writes & next_accesses)
                  | (next_writes & stmt_accesses)) == 0:
              return True
      return False
function_tokens: def _can_reorder_stmts ( stmt , next_stmt , func_ir , call_table , alias_map ) : # swap only parfors with non-parfors # don't reorder calls with side effects (e.g. file close) # only read-read dependencies are OK # make sure there is no write-write, write-read dependencies if ( isinstance ( stmt , Parfor ) and not isinstance ( next_stmt , Parfor ) and not isinstance ( next_stmt , ir . Print ) and ( not isinstance ( next_stmt , ir . Assign ) or has_no_side_effect ( next_stmt . value , set ( ) , call_table ) or guard ( is_assert_equiv , func_ir , next_stmt . value ) ) ) : stmt_accesses = expand_aliases ( { v . name for v in stmt . list_vars ( ) } , alias_map ) stmt_writes = expand_aliases ( get_parfor_writes ( stmt ) , alias_map ) next_accesses = expand_aliases ( { v . name for v in next_stmt . list_vars ( ) } , alias_map ) next_writes = expand_aliases ( get_stmt_writes ( next_stmt ) , alias_map ) if len ( ( stmt_writes & next_accesses ) | ( next_writes & stmt_accesses ) ) == 0 : return True return False