diff options
| author | Erik Desjardins <erikdesjardins@users.noreply.github.com> | 2022-02-21 11:19:16 -0500 |
|---|---|---|
| committer | Erik Desjardins <erikdesjardins@users.noreply.github.com> | 2022-02-26 13:14:55 -0500 |
| commit | 30d3ce06742fc5d0eb844239652a0af4d47bb095 (patch) | |
| tree | d1fa3a83f6d9844567fc46bd59104e7377cfba39 /compiler/rustc_codegen_llvm/src/base.rs | |
| parent | 6f681a8eb3fbdf37075ae5f921518f5f4b9306a6 (diff) | |
| download | rust-30d3ce06742fc5d0eb844239652a0af4d47bb095.tar.gz rust-30d3ce06742fc5d0eb844239652a0af4d47bb095.zip | |
Add LLVM attributes in batches instead of individually
This should improve performance.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/base.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/base.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/base.rs b/compiler/rustc_codegen_llvm/src/base.rs index e15b86aa84f..dd3ada44389 100644 --- a/compiler/rustc_codegen_llvm/src/base.rs +++ b/compiler/rustc_codegen_llvm/src/base.rs @@ -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 |
