[PATCH] D88138: [NPM] Add target specific hook to add passes for New Pass Manager
Ankit via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 00:13:13 PDT 2020
quic_aankit created this revision.
quic_aankit added reviewers: kparzysz, asbirlea, aeubanks.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
quic_aankit requested review of this revision.
The patch adds a new TargetMachine member "registerPassBuilderCallbacks" for targets to add passes to the pass pipeline using the New Pass Manager (similar to adjustPassManager for the Legacy Pass Manager).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D88138
Files:
llvm/include/llvm/Target/TargetMachine.h
Index: llvm/include/llvm/Target/TargetMachine.h
===================================================================
--- llvm/include/llvm/Target/TargetMachine.h
+++ llvm/include/llvm/Target/TargetMachine.h
@@ -34,6 +34,7 @@
class MCSubtargetInfo;
class MCSymbol;
class raw_pwrite_stream;
+class PassBuilder;
class PassManagerBuilder;
struct PerFunctionMIParsingState;
class SMDiagnostic;
@@ -293,6 +294,10 @@
/// PassManagerBuilder::addExtension.
virtual void adjustPassManager(PassManagerBuilder &) {}
+ /// Allow the target to modify the pass pipeline with New Pass Manager
+ /// (similar to adjustPassManager for Legacy Pass manager).
+ virtual void registerPassBuilderCallbacks(PassBuilder &) {}
+
/// Add passes to the specified pass manager to get the specified file
/// emitted. Typically this will involve several steps of code generation.
/// This method should return true if emission of this file type is not
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88138.293661.patch
Type: text/x-patch
Size: 947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200923/0bb9342b/attachment.bin>
More information about the llvm-commits
mailing list