Commit 2ca4e2c2 by Tobias Burnus Committed by Tobias Burnus

re PR fortran/44646 ([F08] Implement DO CONCURRENT)

2013-10-24  Tobias Burnus  <burnus@net-b.de>

        PR fortran/44646
        * trans-stmt.c (struct forall_info): Add do_concurrent field.
        (gfc_trans_forall_1): Set it for do concurrent.
        (gfc_trans_forall_loop): Mark those as annot_expr_ivdep_kind.

2013-10-24  Tobias Burnus  <burnus@net-b.de>

        PR fortran/44646
        * gfortran.dg/vect/vect-do-concurrent-1.f90: New.

From-SVN: r204023
parent a2ad7995
2013-10-24 Tobias Burnus <burnus@net-b.de>
PR fortran/44646
* trans-stmt.c (struct forall_info): Add do_concurrent field.
(gfc_trans_forall_1): Set it for do concurrent.
(gfc_trans_forall_loop): Mark those as annot_expr_ivdep_kind.
2013-10-23 Tobias Burnus <burnus@net-b.de>
PR fortran/58793
......
......@@ -53,6 +53,7 @@ typedef struct forall_info
int nvar;
tree size;
struct forall_info *prev_nest;
bool do_concurrent;
}
forall_info;
......@@ -2759,6 +2760,11 @@ gfc_trans_forall_loop (forall_info *forall_tmp, tree body,
/* The exit condition. */
cond = fold_build2_loc (input_location, LE_EXPR, boolean_type_node,
count, build_int_cst (TREE_TYPE (count), 0));
if (forall_tmp->do_concurrent)
cond = build2 (ANNOTATE_EXPR, TREE_TYPE (cond), cond,
build_int_cst (integer_type_node,
annot_expr_ivdep_kind));
tmp = build1_v (GOTO_EXPR, exit_label);
tmp = fold_build3_loc (input_location, COND_EXPR, void_type_node,
cond, tmp, build_empty_stmt (input_location));
......@@ -3842,6 +3848,7 @@ gfc_trans_forall_1 (gfc_code * code, forall_info * nested_forall_info)
}
tmp = gfc_finish_block (&body);
nested_forall_info->do_concurrent = true;
tmp = gfc_trans_nested_forall_loop (nested_forall_info, tmp, 1);
gfc_add_expr_to_block (&block, tmp);
goto done;
......
2013-08-24 Tobias Burnus <burnus@net-b.de>
PR fortran/44646
* gfortran.dg/vect/vect-do-concurrent-1.f90: New.
2013-10-24 Dehao Chen <dehao@google.com>
* g++.dg/opt/devirt3.C: New test.
......
! { dg-do compile }
! { dg-require-effective-target vect_float }
! { dg-options "-O3 -fopt-info-vec-optimized" }
subroutine test(n, a, b, c)
integer, value :: n
real, contiguous, pointer :: a(:), b(:), c(:)
integer :: i
do concurrent (i = 1:n)
a(i) = b(i) + c(i)
end do
end subroutine test
! { dg-message "loop vectorized" "" { target *-*-* } 0 }
! { dg-bogus "version" "" { target *-*-* } 0 }
! { dg-bogus "alias" "" { target *-*-* } 0 }
! { dg-final { cleanup-tree-dump "vect" } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment