A method for compiler assisted victim cache bypassing including:
identifying a cache line as a candidate for victim cache bypassing;
conveying a bypassing-the-victim-cache information to a hardware; and
checking a state of the cache line to determine a modified state of the
cache line, wherein the cache line is identified for cache bypassing if
the cache line that has no reuse within a loop or loop nest and there is
no immediate loop reuse or there is a substantial across loop reuse
distance so that it will be replaced from both main and victim cache
before being reused.