Welson Sun via llvm-dev
2017-Jan-26 02:04 UTC
[llvm-dev] AAResultsWrapperPass assertion in 3.9
Thanks Eli. Ashutosh once asked the same question, and later said: 'createLegacyPMAAResults' can help here. But how should this be used to solve the assertion problem? On Jan 25, 2017, 4:10 PM -0800, Friedman, Eli <efriedma at codeaurora.org>, wrote:> On 1/25/2017 4:00 PM, Welson Sun via llvm-dev wrote: > > Hi, > > > > Migrating from 3.5 to 3.9. There is a module pass that uses alias > > analysis started breaking at runtime: > > > > llvm/lnx64/llvm/include/llvm/PassAnalysisSupport.h:236: AnalysisType& > > llvm::Pass::getAnalysisID(llvm::AnalysisID) const [with AnalysisType > > llvm::AAResultsWrapperPass; llvm::AnalysisID = const void*]: Assertion > > `ResultPass && "getAnalysis*() called on an analysis that was not " > > "'required' by pass!"' failed. > > > > See https://reviews.llvm.org/rL247167 . > > -Eli > > -- > Employee of Qualcomm Innovation Center, Inc. > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170125/5fa5676c/attachment-0001.html>
Friedman, Eli via llvm-dev
2017-Jan-26 02:32 UTC
[llvm-dev] AAResultsWrapperPass assertion in 3.9
On 1/25/2017 6:04 PM, Welson Sun wrote:> Thanks Eli. > > Ashutosh once asked the same question, and later said: > 'createLegacyPMAAResults' can help here. > But how should this be used to solve the assertion problem?(The message in question is http://lists.llvm.org/pipermail/llvm-dev/2015-October/091128.html , for reference.) The problem is that you can't require a FunctionPass from a ModulePass. The solution is not to do that. createLegacyPMAAResults is an alternative way to access alias analysis without an AAResultsWrapperPass. See the LLVM source code for examples of how to use it. -Eli -- Employee of Qualcomm Innovation Center, Inc. Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170125/ba92f879/attachment.html>
Welson Sun via llvm-dev
2017-Jan-26 04:08 UTC
[llvm-dev] AAResultsWrapperPass assertion in 3.9
Well, you can call function pass on demand in a module pass like getAnalysis<LoopInfoWrapperPass>(f). Not something for AA? On Jan 25, 2017, 6:32 PM -0800, Friedman, Eli <efriedma at codeaurora.org>, wrote:> On 1/25/2017 6:04 PM, Welson Sun wrote: > > Thanks Eli. > > > > Ashutosh once asked the same question, and later said: > > > > 'createLegacyPMAAResults' can help here. > > > > But how should this be used to solve the assertion problem? > > (The message in question is http://lists.llvm.org/pipermail/llvm-dev/2015-October/091128.html, for reference.) > > The problem is that you can't require a FunctionPass from a ModulePass. The solution is not to do that. > > createLegacyPMAAResults is an alternative way to access alias analysis without an AAResultsWrapperPass. See the LLVM source code for examples of how to use it. > > -Eli > > -- > Employee of Qualcomm Innovation Center, Inc. > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170125/415c0272/attachment.html>
Welson Sun via llvm-dev
2017-Jan-27 05:51 UTC
[llvm-dev] AAResultsWrapperPass assertion in 3.9
Thanks Eli, I got createLegacyPMAAResults working. The weird thing is that the pass runs all fine from command line, but load with gdb will crash on createLegacyPMAAResults. On Jan 25, 2017, 6:32 PM -0800, Friedman, Eli <efriedma at codeaurora.org>, wrote:> On 1/25/2017 6:04 PM, Welson Sun wrote: > > Thanks Eli. > > > > Ashutosh once asked the same question, and later said: > > > > 'createLegacyPMAAResults' can help here. > > > > But how should this be used to solve the assertion problem? > > (The message in question is http://lists.llvm.org/pipermail/llvm-dev/2015-October/091128.html, for reference.) > > The problem is that you can't require a FunctionPass from a ModulePass. The solution is not to do that. > > createLegacyPMAAResults is an alternative way to access alias analysis without an AAResultsWrapperPass. See the LLVM source code for examples of how to use it. > > -Eli > > -- > Employee of Qualcomm Innovation Center, Inc. > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170126/e482f9db/attachment.html>