copy the optimization passes from clang