<br><br><div class="gmail_quote">On Wed Dec 17 2014 at 10:51:51 AM Kristof Beyls <<a href="mailto:kristof.beyls@arm.com">kristof.beyls@arm.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've been wondering too about how to get better ARM v6m compile-and-execute<br>
testing going.<br>
<br>
As you say Jon, the non-execution-based regression tests are surprisingly<br>
good at catching issues; but they're no full substitute for executing the<br>
code produced by the backend for a reasonably-sized test suite.<br>
<br>
If somehow it would be possible to compile and run the LLVM test-suite<br>
for v6m, I think that would be a good step forward. It would also allow<br>
to get a buildbot going without too much effort continuously checking<br>
basic correctness of v6m code generation.<br>
<br>
My guess is that the biggest hurdle would be to get linux or a similar<br>
operating system going on a v6m/thumb1 simulator. Does anyone have an idea<br>
if this is feasible or completely impossible?<br>
<br></blockquote><div><br></div><div>Not sure feasibility of the particular implementation, but qemu + linux works pretty well for testing other targets.</div><div><br></div><div>-eric</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks,<br>
<br>
Kristof<br>
<br>
> -----Original Message-----<br>
> From: <a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.<u></u>uiuc.edu</a>]<br>
> On Behalf Of Jonathan Roelofs<br>
> Sent: 15 December 2014 18:31<br>
> To: Bjoern Haase; <a href="mailto:llvmdev@cs.uiuc.edu" target="_blank">llvmdev@cs.uiuc.edu</a><br>
> Subject: Re: [LLVMdev] Newbee question: LLVM backend regression tests<br>
> for thumb1 targets on simulator possible?<br>
><br>
><br>
><br>
> On 12/15/14 4:29 AM, Bjoern Haase wrote:<br>
> ><br>
> > Hello,<br>
> ><br>
> > as a newbee, I'd appreciate some support on regression test setup.<br>
> ><br>
> > Specifically, I am interrested in the feature of tail call<br>
> > optimizations for the ARM v6m targets. This feature currently seems to<br>
> > be completely deactivated at the moment (v6m being based on thumb1<br>
> > ?!). According to my code-reading, this feature will involve some<br>
> > modifications in epilogue generation.<br>
> ><br>
> > My work on a gcc backend did show me that for a beginner like me, it<br>
> > is rather likely that the first attempts will break something.<br>
> :)<br>
> ><br>
> > Thus, being completely new to the llvm project I think that it's<br>
> > essential to first establish a suitable regression test setup. My plan<br>
> > is to run the tests for the v4t platform in thumb-only mode where free<br>
> > simulators are available and which behaves (at least with respect to<br>
> > the<br>
> > epilogue) very much like v6m.<br>
> Why not test your v6m changes on a Cortex-m0 QEMU? Semihosted<br>
> applications are pretty easy to get going, something like:<br>
><br>
> $ qemu-system-arm -semihosting -M integratorcp -cpu cortex-m0 -kernel<br>
> a.out<br>
><br>
> Thumv4t support is a bit spotty in llvm as it's not very well tested.<br>
> The problem I run into most (and fixed several times), is that thumbv4t<br>
> doesn't have a lo->lo mov instruction that doesn't clobber cpsr. That<br>
> being said, it does work for the most part... just something to watch<br>
> out for.<br>
> ><br>
> >  From former work on gcc I'm used to the possibilty to run regression<br>
> > tests in a simulator for the target platform (there with the expect<br>
> > script mechanism). In the documentation on the web, I did, however,<br>
> > not yet find information on a comparable feature for llvm.<br>
> ><br>
> > Therefore the specific questions:<br>
> ><br>
> > - Is there a mechanism to run backend testsuite runs in a simulation<br>
> > framework and if yes, could you give me a hint on how to find<br>
> > information<br>
> Not that I know of, no.<br>
><br>
> I routinely run the libc++ & libc++abi test suites in QEMU, but that's<br>
> more of a whole-toolchain test, rather that just a backend test. You can<br>
> get surprisingly far without simulator testing, so for most things, LLVM<br>
> doesn't use it for testing. This makes it easier for any random<br>
> developer to check out the llvm sources, build them, and run the<br>
> testsuite, and not have to have simulators installed for all the<br>
> different backends.<br>
> > - If not, how is regression testing for the thumb1 targets currently<br>
> > implemented?<br>
> We use the LIT framework <a href="http://llvm.org/docs/CommandGuide/lit.html" target="_blank">http://llvm.org/docs/<u></u>CommandGuide/lit.html</a> to<br>
> test the compiler. Mostly this means feeding in llvm IR, and using<br>
> FileCheck <a href="http://llvm.org/docs/CommandGuide/FileCheck.html" target="_blank">http://llvm.org/docs/<u></u>CommandGuide/FileCheck.html</a> (which is<br>
> basically a glorified<br>
> grep) to verify that the assembly produced is the same as what the test<br>
> expects to be generated.<br>
><br>
> To run these tests, use the 'make check-all' target from the build<br>
> directory.<br>
><br>
><br>
> Cheers,<br>
><br>
> Jon<br>
> ><br>
> > Yours,<br>
> ><br>
> > Björn Haase<br>
> ><br>
> > P.S.: Of course, any hint with respect to sibling call optimization<br>
> > would also be appreciated in a second step. I actually already found<br>
> > some helpful information in the sources.<br>
> ><br>
> > ______________________________<u></u>_________________<br>
> > LLVM Developers mailing list<br>
> > <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
><br>
> --<br>
> Jon Roelofs<br>
> <a href="mailto:jonathan@codesourcery.com" target="_blank">jonathan@codesourcery.com</a><br>
> CodeSourcery / Mentor Embedded<br>
> ______________________________<u></u>_________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
<br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
</blockquote></div>