[all-commits] [llvm/llvm-project] f64eee: [NFC][InlineAdvisor] Inform advisor when the modul...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Thu Nov 11 10:24:06 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f64eee162525d6298014772d5f99ab28b26aa238
      https://github.com/llvm/llvm-project/commit/f64eee162525d6298014772d5f99ab28b26aa238
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2021-11-11 (Thu, 11 Nov 2021)

  Changed paths:
    M llvm/include/llvm/Analysis/InlineAdvisor.h
    M llvm/include/llvm/Analysis/MLInlineAdvisor.h
    M llvm/lib/Analysis/MLInlineAdvisor.cpp

  Log Message:
  -----------
  [NFC][InlineAdvisor] Inform advisor when the module is invalidated

This avoids unnecessary re-calculation of module-wide features in the
MLInlineAdvisor. In cases where function passes don't invalidate
functions (and, thus, don't invalidate the module), but we re-process a
CGSCC, we currently refreshed module features unnecessarily. The
overhead of fetching cached results (albeit they weren't themselves
invalidated) was noticeable in certain modules' compilations.

We don't want to just invalidate the advisor object, though, via the
analysis manager, because we'd then need to re-create expensive state
(like the model evaluator in the ML 'development' mode).

Reviewed By: phosek

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




More information about the All-commits mailing list