Nested loop data prefetching using inner loop splitting and next outer loop referencing
AssigneeHitachi, Ltd.
InventorHiroyasu Nishiyama
Life of this patent
Estimating the term…
Abstract
A nested-loop data prefetching method in which a program is converted so that prefetching is performed effectively even in nested loops in which the loop length of the innermost loops is short and the loop length of the outer loops is long. In this method, first a prefetch target loop is selected from the innermost loops in the nested loops. The selected loop is then split into a front half loop and a rear half loop by application of index set splitting. Further, an instruction to prefetch data used by the selected loop per se is inserted into the front half loop whereas an instruction to prefetch data used in the next prefetch target loop is inserted into the rear half loop.
Claims4
A nested-loop data prefetching method comprising the steps of:
- selecting a loop from the innermost loops in nested loops;
- applying index set splitting to the selected loop into a front-half count loop and a rear-half count loop;
- and
- inserting a prefetch instruction into said front-half count loop to prefetch data to be used by said selected loop per se and inserting a prefetch instruction into said rear-half count loop to prefetch data to be used by another selected loop from the innermost loops.
A nested-loop data prefetching method comprising the steps of:
- obtaining a split loop count of at least two innermost loops having fraternal relationship in nested loops on the basis of the number of cycles required for prefetching data from a main memory to a cache memory and the number of cycles for predicted execution of said innermost loops;
- splitting one of said innermost loops into a front half portion to be repeated by the number of times based on the split loop count and a rear half portion to be repeated a residual number of repetitions;
- and
- inserting a prefetch instruction into said front half portion to prefetch data used by said one innermost loop per se and inserting another prefetch instruction into said rear half portion to prefetch data used by the other of the fraternal innermost loops to be executed next.
A nested-loop data prefetching method comprising the steps of:
- obtaining a split loop count on the basis of the number of cycles required for prefetching data from a main memory to a cache memory and the number of cycles for predicted execution of the innermost loop in tightly nested loops;
- splitting said innermost loop into a front half portion to be repeated a number of times based on the split loop count and a rear half portion to be repeated a residual number of repetitions;
- and
- inserting a prefetch instruction into said front half portion to prefetch data used by said innermost loop per se and inserting another prefetch instruction into said rear half portion to prefetch data used by the innermost loop in repetition of the next outer loop.
Dependencies are inferred from the claim text.