[all-commits] [llvm/llvm-project] e96925: [PartialInlining] Enable recursive partial inlining.

Mark Lacey via All-commits all-commits at lists.llvm.org
Mon Dec 5 23:10:50 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e96925ce0b03268afa75538943e355603c1fe63e
      https://github.com/llvm/llvm-project/commit/e96925ce0b03268afa75538943e355603c1fe63e
  Author: Mark Lacey <mark.lacey at apple.com>
  Date:   2022-12-05 (Mon, 05 Dec 2022)

  Changed paths:
    M llvm/lib/Transforms/IPO/PartialInlining.cpp
    A llvm/test/Transforms/PartialInlining/recursive_partial_inlining.ll

  Log Message:
  -----------
  [PartialInlining] Enable recursive partial inlining.

It seems unnecessarily limiting to disallow recursive partial
inlining, and there are clearly cases where it can benefit
code by avoiding a function call and potentially enabling
other transformations like dead argument elimination
in cases where an argument is only used prior to the early-out
test at the top of the function.

The pass already properly rewrites the recursive calls
within the body of the freshly cloned function, so the only
change here is removing the bail-out when recursion is
detected.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D136383




More information about the All-commits mailing list