On Thu, Jul 21, 2016 at 6:48 PM, Bin Cheng <bin.ch...@arm.com> wrote: > Hi, > Previous patch removed warning message on loops whose counter might overflow, > while this patch adds it back. Reason is it's always good to have a warning > message indicating missed loop optimizations. Also warning message itself is > slightly changed. > There will be following patch which removes -funsafe-loop-optimizations. > > Bootstrap and test on x86_64. Is it OK?
Please do not use 'input_location'. You never should check LOCATION_LINE either but just for loc != UNKNOWN_LOCATION. Note that simply passing gimple_location should work and fall back to sth sensible for UNKNOWN_LOCATION. Ok with that change, Richard. > Thanks, > bin > > 2016-07-20 Bin Cheng <bin.ch...@arm.com> > > * tree-ssa-loop-niter.h (number_of_iterations_exit_assumptions): New > Parameter. > * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions): New > Parameter. > (number_of_iterations_exit): Warn missed loop optimization for > possible infinite loops. > > gcc/testsuite/ChangeLog > 2016-07-20 Bin Cheng <bin.ch...@arm.com> > > * gcc.dg/tree-ssa/pr19210-1.c: Refine test strings. > * gcc.dg/tree-ssa/pr19210-2.c: Delete.