[PATCH] D75476: [mlir] Add support for detecting single use callables in the Inliner.

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 12:29:25 PST 2020


rriddle created this revision.
rriddle added a reviewer: mehdi_amini.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, jpienaar, eraman.
Herald added a project: LLVM.

This is somewhat complex(annoying) as it involves directly tracking the uses within each of the callgraph nodes, and updating them as needed during inlining. The benefit of this is that we can have a more exact cost model, enable inlining some otherwise non-inlinable cases, and also ensure that newly dead callables are properly disposed of.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75476

Files:
  mlir/examples/toy/Ch4/toyc.cpp
  mlir/examples/toy/Ch5/toyc.cpp
  mlir/examples/toy/Ch6/toyc.cpp
  mlir/examples/toy/Ch7/toyc.cpp
  mlir/include/mlir/Analysis/CallGraph.h
  mlir/lib/Analysis/CallGraph.cpp
  mlir/lib/Transforms/Inliner.cpp
  mlir/test/Transforms/inlining-dce.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75476.247705.patch
Type: text/x-patch
Size: 25918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200302/80b4ee94/attachment.bin>


More information about the llvm-commits mailing list