This is an effort to allowing external libraries register their own pass instrumentation during their llvmGetPassPluginInfo() calls.
By exposing this through the added getPIC(), now a pass writer can do something like this:
extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK llvmGetPassPluginInfo() { return { .., [](llvm::PassBuilder &PB) { PB.getPIC()->registerAfterPassCallback(move(f)); } }; }
nit: "to add pass instrumentation" -> "to register pass instrumentation callbacks."