Enable the MergeFunc pass

Fixes #9536
This commit is contained in:
Björn Steinbrink 2014-08-24 00:03:56 +02:00
parent 03fd90be45
commit bbc66332fe
1 changed files with 7 additions and 0 deletions

View File

@ -536,6 +536,13 @@ pub mod write {
llvm::LLVMPassManagerBuilderPopulateFunctionPassManager(builder, fpm);
llvm::LLVMPassManagerBuilderPopulateModulePassManager(builder, mpm);
llvm::LLVMPassManagerBuilderDispose(builder);
match opt {
llvm::CodeGenLevelDefault | llvm::CodeGenLevelAggressive => {
"mergefunc".with_c_str(|s| llvm::LLVMRustAddPass(mpm, s));
}
_ => {}
};
}
}