[PATCH] D33464: [PM][WIP] Enable out-of-tree registration of passes with the new PassBuilder

Philip Pfaffe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 24 10:16:20 PDT 2017


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

I've merged the HookManager into the PassBuilder type. To rendezvous the PB with plugins, it is now able to call a well-known function `extern "C" void RegisterPluginPasses(PassBuilder &)` on the loaded objects. Plugins get to register callbacks there.

A linked-in Polly will not use this mechanism though, which is why I'm invoking it directly in opt's NewPMDriver as a demonstration (other tools will do the same).


https://reviews.llvm.org/D33464

Files:
  include/llvm/Passes/PassBuilder.h
  include/llvm/Support/PluginLoader.h
  lib/Passes/PassBuilder.cpp
  lib/Support/PluginLoader.cpp
  test/Other/new-pm-lto-defaults.ll
  tools/bugpoint/OptimizerDriver.cpp
  tools/opt/NewPMDriver.cpp
  unittests/IR/CMakeLists.txt
  unittests/IR/HookManagerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33464.100125.patch
Type: text/x-patch
Size: 38687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170524/faecd2c5/attachment.bin>


More information about the llvm-commits mailing list