Loop Fusion Technique with Minimal Memory Cost via Retiming