[all-commits] [llvm/llvm-project] 4be504: [mlir] Add support for detecting single use callab...

River Riddle via All-commits all-commits at lists.llvm.org
Wed Mar 18 13:17:02 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4be504a97f9176c9b1f9db24724e35122b1edc5f
      https://github.com/llvm/llvm-project/commit/4be504a97f9176c9b1f9db24724e35122b1edc5f
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2020-03-18 (Wed, 18 Mar 2020)

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

  Log Message:
  -----------
  [mlir] Add support for detecting single use callables in the Inliner.

Summary: 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.

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




More information about the All-commits mailing list