rustc: Don't inline free glue
This commit is contained in:
parent
c88fc06b40
commit
d2bdfe36cf
1 changed files with 9 additions and 0 deletions
|
@ -1812,6 +1812,10 @@ fn declare_tydesc(&@local_ctxt cx, &ty::t t,
|
||||||
"cmp");
|
"cmp");
|
||||||
auto ccx = cx.ccx;
|
auto ccx = cx.ccx;
|
||||||
|
|
||||||
|
// Don't inline free glue; it's cold.
|
||||||
|
llvm::LLVMAddFunctionAttr(free_glue, lib::llvm::LLVMNoInlineAttribute as
|
||||||
|
lib::llvm::llvm::Attribute);
|
||||||
|
|
||||||
auto llsize;
|
auto llsize;
|
||||||
auto llalign;
|
auto llalign;
|
||||||
if (!ty::type_has_dynamic_size(ccx.tcx, t)) {
|
if (!ty::type_has_dynamic_size(ccx.tcx, t)) {
|
||||||
|
@ -3000,6 +3004,11 @@ fn lazily_emit_tydesc_glue(&@block_ctxt cx, int field,
|
||||||
declare_generic_glue(lcx, ti.ty,
|
declare_generic_glue(lcx, ti.ty,
|
||||||
T_glue_fn(lcx.ccx.tn),
|
T_glue_fn(lcx.ccx.tn),
|
||||||
"free");
|
"free");
|
||||||
|
// Don't inline free glue; it's cold.
|
||||||
|
llvm::LLVMAddFunctionAttr(glue_fn,
|
||||||
|
lib::llvm::LLVMNoInlineAttribute as
|
||||||
|
lib::llvm::llvm::Attribute);
|
||||||
|
|
||||||
ti.free_glue = some[ValueRef](glue_fn);
|
ti.free_glue = some[ValueRef](glue_fn);
|
||||||
auto dg = make_free_glue;
|
auto dg = make_free_glue;
|
||||||
make_generic_glue(lcx, ti.ty, glue_fn,
|
make_generic_glue(lcx, ti.ty, glue_fn,
|
||||||
|
|
Loading…
Reference in a new issue