[PATCH] D143624: Inlining: Run the legacy AlwaysInliner before the regular inliner.

Dave Green via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 3 08:01:32 PDT 2023


dmgreen added a comment.

It looks like there is quite a lot more optimization that happens to the function being always-inlined (__SSAT) before this change. Through multiple rounds of instcombine, almost to the end of the pass pipeline. The new version runs a lot less before inlining, only running instcombine->simplifycfg and not seeing another instcombine to clean up the results. Is that because the AlwaysInlinePass is a module pass and it now only runs the passes up to that point?

It does look like there might be a chance to undo the transform, as opposed to prevent the transform that blocks it. Something like https://alive2.llvm.org/ce/z/qHtPqz seems to happen at at least one point. Might that be more preferable?

There are some other changes I#m seeing though, from the same function inlined into different routine. This one for example seems to be not longer applying to canonicalizeClampLike, so the ssat doesn't get created. https://godbolt.org/z/qMW44qfz4. That doesn't seem to be easily undoable without knowing the value is positive though https://alive2.llvm.org/ce/z/v9YdaK.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143624



More information about the cfe-commits mailing list