diff options
| author | bors <bors@rust-lang.org> | 2022-02-27 09:23:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-02-27 09:23:24 +0000 |
| commit | 2bd9656c80ff06412c833bd9a6e7118a81bb95fc (patch) | |
| tree | 8bba3eafb54303880322970d5ef4a1d0e83d92c1 /compiler/rustc_codegen_llvm/src/base.rs | |
| parent | 93230281562cd6b1b45eff070c473e3be20d9e72 (diff) | |
| parent | 0d0cc4f6a0cb48600f183c382986df1897bdb7dc (diff) | |
| download | rust-2bd9656c80ff06412c833bd9a6e7118a81bb95fc.tar.gz rust-2bd9656c80ff06412c833bd9a6e7118a81bb95fc.zip | |
Auto merge of #94221 - erikdesjardins:addattr, r=nikic
Add LLVM attributes in batches instead of individually This should improve performance. ~r? `@ghost` (blocked on #94127)~
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 |
