Scalable Compiler Optimizations For Improving The Memory System Performance In Multi- And Many-Core Processors