Rearrange pipeline core for performance.