Nested-loop data prefetching method and a program generation method