Ankit Aggarwal via llvm-dev
2020-Sep-17 19:14 UTC
[llvm-dev] [NPM] Register target specific pass with opt
Hello LLVM community, I was trying to port a target specific loop transformation pass (HexagonVectorLoopCarriedReusePass) to the New Pass Manager. However, I could not figure out a way to register this pass with opt. I can see that llvm/lib/Passes/PassRegistry.def is the registry for target independent passes. Can anyone point me to an example/API which can help me in registering this pass so that I can use it -passes option in opt? Thanks Ankit -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200917/edbc88e3/attachment.html>
Chen, Yuanfang via llvm-dev
2020-Sep-17 19:20 UTC
[llvm-dev] [NPM] Register target specific pass with opt
Hi Ankit, Testing target specific passes using opt+NPM is not currently supported. The work is still work-in-progress. What is the motivation for doing this? - Yuanfang ________________________________________ From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Ankit Aggarwal via llvm-dev <llvm-dev at lists.llvm.org> Sent: Thursday, September 17, 2020 12:14 PM To: llvm-dev at lists.llvm.org Subject: [llvm-dev] [NPM] Register target specific pass with opt Hello LLVM community, I was trying to port a target specific loop transformation pass (HexagonVectorLoopCarriedReusePass) to the New Pass Manager. However, I could not figure out a way to register this pass with opt. I can see that llvm/lib/Passes/PassRegistry.def is the registry for target independent passes. Can anyone point me to an example/API which can help me in registering this pass so that I can use it -passes option in opt? Thanks Ankit
Ankit Aggarwal via llvm-dev
2020-Sep-17 19:34 UTC
[llvm-dev] [NPM] Register target specific pass with opt
Hi Chen, Thanks for the quick response. Halide which is a DSL for image processing has moved to the New Pass Manager. Earlier we were using TargetMachine's adjustPassManager to run HexagonVectorLoopCarriedReusePass. Now we want to be able to run this pass with the New Pass Manager. Regards Ankit -----Original Message----- From: Chen, Yuanfang <Yuanfang.Chen at sony.com> Sent: Thursday, September 17, 2020 12:21 PM To: llvm-dev at lists.llvm.org; Ankit Aggarwal <aankit at quicinc.com> Subject: [EXT] Re: [NPM] Register target specific pass with opt Hi Ankit, Testing target specific passes using opt+NPM is not currently supported. The work is still work-in-progress. What is the motivation for doing this? - Yuanfang ________________________________________ From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Ankit Aggarwal via llvm-dev <llvm-dev at lists.llvm.org> Sent: Thursday, September 17, 2020 12:14 PM To: llvm-dev at lists.llvm.org Subject: [llvm-dev] [NPM] Register target specific pass with opt Hello LLVM community, I was trying to port a target specific loop transformation pass (HexagonVectorLoopCarriedReusePass) to the New Pass Manager. However, I could not figure out a way to register this pass with opt. I can see that llvm/lib/Passes/PassRegistry.def is the registry for target independent passes. Can anyone point me to an example/API which can help me in registering this pass so that I can use it -passes option in opt? Thanks Ankit
Krzysztof Parzyszek via llvm-dev
2020-Sep-17 19:51 UTC
[llvm-dev] [NPM] Register target specific pass with opt
Re-reply, to llvm-dev this time. The legacy pass manager allowed TargetMachine to inject passes at various extension points (and there are actual uses of that). The NPM does support such extensions, but at the moment there is no way for a TM to add passes. Something like TargetMachine::registerPassBuilderCallbacks(PassBuilder&) would allow that. -- Krzysztof Parzyszek kparzysz at quicinc.com AI tools development -----Original Message----- From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Chen, Yuanfang via llvm-dev Sent: Thursday, September 17, 2020 2:21 PM To: llvm-dev at lists.llvm.org; Ankit Aggarwal <aankit at quicinc.com> Subject: [EXT] Re: [llvm-dev] [NPM] Register target specific pass with opt Hi Ankit, Testing target specific passes using opt+NPM is not currently supported. The work is still work-in-progress. What is the motivation for doing this? - Yuanfang ________________________________________ From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Ankit Aggarwal via llvm-dev <llvm-dev at lists.llvm.org> Sent: Thursday, September 17, 2020 12:14 PM To: llvm-dev at lists.llvm.org Subject: [llvm-dev] [NPM] Register target specific pass with opt Hello LLVM community, I was trying to port a target specific loop transformation pass (HexagonVectorLoopCarriedReusePass) to the New Pass Manager. However, I could not figure out a way to register this pass with opt. I can see that llvm/lib/Passes/PassRegistry.def is the registry for target independent passes. Can anyone point me to an example/API which can help me in registering this pass so that I can use it -passes option in opt? Thanks Ankit _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev