Maximum inlining threshold

Hi,

We want to apply the deepest possible inlining to the target code. Looks like

builder.Inliner = createFunctionInliningPass(2000);

does the sufficient inlining, but what would be the best value for
threshold here? Apparently,

builder.Inliner = createFunctionInliningPass(numeric_limits<int>::max());

gives less inlining, that 2000.

Thanks,
- D.

Hi Dmitry,

We want to apply the deepest possible inlining to the target code. Looks like

you could give every function the alwaysinline attribute.

Ciao, Duncan.

Hi Duncan,

I followed you advice

      const AttrListPtr attr = func->getAttributes();
      const AttrListPtr attr_new = attr.addAttr(~0U, Attribute::AlwaysInline);
      func->setAttributes(attr_new);

With AlwaysInline it seems enough to perform inlining without
specifying any threshold.

Thank you!
- D.