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 GCC]More conservative interchanging small loops with const initialized simple reduction


Hi,
This simple patch makes interchange even more conservative for small loops with constant initialized simple reduction.
The reason is undoing such reduction introduces new data reference and cond_expr, which could cost too much in a small
loop.
Test gcc.target/aarch64/pr62178.c is fixed with this patch.  Is it OK if test passes?

Thanks,
bin
2017-12-08  Bin Cheng  <bin.cheng@arm.com>

	* gimple-loop-interchange.cc (struct loop_cand): New field.
	(loop_cand::loop_cand): Init new field in constructor.
	(loop_cand::classify_simple_reduction): Record simple reduction
	initialized with constant value.
	(should_interchange_loops): New parameter.  Skip interchange if loop
	has few data references and constant intitialized simple reduction.
	(tree_loop_interchange::interchange): Update call to above function.
	(should_interchange_loop_nest): Ditto.

Attachment: const-simple-reduc.txt
Description: const-simple-reduc.txt


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