Chris.Dewhurst via llvm-dev
2016-Aug-01 15:46 UTC
[llvm-dev] testing a back-end pre-emit pass
Hi, Does anyone have any direction for me on testing a back-end pre-emit pass independently of other passes? The pass I'm looking at is a MachineFunctionPass, so the code is already using target-specific instructions. What I'm really looking to do is to see that the pass is correctly converting certain target-specific instructions sequences into other sequences, but I'm unsure how I can get an input in the correct format to construct a good unit test. Can I generate an ".ll" file using target specific instructions and then pass it through to a back-end MachineFunctionPass to test specifically just that one pass? Chris Dewhurst, Lero, University of Limerick. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160801/e78b3cc6/attachment.html>
Chris.Dewhurst via llvm-dev
2016-Aug-05 11:08 UTC
[llvm-dev] testing a back-end pre-emit pass
Hi, I've been trying all sorts of things to be able to resolve this, but I can't find way to get this done. Does anyone know how I might introduce a transform at the ASM level? Chris. ________________________________ From: Chris.Dewhurst Sent: 01 August 2016 16:46 To: llvm-dev at lists.llvm.org Subject: testing a back-end pre-emit pass Hi, Does anyone have any direction for me on testing a back-end pre-emit pass independently of other passes? The pass I'm looking at is a MachineFunctionPass, so the code is already using target-specific instructions. What I'm really looking to do is to see that the pass is correctly converting certain target-specific instructions sequences into other sequences, but I'm unsure how I can get an input in the correct format to construct a good unit test. Can I generate an ".ll" file using target specific instructions and then pass it through to a back-end MachineFunctionPass to test specifically just that one pass? Chris Dewhurst, Lero, University of Limerick. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160805/fcbb5276/attachment.html>
Krzysztof Parzyszek via llvm-dev
2016-Aug-05 15:17 UTC
[llvm-dev] testing a back-end pre-emit pass
You can print the function as MIR and then use that as an input to llc. llc can run individual passes on .mir input with -run-pass. -Krzysztof On 8/5/2016 6:08 AM, Chris.Dewhurst via llvm-dev wrote:> Hi, > > I've been trying all sorts of things to be able to resolve this, but I > can't find way to get this done. > > Does anyone know how I might introduce a transform at the ASM level? > > Chris. > ------------------------------------------------------------------------ > *From:* Chris.Dewhurst > *Sent:* 01 August 2016 16:46 > *To:* llvm-dev at lists.llvm.org > *Subject:* testing a back-end pre-emit pass > > Hi, > > Does anyone have any direction for me on testing a back-end pre-emit > pass independently of other passes? The pass I'm looking at is a > MachineFunctionPass, so the code is already using target-specific > instructions. > > What I'm really looking to do is to see that the pass is correctly > converting certain target-specific instructions sequences into other > sequences, but I'm unsure how I can get an input in the correct format > to construct a good unit test. Can I generate an ".ll" file using target > specific instructions and then pass it through to a back-end > MachineFunctionPass to test specifically just that one pass? > > Chris Dewhurst, > Lero, University of Limerick. > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Matthias Braun via llvm-dev
2016-Aug-05 21:33 UTC
[llvm-dev] testing a back-end pre-emit pass
Try to create a .mir test and use "llc -start-after PASSNAME". BTW: If you want to review a patch that adds -start-before: https://reviews.llvm.org/D23089 <https://reviews.llvm.org/D23089> - Matthias> On Aug 5, 2016, at 4:08 AM, Chris.Dewhurst via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi, > > I've been trying all sorts of things to be able to resolve this, but I can't find way to get this done. > > Does anyone know how I might introduce a transform at the ASM level? > > Chris. > From: Chris.Dewhurst > Sent: 01 August 2016 16:46 > To: llvm-dev at lists.llvm.org > Subject: testing a back-end pre-emit pass > > Hi, > > Does anyone have any direction for me on testing a back-end pre-emit pass independently of other passes? The pass I'm looking at is a MachineFunctionPass, so the code is already using target-specific instructions. > > What I'm really looking to do is to see that the pass is correctly converting certain target-specific instructions sequences into other sequences, but I'm unsure how I can get an input in the correct format to construct a good unit test. Can I generate an ".ll" file using target specific instructions and then pass it through to a back-end MachineFunctionPass to test specifically just that one pass? > > Chris Dewhurst, > Lero, University of Limerick. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160805/9ed42dc5/attachment.html>