cloog_loop_simplify: split up union-domains before simplifying
commit8c8510df56fb3b2cf310b760831cab2189d97159
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 11 Jun 2011 13:20:22 +0000 (11 15:20 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 14 Jun 2011 13:16:42 +0000 (14 15:16 +0200)
tree2c6d6fa9495d1ab4ac642863e1f1c0fcb5d4583f
parent87611be6af3ba74dd2b143d5299dfd94144d5833
cloog_loop_simplify: split up union-domains before simplifying

The clast construction assumes that none of the loop domains
involve any unions.  To ensure this property holds an additional
call to cloog_loop_disjoint was performed after the actual simplification.
This interacts badly with the save_domains option.
If cloog_loop_disjoint actually performs any operation, then
the unsimplified domain attached is discarded.

Another possible drawback of the old approach is that if a union domain
ever appears on a node that is not a leaf node, then that union domain
will be used as the context of a simplification operation, making
it less effective then had the domain been split first.
(It's not immediately obvious if this can ever happen.)

The simplification process itself never introduces any union,
so it is safe to perform the split (if needed) before the simplification.
In particular, we now perform the split after the attempt to combine
union domains, but before the actual simplification.

The comment is also changed as it has been outdated.
In particular, the union that is present in the test/iftest2.cloog
input has now already disappeared before we reach this stage.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
source/loop.c