copy the optimization passes from clang
auto merge of #7466 : thestinger/rust/passes, r=cmr