Exploiting software information for an efficient memory hierarchy