[PATCH] D23299: [PM] Port the always inliner to the new pass manager in a much more minimal and boring form than the old pass manager's version.

Leonard Chan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 17:31:03 PDT 2019


leonardchan added a comment.
Herald added subscribers: mgorny, nhaehnle, wdng, jvesely.
Herald added a project: LLVM.

Hi, I'm attempting to fix all clang tests that fail when enabling the new PM by default and one of the failing tests is CodeGen/flatten.c which tests the `flatten` attribute. According to the docs, this attribute attempts to inline function calls in functions marked with `flatten`. But if I understand this patch correctly, one of the intentions is only inlining for functions and not calls.

Is it set in stone that the new PM will not inline calls? Otherwise, it seems to break `flatten` for -O0 cases with new PM. At a quick glance, it seems that we can enable this on callsites by adding a check for `AlwaysInline` here <https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/IPO/AlwaysInliner.cpp#L52> and removing the `F.hasFnAttribute(Attribute::AlwaysInline)` here <https://github.com/llvm/llvm-project/blob/master/llvm/lib/Transforms/IPO/AlwaysInliner.cpp#L40>.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D23299/new/

https://reviews.llvm.org/D23299





More information about the llvm-commits mailing list