[PATCH] D79215: [llvm][NFC] Inliner: simplify inlining decision logic

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 16:39:57 PDT 2020


mtrofin created this revision.
mtrofin added reviewers: davidxl, echristo, eraman.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Both uses of shouldInline performed the exact same logic after calling
it. Simplified by encapsulating that logic in shouldInline. Now,
shouldInline returns None if inlining shouldn't happen, and an
InlineCost if it should (which is consistent with the function's
documentation, too).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D79215

Files:
  llvm/lib/Transforms/IPO/Inliner.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79215.261389.patch
Type: text/x-patch
Size: 4008 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200430/a479e6d9/attachment.bin>


More information about the llvm-commits mailing list