[PATCH] D71086: Let PassBuilder Expose PassInstrumentationCallbacks
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 6 21:09:48 PST 2020
aqjune updated this revision to Diff 236505.
aqjune added a comment.
- Address a comment
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71086/new/
https://reviews.llvm.org/D71086
Files:
llvm/include/llvm/Passes/PassBuilder.h
llvm/unittests/IR/PassBuilderCallbacksTest.cpp
Index: llvm/unittests/IR/PassBuilderCallbacksTest.cpp
===================================================================
--- llvm/unittests/IR/PassBuilderCallbacksTest.cpp
+++ llvm/unittests/IR/PassBuilderCallbacksTest.cpp
@@ -418,6 +418,9 @@
PB(nullptr, PipelineTuningOptions(), None, &CallbacksHandle.Callbacks),
PM(true), LAM(true), FAM(true), CGAM(true), AM(true) {
+ EXPECT_TRUE(&CallbacksHandle.Callbacks ==
+ PB.getPassInstrumentationCallbacks());
+
/// Register a callback for analysis registration.
///
/// The callback is a function taking a reference to an AnalyisManager
Index: llvm/include/llvm/Passes/PassBuilder.h
===================================================================
--- llvm/include/llvm/Passes/PassBuilder.h
+++ llvm/include/llvm/Passes/PassBuilder.h
@@ -631,6 +631,13 @@
std::string ProfileFile,
std::string ProfileRemappingFile);
+
+ /// Returns PIC. External libraries can use this to register pass
+ /// instrumentation callbacks.
+ PassInstrumentationCallbacks *getPassInstrumentationCallbacks() const {
+ return PIC;
+ }
+
private:
static Optional<std::vector<PipelineElement>>
parsePipelineText(StringRef Text);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71086.236505.patch
Type: text/x-patch
Size: 1283 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200107/2c54c803/attachment.bin>
More information about the llvm-commits
mailing list