This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[lno] Check assumptions returned by number_of_iterations_cond


Hello,

the users of number_of_iterations_cond must check the assumptions it
returns, unless they are able to handle them otherwise.

Zdenek

Index: ChangeLog.lno
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/ChangeLog.lno,v
retrieving revision 1.1.2.159
diff -c -3 -p -r1.1.2.159 ChangeLog.lno
*** ChangeLog.lno	14 May 2004 02:29:44 -0000	1.1.2.159
--- ChangeLog.lno	19 May 2004 22:04:38 -0000
***************
*** 1,3 ****
--- 1,10 ----
+ 2004-05-20  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
+ 
+ 	* tree-scalar-evolution.c (first_iteration_non_satisfying_noev_ev,
+ 	first_iteration_non_satisfying_ev_noev,
+ 	first_iteration_non_satisfying_ev_ev): Check the assumptions returned
+ 	by number_of_iterations_cond.
+ 
  2004-05-13  Devang Patel  <dpatel@apple.com>
  
  	* cfgloop.c (get_loop_body_in_bfs_order): New.
Index: tree-scalar-evolution.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-scalar-evolution.c,v
retrieving revision 1.1.2.47
diff -c -3 -p -r1.1.2.47 tree-scalar-evolution.c
*** tree-scalar-evolution.c	13 May 2004 21:14:15 -0000	1.1.2.47
--- tree-scalar-evolution.c	19 May 2004 22:04:38 -0000
*************** first_iteration_non_satisfying_noev_ev (
*** 1146,1152 ****
    niter_desc.niter = NULL_TREE;
    number_of_iterations_cond (type1, init0, NULL_TREE, code, init1, step1, 
  			     &niter_desc);
!   if (niter_desc.niter != NULL_TREE)
      return niter_desc.niter;
    return chrec_top;
  }
--- 1146,1154 ----
    niter_desc.niter = NULL_TREE;
    number_of_iterations_cond (type1, init0, NULL_TREE, code, init1, step1, 
  			     &niter_desc);
!   if (niter_desc.niter != NULL_TREE
!       && integer_onep (niter_desc.assumptions)
!       && integer_zerop (niter_desc.may_be_zero))
      return niter_desc.niter;
    return chrec_top;
  }
*************** first_iteration_non_satisfying_ev_noev (
*** 1186,1192 ****
    niter_desc.niter = NULL_TREE;
    number_of_iterations_cond (type0, init0, step0, code, init1, NULL_TREE, 
  			     &niter_desc);
!   if (niter_desc.niter != NULL_TREE)
      return niter_desc.niter;
    return chrec_top;
  }
--- 1188,1196 ----
    niter_desc.niter = NULL_TREE;
    number_of_iterations_cond (type0, init0, step0, code, init1, NULL_TREE, 
  			     &niter_desc);
!   if (niter_desc.niter != NULL_TREE
!       && integer_onep (niter_desc.assumptions)
!       && integer_zerop (niter_desc.may_be_zero))
      return niter_desc.niter;
    return chrec_top;
  }
*************** first_iteration_non_satisfying_ev_ev (en
*** 1231,1237 ****
    niter_desc.niter = NULL_TREE;
    number_of_iterations_cond (type0, init0, step0, code, init1, step1, 
  			     &niter_desc);
!   if (niter_desc.niter != NULL_TREE)
      return niter_desc.niter;
    return chrec_top;
  }
--- 1235,1243 ----
    niter_desc.niter = NULL_TREE;
    number_of_iterations_cond (type0, init0, step0, code, init1, step1, 
  			     &niter_desc);
!   if (niter_desc.niter != NULL_TREE
!       && integer_onep (niter_desc.assumptions)
!       && integer_zerop (niter_desc.may_be_zero))
      return niter_desc.niter;
    return chrec_top;
  }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]