[PATCH PING]Improve induction variable elimination

Bin Cheng bin.cheng@arm.com
Wed Oct 8 03:35:00 GMT 2014


Hi,
This patch is posted long before in a series of patches at
https://gcc.gnu.org/ml/gcc-patches/2014-07/msg01392.html .  Since the
preceding patch is changed according to review comments, also because it's
long time not reviewed, I rebased and updated this patch as attached.  

With this patch, spec2k/fp can be improved a little on aarch64.
Bootstrap and test on x86_64 and x86, I am also prepared to fix any
regression in the future.  Is it OK?

2014-09-30  Bin Cheng  <bin.cheng@arm.com>

	* tree-ssa-loop-ivopts.c (iv_nowrap_period)
	(nowrap_cand_for_loop_niter_p): New functions.
	(period_greater_niter_exit): New function refactored from
	may_eliminate_iv.
	(difference_cannot_overflow_p): Handle zero offset.
	(iv_elimination_compare_lt): New parameter.  Check wrapping
	behavior for candidate of wrapping type.  Handle folded forms
	of may_be_zero expression.
	(may_eliminate_iv): Call period_greater_niter_exit.  Pass new
	argument for iv_elimination_compare_lt.

gcc/testsuite/ChangeLog
2014-09-30  Bin Cheng  <bin.cheng@arm.com>

	* gcc.dg/tree-ssa/ivopts-lt-3.c: New test.
	* gcc.dg/tree-ssa/ivopts-lt-4.c: New test.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: iv_elimination-improve-c-20140913.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141008/49d44f29/attachment.txt>


More information about the Gcc-patches mailing list