Add LLVM attributes in batches instead of individually
This should improve performance.
This commit is contained in:
@@ -95,7 +95,8 @@ pub fn compile_codegen_unit(tcx: TyCtxt<'_>, cgu_name: Symbol) -> (ModuleCodegen
|
||||
// If this codegen unit contains the main function, also create the
|
||||
// wrapper here
|
||||
if let Some(entry) = maybe_create_entry_wrapper::<Builder<'_, '_, '_>>(&cx) {
|
||||
attributes::sanitize(&cx, SanitizerSet::empty(), entry);
|
||||
let attrs = attributes::sanitize_attrs(&cx, SanitizerSet::empty());
|
||||
attributes::apply_to_llfn(entry, llvm::AttributePlace::Function, &attrs);
|
||||
}
|
||||
|
||||
// Run replace-all-uses-with for statics that need it
|
||||
|
||||
Reference in New Issue
Block a user