[PATCH] D11032: [PM] Enable registration of out-of-tree or plugin passes

Philip Pfaffe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 1 08:27:20 PDT 2017


philip.pfaffe updated this revision to Diff 93748.
philip.pfaffe added a comment.
Herald added a subscriber: mehdi_amini.

Redesign the HookManager to incorporate extension points. The basic idea is to maintain tables of hooks for the different places the PassBuilder will want to run them, for instance for different IRUnits when parsing textual pipeline descriptions, or the individual extension points. The places are identified by Tags, which need to be specified when registering a hook. The individual tags are either the respective IRUnit, for pipeline parsing, or an extension point. Extension points define certain positions in the various optimizer/LTO/PGO pipelines.

I've tried to match the extension points as closely as possible to the legacy PassManagerBuilder, but I'm not sure I succeeded. Most importantly in the context of the function simplification, the pipelines have changed a little bit, and I wasn't able to identify all the correct spots: At PassManagerBuilder::addFunctionSimplificationPasses, vectorizer passes are added to the PassManager, which isn't reflected in PassBuilder right now. There are hence 2 instances of the Peephole extension point missing.


https://reviews.llvm.org/D11032

Files:
  include/llvm/Passes/PassBuilder.h
  lib/Passes/PassBuilder.cpp
  test/Other/new-pm-lto-defaults.ll
  unittests/IR/CMakeLists.txt
  unittests/IR/HookManagerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11032.93748.patch
Type: text/x-patch
Size: 34544 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170401/e06cae6a/attachment.bin>


More information about the llvm-commits mailing list