Data Cache Prefetching With Dynamic Adaptation
Modern processors based on VLIW architecture rely heavily on software cache prefetching incorporated by the compiler. For accurate prefetching different factors such as latencies of the loop iterations need to be taken into account, which cannot be determined at (static) compile time. Consequently, the compilers either produce inaccurate prefetches or resort to producing code without prefetching. Many applications with complex code are therefore unable to perform very well on the modern processors. In this paper, we present an approach that is able to generate accurate prefetch instructions by exploiting information available at runtime. The code is instrumented with prefetches having offsets which may be adapted at runtime through a dynamic code specializer. Such cache prefetching with dynamic adaptation results in better performance of the applications. The runtime code generation activity is highly efficient and incurs a very small overhead. The experiments performed on Itanium-II architecture using icc and gcc compilers produce an average speedup of 2.51% and 2.56%, respectively.
cache prefetching code optimization dynamic compilation programming languages memory hierarchy optimization