1
Fork 0

keep noinline for system llvm < 14

This commit is contained in:
Erik Desjardins 2021-12-29 23:19:55 -05:00
parent 2b662217e7
commit e4463b2453
9 changed files with 29 additions and 6 deletions

View file

@ -160,8 +160,7 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
let llret = bx.call(fn_ty, fn_ptr, &llargs, self.funclet(fx));
bx.apply_attrs_callsite(&fn_abi, llret);
if fx.mir[self.bb].is_cleanup {
// Cleanup is always the cold path.
bx.mark_callsite_cold(llret);
bx.apply_attrs_to_cleanup_callsite(llret);
}
if let Some((ret_dest, target)) = destination {

View file

@ -311,5 +311,5 @@ pub trait BuilderMethods<'a, 'tcx>:
) -> Self::Value;
fn zext(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
fn mark_callsite_cold(&mut self, llret: Self::Value);
fn apply_attrs_to_cleanup_callsite(&mut self, llret: Self::Value);
}