Hi Jan, hi Sebastian, while looking in the graphite backend code I stepped over a commit (r138161) introducing graphite_loops_mapping.
At the moment I do not understand perfectly for what it is used, as it seems to mirror a feature I already implemented (see graphite.h): --------------------------------------------------------------- /* LOOPS contains for every column in the graphite domain the corresponding gimple loop. If there exists no corresponding gimple loop LOOPS contains NULL. Example: Original code: for (i = 0; i <= 20; i++) for (j = 5; j <= 10; j++) A Original domain: (I)eq i j 1 1 1 0 0 # i >= 0 1 -1 0 20 # i <= 20 1 0 1 0 # j >= 0 1 0 -1 10 # j <= 10 Original loops vector: 0 1 Loop i Loop j After some changes (Exchange i and j, strip-mine i): Domain: (I)eq j ii i k 1 1 0 0 1 0 0 # i >= 0 1 0 0 -1 0 20 # i <= 20 1 1 0 0 0 0 # j >= 0 1 -1 0 0 0 10 # j <= 10 1 0 -1 1 0 0 # ii <= i 1 0 1 -1 0 1 # ii + 1 >= i 1 0 -1 0 2 0 # ii <= 2k 1 0 1 0 -2 0 # ii >= 2k Iterator vector: 0 1 2 3 Loop j NULL Loop i NULL Means the original loop i is now at column two of the domain and loop j in the original loop nest is now at column 0. Column 1 and 3 are emtpy. */ VEC (loop_p, heap) *loops; /* Returns the gimple loop, that corresponds to the loop_iterator_INDEX. If there is no corresponding gimple loop, we return NULL. */ static inline loop_p gbb_loop_at_index (graphite_bb_p gb, int index); /* Returns the corresponding loop iterator index for a gimple loop. */ static inline int gbb_loop_index (graphite_bb_p gb, loop_p loop); --------------------------------------------------------------- During your commit you removed my code from the graphite_trans_* functions. Can you explain why you decided to replace GBB_LOOPS with loops_mapping? Where there any shortcomings in my implementation or did you need some different features? Is GBB_LOOPS completely replaced by loops_mapping? In this case I will remove the remaining parts of GBB_LOOPS. It would be great, if you could add some documentation for loops_mapping, as I am not sure, if I understand your code correct. It seems, that you make a mapping from SCOP_LOOPS() to the index in the cloog matrices. I think, that this is not always possible. If we have for example a loop A in SCOP_LOOPS (), that we split during graphite into two loops B1, B2. The first loop, B1, can be blocked the second one, B2, not. So we get for the A->B1 a different mapping as for A->B2. Thanks Tobi