K-loops: Loop Transformations for Reconfigurable Architectures