Move slide optimization into compiler.