[all-commits] [llvm/llvm-project] 7f6f9f: [NewPM] Make pass adaptors less templatey

aeubanks via All-commits all-commits at lists.llvm.org
Fri Dec 4 08:43:36 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 7f6f9f4cf966c78a315d15d6e913c43cfa45c47c
      https://github.com/llvm/llvm-project/commit/7f6f9f4cf966c78a315d15d6e913c43cfa45c47c
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2020-12-04 (Fri, 04 Dec 2020)

  Changed paths:
    M llvm/include/llvm/Analysis/CGSCCPassManager.h
    M llvm/include/llvm/IR/PassManager.h
    M llvm/include/llvm/Transforms/Scalar/LoopPassManager.h
    M llvm/lib/Analysis/CGSCCPassManager.cpp
    M llvm/lib/IR/PassManager.cpp
    M llvm/lib/Transforms/Scalar/LoopPassManager.cpp
    M llvm/test/Other/change-printer.ll
    M llvm/test/Other/pass-pipeline-parsing.ll

  Log Message:
  -----------
  [NewPM] Make pass adaptors less templatey

Currently PassBuilder.cpp is by far the file that takes longest to
compile. This is due to tons of templates being instantiated per pass.

Follow PassManager by using wrappers around passes to avoid making
the adaptors templated on the pass type. This allows us to move various
adaptors' run methods into .cpp files.

This reduces the compile time of PassBuilder.cpp on my machine from 66
to 39 seconds. It also reduces the size of opt from 685M to 676M.

Reviewed By: dexonsmith

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




More information about the All-commits mailing list