AST generation: special case pure outer disjunctions
commit07574b507561a3a2260debd062c729b00215dcf8
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 19 May 2016 09:09:14 +0000 (19 11:09 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 30 May 2016 08:45:25 +0000 (30 10:45 +0200)
tree397e34a04154dcbf8ef3f3d8d81e7ac3189288ee
parent07279b64e6328b02317769f5b6e1ec18e9743600
AST generation: special case pure outer disjunctions

If the schedule domain for a loop that is about to be constructed
consists of a disjunction that only involves outer dimensions, then
by default (essentially) the same loop is constructed several times,
each with a different guard (i.e., one of the disjuncts in the disjunction).
Generate a single loop instead.  Note that this means that the disjunction
is now preserved, whereas previously it would be broken up at this point.
This may incur an increase in AST generation time.
The disjunction is now only generated at the leaves and hopefully propagated
back up to the point where it was first discovered.

Requested-by: Tobias Grosser <tobias@grosser.es>
Tested-by: Tobias Grosser <tobias@grosser.es>
Tested-by: Chris Jenneisch <chrisj@codeaurora.org>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_ast_codegen.c
test_inputs/codegen/disjuncts2.c [new file with mode: 0644]
test_inputs/codegen/disjuncts2.st [new file with mode: 0644]
test_inputs/codegen/isolate2.c