Commit 14f30b87 by Alexander Monakov Committed by Alexander Monakov

re PR rtl-optimization/42294 (ICE in code_motion_path_driver for 416.gamess)

2010-01-14  Alexander Monakov  <amonakov@ispras.ru>

	PR rtl-optimization/42294
	* sel-sched-ir.h (struct _sel_insn_data): Update comment.
	* sel-sched.c (move_exprs_to_boundary): Transitively add all
	originators' originators.

	* gfortran.dg/pr42294.f: New.

From-SVN: r155893
parent 8ec4d0ad
2010-01-14 Alexander Monakov <amonakov@ispras.ru> 2010-01-14 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/42294
* sel-sched-ir.h (struct _sel_insn_data): Update comment.
* sel-sched.c (move_exprs_to_boundary): Transitively add all
originators' originators.
2010-01-14 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/39453 PR rtl-optimization/39453
PR rtl-optimization/42246 PR rtl-optimization/42246
* sel-sched-ir.c (considered_for_pipelining_p): Do not test * sel-sched-ir.c (considered_for_pipelining_p): Do not test
......
...@@ -715,7 +715,8 @@ struct _sel_insn_data ...@@ -715,7 +715,8 @@ struct _sel_insn_data
bitmap found_deps; bitmap found_deps;
/* An INSN_UID bit is set when this is a bookkeeping insn generated from /* An INSN_UID bit is set when this is a bookkeeping insn generated from
a parent with this uid. */ a parent with this uid. If a parent is a bookkeeping copy, all its
originators are transitively included in this set. */
bitmap originators; bitmap originators;
/* A hashtable caching the result of insn transformations through this one. */ /* A hashtable caching the result of insn transformations through this one. */
......
...@@ -5208,12 +5208,21 @@ move_exprs_to_boundary (bnd_t bnd, expr_t expr_vliw, ...@@ -5208,12 +5208,21 @@ move_exprs_to_boundary (bnd_t bnd, expr_t expr_vliw,
EXECUTE_IF_SET_IN_BITMAP (current_copies, 0, book_uid, bi) EXECUTE_IF_SET_IN_BITMAP (current_copies, 0, book_uid, bi)
{ {
unsigned uid;
bitmap_iterator bi;
/* We allocate these bitmaps lazily. */ /* We allocate these bitmaps lazily. */
if (! INSN_ORIGINATORS_BY_UID (book_uid)) if (! INSN_ORIGINATORS_BY_UID (book_uid))
INSN_ORIGINATORS_BY_UID (book_uid) = BITMAP_ALLOC (NULL); INSN_ORIGINATORS_BY_UID (book_uid) = BITMAP_ALLOC (NULL);
bitmap_copy (INSN_ORIGINATORS_BY_UID (book_uid), bitmap_copy (INSN_ORIGINATORS_BY_UID (book_uid),
current_originators); current_originators);
/* Transitively add all originators' originators. */
EXECUTE_IF_SET_IN_BITMAP (current_originators, 0, uid, bi)
if (INSN_ORIGINATORS_BY_UID (uid))
bitmap_ior_into (INSN_ORIGINATORS_BY_UID (book_uid),
INSN_ORIGINATORS_BY_UID (uid));
} }
return should_move; return should_move;
......
2010-01-14 Alexander Monakov <amonakov@ispras.ru> 2010-01-14 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/42294
* gfortran.dg/pr42294.f: New.
2010-01-14 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/39453 PR rtl-optimization/39453
PR rtl-optimization/42246 PR rtl-optimization/42246
* gcc.dg/pr39453.c: New. * gcc.dg/pr39453.c: New.
......
C PR rtl-optimization/42294
C { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } }
C { dg-options "-O2 -fselective-scheduling2 -fsel-sched-pipelining -funroll-all-loops" }
SUBROUTINE ORIEN(IW,NATOT,NTOTORB,NATORB,P,T)
IMPLICIT DOUBLE PRECISION(A-H,O-Z)
DIMENSION NATORB(NATOT),P(NTOTORB*(NTOTORB+1)/2)
DIMENSION T(NTOTORB,NTOTORB)
DO 9000 IATOM=1,NATOT
ILAST = NTOTORB
IF (IATOM.NE.NATOT) ILAST=NATORB(IATOM+1)-1
DO 8000 IAOI=NATORB(IATOM),ILAST
DO 7000 IAOJ = IAOI+1,ILAST
R2 = 0.0D+00
R3 = 0.0D+00
DO 6000 INOTA=1,NATOT
DO 5000 IK=NATORB(INOTA),NTOTORB
IMAI=MAX(IK,IAOI)
IMII=MIN(IK,IAOI)
IMAJ=MAX(IK,IAOJ)
IMIJ=MIN(IK,IAOJ)
IKI=(IMAI*(IMAI-1))/2 + IMII
IKJ=(IMAJ*(IMAJ-1))/2 + IMIJ
PIKI=P(IKI)
PIKJ=P(IKJ)
R2 = R2 + (PIKI**4)-6*(PIKI*PIKI*PIKJ*PIKJ)+(PIKJ)
5000 CONTINUE
6000 CONTINUE
R2 = (R2/4.0D+00)
Q = SQRT(R2*R2 + R3*R3)
IF (Q.LT.1.0D-08) GO TO 7000
A = COS(THETA)
B = -SIN(THETA)
CALL ROT1INT(NTOTORB,IAOI,IAOJ,A,B,P)
7000 CONTINUE
8000 CONTINUE
9000 CONTINUE
RETURN
END
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