A compiler apparatus for a computer system capable of improving the hit
rate of a cache memory, which includes a prefetch target extraction
device, a thread activation process insertion device, and a thread
process creation device. The compiler apparatus creates threads for
performing prefetch and prepurge. Prefetch and prepurge threads created
by this compiler apparatus perform prefetch and prepurge in parallel with
the operation of the main program, by taking into consideration program
priorities and the usage ratio of the cache memory.