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]

[PATCH PING]Improve induction variable elimination


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.

Attachment: iv_elimination-improve-c-20140913.txt
Description: Text document


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