[all-commits] [llvm/llvm-project] ae7f46: [NewPM] Fix MergeFunctions scheduling

Nikita Popov via All-commits all-commits at lists.llvm.org
Sat Dec 4 08:30:46 PST 2021

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ae7f468073e448d9a5c39364a5cc4241525c4896
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2021-12-04 (Sat, 04 Dec 2021)

  Changed paths:
    M llvm/lib/Passes/PassBuilderPipelines.cpp
    M llvm/test/Transforms/PhaseOrdering/X86/merge-functions.ll

  Log Message:
  [NewPM] Fix MergeFunctions scheduling

MergeFunctions (as well as HotColdSplitting an IROutliner) are
incorrectly scheduled under the new pass manager. The code makes
it look like they run towards the end of the module optimization
pipeline (as they should), while in reality the run at the start.
This is because the OptimizePM populated around them is only
scheduled later.

I'm fixing this by moving these three passes until after OptimizePM
to avoid splitting the function pass pipeline. It doesn't seem
important to me that some of the function passes run after these
late module passes.

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

  Commit: 8bd62119f9e9b0ee92cb7a78d1161e86293a8163
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2021-12-04 (Sat, 04 Dec 2021)

  Changed paths:
    M llvm/test/Other/new-pm-defaults.ll

  Log Message:
  [NewPM] Test more options in pipeline test (NFC)

As suggested on D115098, this tests the positioning of
HotColdSplitting, IROutliner and MergeFunctions in the optimization

Compare: https://github.com/llvm/llvm-project/compare/a25111c9e2d9...8bd62119f9e9

More information about the All-commits mailing list