[PATCH] [Graphite] Using SESE regions as black-boxes

Antoniu Pop antoniu.pop@mines-paristech.fr
Wed May 19 15:34:00 GMT 2010


Hi,

This patch enables using SESE regions (instead of basic blocks) as
black-boxes in POLY_BB, so it allows hiding non-static control-flow,
function calls and non-affine subscripts as long as it is possible to
know that the region is actually well-behaved. The whole SESE region
is considered a single poly statement.

The functionality for deciding which code regions should be hidden
will come in subsequent patches.

The patch passes regression tests on the Graphite branch.

Changelog:

2010-05-19  Antoniu Pop  <antoniu.pop@gmail.com>

	* graphite-scop-detection.c (gbb_type): Added GBB_BLACK_BOX.
	(get_bb_type): Return the new type when apropriate.
	(scopdet_basic_block_info): New GBB_BLACK_BOX case in the switch.

	* sese.c (new_bb_bb_def, bb_bb_map_hash, eq_bb_bb_map,
	find_new_bb, insert_new_bb): New.  Handle the mapping between old
	BBs and new ones.
	(copy_bb_and_scalar_dependences): Renamed to
	copy_gbb_and_scalar_dependences and changed the parameters.  The
	function now can either copy a single BB or a whole black-boxed
	SESE region when re-generating the gimple.
	
	* sese.h (bb_bb_def): New.
	(gimple_bb): Replaced BB by ENTRY and EXIT for SESE region
	handling.
	(GBB_BB): Removed.
	(GBB_ENTRY, GBB_EXIT): New.
	(gbb_loop): Adapted.
	(gbb_from_bb): Moved from graphite-sese-to-poly.c.
	
	* graphite-clast-to-gimple.c (translate_clast_user): Adapted.
	* graphite-poly.c (print_pbb_domain, dump_gbb_cases,
	dump_gbb_conditions, loop_to_lst, scop_to_lst): Adapted.
	* graphite-poly.h (poly_bb, pbb_bb): Adapted and commented.
	
	* graphite-sese-to-poly.c (new_gimple_bb, free_gimple_bb):
	Constructor and destructor updated.
	(try_generate_gimple_bb): Added traversal of the SESE region to
	gather data references for the new case.  The function now also
	marks the visited BBs itself (and takes the bitmap as parameter)
	as it may need to mark all the BBs in the SESE.
	(build_scop_bbs_1): Adapted.
	(find_params_in_bb): Replaced old GBB accessor.
	(gbb_from_bb): Moved to sese.h as it is needed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_sese_black-boxes.diff
Type: text/x-patch
Size: 18452 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100519/8d34afbb/attachment.bin>


More information about the Gcc-patches mailing list