[all-commits] [llvm/llvm-project] 3e8553: [mlgo][inline] Improve global state tracking

Mircea Trofin via All-commits all-commits at lists.llvm.org
Tue Jan 18 09:47:01 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3e8553aab47ab3c257fc4fade12f38d9774a2fdb
      https://github.com/llvm/llvm-project/commit/3e8553aab47ab3c257fc4fade12f38d9774a2fdb
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2022-01-18 (Tue, 18 Jan 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/InlineAdvisor.h
    M llvm/include/llvm/Analysis/MLInlineAdvisor.h
    M llvm/lib/Analysis/InlineAdvisor.cpp
    M llvm/lib/Analysis/MLInlineAdvisor.cpp
    M llvm/lib/Passes/PassRegistry.def
    M llvm/lib/Transforms/IPO/Inliner.cpp
    A llvm/test/Transforms/Inline/ML/state-tracking-coro.ll
    A llvm/test/Transforms/Inline/ML/state-tracking-scc-splits.ll
    A llvm/test/Transforms/Inline/ML/state-tracking.ll

  Log Message:
  -----------
  [mlgo][inline] Improve global state tracking

The global state refers to the number of the nodes currently in the
module, and the number of direct calls between nodes, across the
module.

Node counts are not a problem; edge counts are because we want strictly
the kind of edges that affect inlining (direct calls), and that is not
easily obtainable without iteration over the whole module.

This patch avoids relying on analysis invalidation because it turned out
to be too aggressive in some cases. It leverages the fact that Node
objects are stable - they do not get deleted while cgscc passes are
run over the module; and cgscc pass manager invariants.

Reviewed By: aeubanks

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




More information about the All-commits mailing list