Latte: Locality Aware Transformation for High-Level Synthesis