Commit d6416b38 by Aditya Kumar Committed by Sebastian Pop

fix PR68453: recursively add phi nodes to merge points

The patch adds close phi nodes to every outer loop exit, and to every loop
guard.  For loop guards it computes an initial value that determines where we
stop inserting phi nodes.  When the initial value is a constant, the initial
value is considered to be defined in the entry of the code gen region.

Co-Authored-By: Sebastian Pop <s.pop@samsung.com>

From-SVN: r230918
parent 91f6ec2f
2015-11-25 Aditya Kumar <aditya.k7@samsung.com>
Sebastian Pop <s.pop@samsung.com>
PR tree-optimization/68453
* graphite-isl-ast-to-gimple.c (translate_isl_ast_for_loop): Do
not redirect edges already pointing to their destination.
(translate_isl_ast_node_for): Split edges after loops to create
basic blocks for close phi nodes. Save merge points at the end of
a loop guard.
(translate_isl_ast_node_if): Save merge points at the end of the
if region.
(add_close_phis_to_outer_loops): New.
(add_close_phis_to_merge_points): New.
(copy_loop_close_phi_args): Call add_close_phis_to_merge_points.
(copy_bb_and_scalar_dependences): Do not split basic blocks on
loop close phi locations.
2015-11-25 Jan Hubicka <jh@suse.cz> 2015-11-25 Jan Hubicka <jh@suse.cz>
* ipa-visibility.c (cgraph_externally_visible_p, * ipa-visibility.c (cgraph_externally_visible_p,
2015-11-25 Aditya Kumar <aditya.k7@samsung.com>
Sebastian Pop <s.pop@samsung.com>
PR tree-optimization/68453
* gfortran.dg/graphite/pr68453.f90: New.
2015-11-25 Martin Sebor <msebor@redhat.com> 2015-11-25 Martin Sebor <msebor@redhat.com>
PR c/66516 PR c/66516
......
! { dg-options "-floop-nest-optimize -O2" }
MODULE dbcsr_geev
INTEGER, PARAMETER :: real_8=8
CONTAINS
SUBROUTINE dbcsr_dgeev(jobvl,jobvr,matrix,ndim,evals,revec,levec)
CHARACTER(1) :: jobvl, jobvr
REAL(real_8), DIMENSION(:, :) :: matrix
INTEGER :: ndim
COMPLEX(real_8), DIMENSION(:) :: evals
COMPLEX(real_8), DIMENSION(:, :) :: revec, levec
INTEGER :: i, info, lwork
REAL(real_8) :: norm, tmp_array(ndim,ndim), &
work(20*ndim)
REAL(real_8), DIMENSION(ndim) :: eval1, eval2
REAL(real_8), DIMENSION(ndim, ndim) :: evec_l, evec_r
DO WHILE (i.le.ndim)
IF(ABS(eval2(i)).LT.EPSILON(REAL(0.0,real_8)))THEN
norm=SQRT(SUM(evec_r(:,i)**2.0_real_8)+SUM(evec_r(:,i+1)**2.0_real_8))
revec(:,i)=CMPLX(evec_r(:,i),evec_r(:,i+1),real_8)/norm
END IF
END DO
END SUBROUTINE dbcsr_dgeev
END MODULE dbcsr_geev
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