[all-commits] [llvm/llvm-project] 97ab06: [NPM] Do not run function simplification pipeline ...

Mircea Trofin via All-commits all-commits at lists.llvm.org
Thu May 6 12:35:01 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 97ab068034161fb35e5c9a7b293bf1e569cf077b
      https://github.com/llvm/llvm-project/commit/97ab068034161fb35e5c9a7b293bf1e569cf077b
  Author: Mircea Trofin <mtrofin at google.com>
  Date:   2021-05-06 (Thu, 06 May 2021)

  Changed paths:
    M llvm/include/llvm/Analysis/CGSCCPassManager.h
    M llvm/lib/Analysis/CGSCCPassManager.cpp
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/Passes/PassRegistry.def
    A llvm/test/Other/new-pass-manager-cgscc-fct-proxy.ll
    M llvm/unittests/Analysis/CGSCCPassManagerTest.cpp

  Log Message:
  -----------
  [NPM] Do not run function simplification pipeline unnecessarily

The CGSCC pass manager interplay with the FunctionAnalysisManagerCGSCCProxy is 'special' in the sense that the former will rerun the latter if there are changes to a SCC structure; that being said, some of the functions in the SCC may be unchanged. In that case, the function simplification pipeline will be re-run, which impacts compile time[1].

This patch allows the function simplification pipeline be skipped if it was already run and the function was not modified since.

The behavior is currently disabled by default. This is because, currently, the rerunning of the function simplification pipeline on an unchanged function may still result in changes. The patch simplifies investigating and fixing those cases where repeated function pass runs do actually positively impact code quality, while offering an easy workaround for those impacted negatively by compile time regressions, and not impacting mainline scenarios.

[1] A [[ http://llvm-compile-time-tracker.com/compare.php?from=eb37d3546cd0c6e67798496634c45e501f7806f1&to=ac722d1190dc7bbdd17e977ef7ec95e69eefc91e&stat=instructions | compile time tracker ]] run with the option enabled.

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




More information about the All-commits mailing list