[PATCH] D92616: [NewPM] Make pass adaptors less templatey

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 3 15:48:43 PST 2020


aeubanks created this revision.
Herald added subscribers: dexonsmith, hiraditya.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92616

Files:
  llvm/include/llvm/Analysis/CGSCCPassManager.h
  llvm/include/llvm/IR/PassManager.h
  llvm/include/llvm/Transforms/Scalar/LoopPassManager.h
  llvm/lib/Analysis/CGSCCPassManager.cpp
  llvm/lib/IR/PassManager.cpp
  llvm/lib/Transforms/Scalar/LoopPassManager.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92616.309392.patch
Type: text/x-patch
Size: 66388 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201203/da0804cd/attachment.bin>


More information about the llvm-commits mailing list