XFOR: Filling the Gap between Automatic Loop Optimization and Peak Performance

Imen Fassi, Philippe Clauss
2015 2015 14th International Symposium on Parallel and Distributed Computing  
We propose a new loop structure named xfor, offering programmers explicit control of the interactions between statements inside a loop nest. An xfor simultaneously represents several for-loops and several statements, and maps their respective iteration domains onto each other according to two parameters, called grain and offset. Grains and offsets basically "stretch" and "shift" iteration domains relative to an implicit, global referential domain. We show that such a programming structure
more » ... ing structure allows to fill important optimization gaps remained by automatic loop optimizers. We highlight five important gaps filled by xfor which are: insufficient data locality optimization, excess of conditional branches in the generated code, too verbose code with too many machine instructions, data locality optimization resulting in processor stalls, and finally missed vectorization opportunities. We describe programming strategies where xforloops help produce efficient code and exhibit a set of benchmark programs rewritten with xfor, with significant, and sometimes dramatic, execution time speed-ups.
doi:10.1109/ispdc.2015.19 dblp:conf/ispdc/FassiC15 fatcat:zakiivulafbzdim54g2hjypwdu