<div dir="ltr"><br><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><i><font size="2" face="monospace, monospace"><b>Vivek Pandya</b></font></i><div><br></div></div></div></div></div></div>
<br><div class="gmail_quote">On Tue, Mar 1, 2016 at 11:18 PM, via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send llvm-dev mailing list submissions to<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:llvm-dev-request@lists.llvm.org">llvm-dev-request@lists.llvm.org</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:llvm-dev-owner@lists.llvm.org">llvm-dev-owner@lists.llvm.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of llvm-dev digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. EuroLLVM BoF session: Compilers in education<br>
(Roel Jordans via llvm-dev)<br>
2. Problem with mingw32 DLL build (Chandler Carruth via llvm-dev)<br>
3. Re: [GSoC 2016] Code Generation Improvements task<br>
(vivek pandya via llvm-dev)<br>
4. Re: RFC: Add bitcode tests to test-suite<br>
(Mehdi Amini via llvm-dev)<br>
5. Re: Compiler-RT cmake building (Alexey Samsonov via llvm-dev)<br>
6. Re: Compiling for AArch64: CommandLine Error: Option<br>
'aarch64-branch-relax' registered more than once!<br>
(Kai Nacke via llvm-dev)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 1 Mar 2016 17:27:40 +0100<br>
From: Roel Jordans via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
To: <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
Subject: [llvm-dev] EuroLLVM BoF session: Compilers in education<br>
Message-ID: <<a href="mailto:56D5C2FC.40606@tue.nl">56D5C2FC.40606@tue.nl</a>><br>
Content-Type: text/plain; charset="utf-8"; format=flowed<br>
<br>
Hi all,<br>
<br>
I'm organizing a BoF session during the upcoming EuroLLVM developers<br>
meeting. As the subject of this message already shows, this session<br>
will be on compilers in education. I'm currently looking for both<br>
participants to the discussion and input for the actual program of the<br>
session. I've already got some ideas which I'll introduce below.<br>
<br>
At our university, we mostly come from a hardware and processor design<br>
background. In the past we managed to design all kinds of crazy<br>
architecture ideas and, since we could program them by hand for our<br>
demonstration cases, we usually assumed that compilers could just 'do<br>
the trick'. However, over the years we learned that this usually wasn't<br>
the case. Looking around for what was actually being taught in compiler<br>
design we found that the course at our university had been teaching<br>
mostly the classical frontend parts (parsing etc) and was discontinued<br>
several years ago. We decided it was time for us to step up and start<br>
teaching our students again what is and isn't possible in compilers.<br>
This time, also with extensions into the layers that relate more closely<br>
to the hardware so that the course would match our processor<br>
architecture backgrounds more closely.<br>
<br>
In general, the contents of this course are more or less as follows:<br>
- Backend organization (optimizations, lowering, scheduling, register<br>
allocation)<br>
- Code optimization (code analysis, loop optimizations, auto<br>
vectorization, Polly)<br>
- Using the compiler (writing optimizer friendly code)<br>
- Heterogeneous systems and high-level languages (OpenCL, OpenMP, Halide)<br>
<br>
Looking further we also found that there aren't many courses that cover<br>
these topics (while we think that they should be interest to the<br>
companies hiring our students).<br>
<br>
During this BoF, I plan to introduce the topics which we now cover in<br>
our course and the assignments that we give to our students to go with that.<br>
<br>
My long term goal is to make most of the materials for this course<br>
available to interested parties. One idea was to transform this into<br>
some kind of MOOC structure when after we get the lectures tested on our<br>
own students (currently there are some 70 students attending this<br>
course). We've already automated much of the testing and grading for<br>
the exercises (though improvement is still possibly there).<br>
<br>
So, my questions to you:<br>
- Would you be interested in attending this session?<br>
- For industry people:<br>
* what kind of skills would you like your future (or current)<br>
employees to have?<br>
* do you have any educational materials you would be willing to share?<br>
- For other educators: what kind of topics do you cover in your lectures?<br>
* would you be interested in presenting something about your approach?<br>
- And in general: are there any other things you think that should be<br>
discussed?<br>
<br>
Ok, that's it for now. I've already heard from a few people that they<br>
would be interested but I'd love to get some more input!</blockquote><div><br></div><div>This is very great idea to make student understand and experiment with LLVM and related technology. It would be great if this is converted in to a MOOC and hosted on some web platform so that people like me ( remote location ) can access those materials and attempt assignments.</div><div><br></div><div>Sincerely,</div><div>Vivek</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Best regards,<br>
Roel Jordans<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 01 Mar 2016 17:01:37 +0000<br>
From: Chandler Carruth via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
To: llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>>, NAKAMURA Takumi<br>
<<a href="mailto:geek4civic@gmail.com">geek4civic@gmail.com</a>>, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>>, Michael<br>
Spencer <<a href="mailto:Michael_Spencer@playstation.sony.com">Michael_Spencer@playstation.sony.com</a>><br>
Subject: [llvm-dev] Problem with mingw32 DLL build<br>
Message-ID:<br>
<CAGCO0Kj+rp8QcKh8sSXwYgP5-ZKnQEasEQyghu=<a href="mailto:h94K_tQq74A@mail.gmail.com">h94K_tQq74A@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Folks, there is an issue pretty buried in the commits list that I suspect<br>
should have wider visibility.<br>
<br>
See r262188 and subsequent discussion. To summarize: it appears that<br>
mingw32 was unable to correctly produce a static data member when<br>
instantiated as a base class. The "fix" is to then explicitly instantiate<br>
the base class separately from its use in a base class.<br>
<br>
I think this is unacceptable in this case because these base classes are<br>
intended to be the primary way that users of LLVM will define new analysis<br>
passes. That means we'll actually have to teach LLVM library users about<br>
this pattern, not just the LLVM developers. =/<br>
<br>
So my questions are:<br>
<br>
1) Is there some more elegant way to fix this that doesn't require every<br>
derived class to write an explicit instantiation definition of their base<br>
class? If so, then the rest of my questions are moot.<br>
<br>
2) If not, is this a problem with a native Windows 32-bit DLL build?<br>
<br>
3) If this is a problem with the native Windows 32-bit DLL build, should we<br>
back out of using this pattern of CRTP injection of the static data member<br>
and just deal with the significant (and error prone) boiler plate? It seems<br>
less error prone than the alternative.<br>
<br>
4) If this is not a problem with the native Windows 32-bit DLL, then I<br>
wonder how valuable it is to continue to support the conjunction of mingw32<br>
and a DLL build? This seems to be a really high cost to carry.<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.llvm.org/pipermail/llvm-dev/attachments/20160301/6a5e4c0d/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/llvm-dev/attachments/20160301/6a5e4c0d/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Tue, 1 Mar 2016 22:56:46 +0530<br>
From: vivek pandya via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
To: Tim Northover <<a href="mailto:t.p.northover@gmail.com">t.p.northover@gmail.com</a>><br>
Cc: llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
Subject: Re: [llvm-dev] [GSoC 2016] Code Generation Improvements task<br>
Message-ID:<br>
<CAHYgpoL9d5mpmcd2sOfHdmKeqJKTzbdxaP3dFdUuCYSXO5x=<a href="mailto:yQ@mail.gmail.com">yQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
*Vivek Pandya*<br>
<br>
<br>
On Tue, Mar 1, 2016 at 10:23 AM, Tim Northover <<a href="mailto:t.p.northover@gmail.com">t.p.northover@gmail.com</a>><br>
wrote:<br>
<br>
> Hi Vivek,<br>
><br>
> (Mostly responding with AArch64 hints, though anything I happen to<br>
> know from elsewhere too).<br>
><br>
> On 29 February 2016 at 13:00, vivek pandya via llvm-dev<br>
> <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
> > 2. lib/Target/AArch64/AArch64AddressTypePromotion.cpp<br>
> > As far as I understand this pass promotes sign exertion for 32 bit<br>
> integer (<br>
> > address) and performs calculation on 64 bit number thus processes need<br>
> not<br>
> > switch execution mode to 32 bit.<br>
><br>
> Switching execution mode isn't an option on AArch64 (it can only<br>
> happen with OS support and never happens within a single process on a<br>
> sane OS).<br>
><br>
> This pass is more a matter of putting the IR in a form that precisely<br>
> matches the addressing modes that are actually available. AArch64 can<br>
> encode addresses like "base64 + sext(offset32)" into the actual<br>
> load/store instruction so it's advantageous to put the sext as close<br>
> as possible to the pointer dereference.<br>
><br>
> I'm afraid I don't really know enough about other architectures to say<br>
> which could benefit. It's obviously only beneficial if they have the<br>
> addressing modes to support it.<br>
><br>
> > 3. lib/Target/AArch64/AArch64PromoteConstant.cpp<br>
> > This pass tries to simplify aggregate data like struct of const with<br>
> special<br>
> > SIMD instructions available on the system. For example on ARM its NEON<br>
> > similarly other architectures have SIMD support specifically MIPS, IBM<br>
> > System Z, Power PC with MMX/AltiVee and x86 with Intel’s AVX.<br>
><br>
> Possibly. It seems to rely pretty strongly on ARM's "load more than<br>
> you can actually use" instructions: vldN instructions can load up to 4<br>
> 128-bit vectors, but they can still only be used as 128-bit vectors.<br>
> If other targets possess similar, then they could well benefit; if<br>
> not, then it's probably pointless.<br>
><br>
> > I have question regarding Target hooks. Does it means using TargetInfo an<br>
> > SubTargetInfo class and at runtime decide architecture type and based on<br>
> > that perform optimization ( i.e use target specific instructions ) ?<br>
><br>
> I think they more normally live in TargetTransformInfo.<br>
><br>
> > Please help me ! Am I going in right direction ? Suggest some code ,<br>
> > document to look for further ideas. Also if any one like to mentor me for<br>
> > this project.<br>
><br>
> It sounds like a plausible direction, but documentation is always<br>
> lacking in these kinds of things.<br>
><br>
> As a complete outsider to targets with delay slots, merging their<br>
> logic sounds like a nice improvement to me (especially as Lanai is<br>
> probably incoming as another ISA that has decided delay slots are a<br>
> good idea). But (also as an outsider) I have no idea how practical<br>
> that really is.<br>
><br>
<br>
Thanks Tim for providing more insights, I would gather more information in<br>
given direction. Further more here mentioned 3 tasks may be not a much work<br>
for some one who has a good grasp on llvm but for me it may be sufficient<br>
for GSoC duration. It may not be possible for Google to provide fundings<br>
for limited number of improvements. So I am thinking to include some TODOs<br>
in StackColoring.cpp and StackSlotColoring.cpp in proposal too. Will it be<br>
enough to demonstrate in proposal ?<br>
<br>
Still I am looking for feedback on RDF part and also if some one is willing<br>
to mentor me.<br>
<br>
Sincerely,<br>
Vivek<br>
<br>
<br>
> Cheers.<br>
><br>
> Tim.<br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.llvm.org/pipermail/llvm-dev/attachments/20160301/d19affb2/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/llvm-dev/attachments/20160301/d19affb2/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Tue, 01 Mar 2016 09:30:21 -0800<br>
From: Mehdi Amini via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
To: Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>><br>
Cc: llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
Subject: Re: [llvm-dev] RFC: Add bitcode tests to test-suite<br>
Message-ID: <<a href="mailto:B2CA9359-1C2C-441D-92EF-E3ABBEF4522C@apple.com">B2CA9359-1C2C-441D-92EF-E3ABBEF4522C@apple.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
<br>
> On Mar 1, 2016, at 7:32 AM, Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:<br>
><br>
><br>
> From: "Mehdi Amini" <<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a>><br>
> To: "Hal Finkel" <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>><br>
> Cc: "llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>>, "Alina Sbirlea" <<a href="mailto:alina.sbirlea@gmail.com">alina.sbirlea@gmail.com</a>><br>
> Sent: Tuesday, March 1, 2016 1:16:11 AM<br>
> Subject: Re: [llvm-dev] RFC: Add bitcode tests to test-suite<br>
><br>
><br>
> On Feb 29, 2016, at 10:50 PM, Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a> <mailto:<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>>> wrote:<br>
><br>
><br>
><br>
> From: "Mehdi Amini via llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a> <mailto:<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>>><br>
> To: "Alina Sbirlea" <<a href="mailto:alina.sbirlea@gmail.com">alina.sbirlea@gmail.com</a> <mailto:<a href="mailto:alina.sbirlea@gmail.com">alina.sbirlea@gmail.com</a>>><br>
> Cc: "llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a> <mailto:<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>>><br>
> Sent: Monday, February 29, 2016 7:06:51 PM<br>
> Subject: Re: [llvm-dev] RFC: Add bitcode tests to test-suite<br>
><br>
><br>
><br>
> Sent from my iPhone<br>
><br>
> On Feb 29, 2016, at 3:39 PM, Alina Sbirlea <<a href="mailto:alina.sbirlea@gmail.com">alina.sbirlea@gmail.com</a> <mailto:<a href="mailto:alina.sbirlea@gmail.com">alina.sbirlea@gmail.com</a>>> wrote:<br>
><br>
><br>
><br>
> On Mon, Feb 29, 2016 at 2:06 PM, Mehdi Amini <<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a> <mailto:<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a>>> wrote:<br>
><br>
> On Feb 29, 2016, at 1:50 PM, Alina Sbirlea <<a href="mailto:alina.sbirlea@gmail.com">alina.sbirlea@gmail.com</a> <mailto:<a href="mailto:alina.sbirlea@gmail.com">alina.sbirlea@gmail.com</a>>> wrote:<br>
><br>
><br>
><br>
> On Mon, Feb 29, 2016 at 12:18 PM, Mehdi Amini <<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a> <mailto:<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a>>> wrote:<br>
><br>
> On Feb 29, 2016, at 11:40 AM, Mehdi Amini via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a> <mailto:<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>>> wrote:<br>
><br>
><br>
> On Feb 29, 2016, at 11:16 AM, Alina Sbirlea via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a> <mailto:<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>>> wrote:<br>
><br>
> All,<br>
><br>
> To get the discussion going in a focused manner, here is an initial patch with a running test. The test is from the Halide suite and is checking the correctness of several simd operations.<br>
> (Notes: the patch is large due to the number of operations being tested;<br>
> I expect a lot of changes before actually landing it, this is simply to continue the discussion using a concrete example.)<br>
> <a href="http://reviews.llvm.org/D17726" rel="noreferrer" target="_blank">http://reviews.llvm.org/D17726</a> <<a href="http://reviews.llvm.org/D17726" rel="noreferrer" target="_blank">http://reviews.llvm.org/D17726</a>><br>
><br>
> I can't figure how to download the patch *with the bitcode files* from Phabricator. Can you push this on github (or somewhere else)? (or if I missed how to proceed...).<br>
><br>
> I was able to figure how get them "one by one", it would still be more convenient to have an archive or a repo to clone somewhere.<br>
><br>
> A few questions/todos to start the discussion:<br>
> 1. What is a good location for these tests? They are in a separate Bitcode directory atm, but using the llvm_multisource. This may change to more closely model the approach for external tests (see next item).<br>
><br>
> A good location would be their own external repository IMO :)<br>
><br>
> 2. There is a single .cpp file testing all operations provided by individual bitcode files. I expect this to change. Instead of using llvm_multisource to have the same test run with specific arguments, each run testing a single operation.<br>
> 3. The building approach I took is to first link all bitcode files into a single one, then obtain the assembly for it, which cmake knows to take as an input source.<br>
><br>
> Yeah, so I'd rather have a split-build model, with a split execution model. Having a gigantic bitcode file to debug an issue is not friendly.<br>
> I'd expect to have a .cpp file that contains the main and the logic to run test, and then every test that is linked-in to be executed, a bit like gtests is doing (there are multiple registering mechanisms that would avoid to declare explicitly a test in the header).<br>
> -> filters.h and filter_headers.h should just go away.<br>
><br>
> I agree, this is related to point 2. The plan here is to update the current test .cpp file to test each operation individually. In this model it will be enough to link with a single bitcode file per test.<br>
><br>
><br>
> Also on the test in general: we should have an idea for each test what it is doing and how.<br>
> I was expecting your tests to be on the pattern of having an implementation in C++ and an implementation in Halide bitcode of a filters (or whatever) and run both on random data and verifies that the result is matching.<br>
> Unfortunately from what I can see you are feeding the tests with random data, and the tests are "blackboxes" that set an error flag if they detect an error.<br>
> This is not super robust: the compiler can mess with the error checking and eliminate it for instance, making any error undetected.<br>
><br>
> The Halide bitcode filters compare the result of vectorized operations vs scalar runs of the same code. The error code against which we compare the output will be set to loose tolerance - it is currently 0. We're interested in codegen bugs that return the wrong value entirely, not accuracy differences (especially for floating point tests).<br>
> With the new error threshold, the data fed into may be random or read from provided input files, I can do either.<br>
> The filters will still look somewhat like blackboxes, though the name of the filter says what operation it's being tested and the disassembled bitcode files are reasonably readable.<br>
> Using your suggestion, the driver .cpp file will test one operation at a time (argvs set accordingly) and return right away once an error is found. Sound about right?<br>
><br>
> All of this is great.<br>
> The part that is not clear to me is why isn't it to have (what does it buy us over, or why is it better for us compared to) a possible a C/C++ reference implementation of the filter, and hoisting (and refactor) all the logic to feed the tests and validate the output *out* of the filters. A filter would be just the mathematical function performed and nothing more (separation of concerns, more robust framework, easier debugging when things-go-wrong, etc.).<br>
><br>
> I believe the answer is that Halide generates vectorized code in a way that is not generated by llvm when starting from C/C++.<br>
><br>
> I don't really see how *this* addresses my point. This is justifying why your bitcode is interesting and why we are having this conversation at all :)<br>
> It does not say why we can't have a scalar naive C/C++ impl along with the bitcode for filter.<br>
><br>
><br>
> Having a C/C++ scalar reference would involve quite a bit of effort for all tests. The primary reason Halide is being used is that you don't need to write a lot of C/C++ code to get different optimizations for the same code (e.g. vectorized vs scalar is a one line difference).<br>
><br>
> Yes, this is what is nice with Halide: "write once, codegen multiple variant". But it does not mean you can't write a c++ reference for every Halide filter (not for every codegen variant of a filter!)<br>
><br>
> It's been 2 years since my last experiments with Halide, but my memories were that there was a C backend?<br>
> I had in mind for each test to have (possibly in a separate directory for each test):<br>
> - the halide source for the filter.<br>
> - the c/c++ (maybe generated?) for the filter.<br>
> - the bitcode generated for the filter (potentially multiple variant depending on the CPU support and/or the schedule).<br>
><br>
> Then some common code/infrastructure to interact with the individual filters, loading them, executing the variants for a filter, and checking results.<br>
><br>
> If the reference c/c++ can't be generated by halide (or obtained somehow), and we can't do better than the current tests infrastructure you have, then I'm worried about the cost/benefit for this test-suite.<br>
><br>
><br>
> I think that a C/C++ version would be nice to have, but not necessary.<br>
> IR generated by non-Clang frontends and/or IR going through alternate optimization pipelines tend to hit bugs that are much harder to hit with Clang alone.<br>
><br>
> To make it clear: the point of the C++ reference I was asking for is *not to stress clang* at all. It is intended to compute the *golden result* to be compared to the runs of each variant for a filter. Having a reference is important when a diff is detected in the output and you need to figure out what is going on.<br>
><br>
><br>
> It would help to have a description of what each test does, but including, for example, the Halide source code for each test will hopefully be enough of a guide.<br>
><br>
> So we can get really fast test coverage for possible codegen bugs by comparing that different layout optimizations in Halide give the same result.<br>
> I think having each filter tested separately should give a good separation of concerns and easy debugging for each particular test.<br>
><br>
> This is great for halide validation, we are all agreeing with this I think. The question is where is the tradeoff for the LLVM project. I'm trying to make sure that the extra coverage doesn't come with a burden to debug and triage issues when something will break: i.e. the tests need to be very friendly to interact with.<br>
><br>
> I don't think that any non-trivial tests are truly "friendly" to interact with.<br>
><br>
> Yeah, I just think we shouldn't make it arbitrarily worse by not having a good infrastructure to begin with :)<br>
><br>
> In the end, if we expect this suite to be accepted and maintained as a "first-class citizen" by LLVM developers (i.e. accepting things like reverting a commit if it breaks something in this suite), we'd better make sure the burden to interact with it is minimal.<br>
><br>
><br>
> Tracking down self-hosting bugs is not friendly, and those aren't anywhere near the worst ;) --<br>
> These tests with their simple driver seem like good input that bugpoint can reduce (assuming the tests runtimes are not too long), and that's friendlier than most of the other multisource tests.<br>
><br>
> If we're talking exclusively about crashes, I agree. However if we're considering correctness issue as well (miscompiles), I believe that the structural changes I proposed are very important to easily perform bugpoint on them for instance (or bugpoint would just turn the test into "return false;").<br>
> On this point, this is not exactly how bugpoint works for miscompiles. Instead, it tries to split the miscompiled regions into a separate module from the correctly-compiled regions (by moving functions, extracting loops, etc.), and it tries to reduce the pass list to only that causing the miscompile. Having the "reference" IR and the "optimized" IR in separate functions will certainly make this easier.<br>
><br>
> Also I believe these changes are necessary to perform timing measurement for these tests, if we are interested in the quality of the optimization/codegen (to be hooked into something like <a href="https://github.com/google/benchmark" rel="noreferrer" target="_blank">https://github.com/google/benchmark</a> <<a href="https://github.com/google/benchmark" rel="noreferrer" target="_blank">https://github.com/google/benchmark</a>> ?).<br>
> This is a good point, although perhaps not something we need to solve right now.<br>
><br>
> We already do a bad jobs here (we have benchmarks with multiple kernels, and we don't capture separate timings for each kernel, but only the overall timing for the executable). In the long run, it will be better to be able to get separate timing information for each of the "optimized" and "reference" kernels, and a direction that allows this seems better (by either being able to print separate timings -- not something we can do now -- or having separate executables). A direction that will allow this, or allows this in the future, is preferable. That having been said, if this is not practical currently, we can work towards improving this as follow-up.<br>
<br>
I agree.<br>
My impression was that it won't be a large scale effort to it right now, thanks to the way these tests are generated with Halide. Changing the generator (a single function I think): <a href="https://github.com/halide/Halide/blob/master/test/correctness/simd_op_check.cpp#L94" rel="noreferrer" target="_blank">https://github.com/halide/Halide/blob/master/test/correctness/simd_op_check.cpp#L94</a> <<a href="https://github.com/halide/Halide/blob/master/test/correctness/simd_op_check.cpp#L94" rel="noreferrer" target="_blank">https://github.com/halide/Halide/blob/master/test/correctness/simd_op_check.cpp#L94</a>> would make immediately the 349 bitcode files submitted fit the pattern.<br>
<br>
--<br>
Mehdi<br>
<br>
<br>
<br>
<br>
<br>
><br>
> Thanks again,<br>
> Hal<br>
><br>
> Best,<br>
><br>
> --<br>
> Mehdi<br>
><br>
><br>
><br>
><br>
> -Hal<br>
><br>
> This is the motivation for my comments so far.<br>
> Other people in the community may have a different opinion/appreciation of the situation, this just represents my current thoughts.<br>
><br>
> Hope it makes sense.<br>
><br>
> --<br>
> Mehdi<br>
><br>
><br>
><br>
><br>
><br>
> Also, just looking quickly at one IR I'm surprised by things like:<br>
><br>
> "assert succeeded165": ; preds = %"assert succeeded146"<br>
> %buf_host181 = getelementptr inbounds %struct.buffer_t, %struct.buffer_t* %error_op_pcmpeqq_272.buffer, i64 0, i32 1<br>
> %23 = bitcast i8** %buf_host181 to double**<br>
> %error_op_pcmpeqq_272.host226227232 = load double*, double** %23, align 8<br>
> %24 = icmp eq %struct.buffer_t* %error_op_pcmpeqq_272.buffer, null<br>
> br i1 %24, label %"assert failed183", label %"assert succeeded184", !prof !4<br>
><br>
> Here you have as check for nullptr at %24, but you already loaded %error_op_pcmpeqq_272.host226227232 from this pointer just before!<br>
><br>
> It's checking that the host value loaded from buffer_t is not null. I don't see what's wrong with this. What am I missing?<br>
><br>
> I may be misreading it, my impression when skimming through the code was that it seems equivalent to:<br>
><br>
> foo(buffer_t *out) {<br>
> auto value = out->host;<br>
> if (!out) {<br>
> error("nullptr");<br>
> }<br>
> }<br>
><br>
><br>
> In case I haven't been clear: I think this work is valuable for the project, and thank you for putting some effort into it :)<br>
><br>
> --<br>
> Mehdi<br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> A separate discussion is on reading metadata (mcpu and mattr) in llc. I added a script to work around that for now.<br>
><br>
> The generic way of doing it in llvm is (I think) to use function attributes:<br>
><br>
> attributes #0 = { "target-cpu"="x86-64" "target-features"="+avx2" }<br>
><br>
> You shouldn't need it on the command line I think?<br>
><br>
> Yes, I believe so too. Currently these are set in mcpu and mattr by Halide and not read in by llc, hence the need for feeding them as parameters. It's a separate issue that we'll need to go into in depth, but I don't want it to interfere with getting feedback on how to best publish these tests.<br>
><br>
><br>
> --<br>
> Mehdi<br>
><br>
><br>
><br>
><br>
> Looking forward to your feedback!<br>
><br>
> Thanks,<br>
> Alina<br>
><br>
><br>
><br>
> On Fri, Feb 19, 2016 at 6:50 AM, Kristof Beyls <<a href="mailto:kristof.beyls@arm.com">kristof.beyls@arm.com</a> <mailto:<a href="mailto:kristof.beyls@arm.com">kristof.beyls@arm.com</a>>> wrote:<br>
><br>
><br>
> On 18/02/2016 19:12, Alina Sbirlea via llvm-dev wrote:<br>
><br>
><br>
> I have more questions for Alina. What kind of tests do you have:<br>
><br>
> - "the compiler takes the bitcode and generates code without crashing"<br>
> - "the compiled test runs without crashing"<br>
> - "the compiled test will produce an output that be checked against a reference"<br>
> - "the compiled test is meaningful as a benchmarks"<br>
><br>
> We have all 4 kinds of tests in Halide. The bitcode files for the first category is already available and I'm working on building the ones for the next 3. We'd like to include all incrementally.<br>
><br>
><br>
> It seems to me that the first category ("the compiler takes the bitcode and generates code without crashing") are tests that should be added to the "make check-all" tests in the LLVM subproject, rather than the test-suite subproject?<br>
> Or if these tests currently don't crash the compiler anymore, the bugs must have been fixed, and there should already be equivalent tests?<br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a> <mailto:<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a> <<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>><br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a> <mailto:<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a> <<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a> <mailto:<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
><br>
><br>
><br>
> --<br>
> Hal Finkel<br>
> Assistant Computational Scientist<br>
> Leadership Computing Facility<br>
> Argonne National Laboratory<br>
><br>
><br>
><br>
><br>
> --<br>
> Hal Finkel<br>
> Assistant Computational Scientist<br>
> Leadership Computing Facility<br>
> Argonne National Laboratory<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.llvm.org/pipermail/llvm-dev/attachments/20160301/f8373682/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/llvm-dev/attachments/20160301/f8373682/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Tue, 1 Mar 2016 09:39:21 -0800<br>
From: Alexey Samsonov via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
To: Peter Teoh <<a href="mailto:htmldeveloper@gmail.com">htmldeveloper@gmail.com</a>><br>
Cc: llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
Subject: Re: [llvm-dev] Compiler-RT cmake building<br>
Message-ID:<br>
<CAFBZoY_9s4=<a href="mailto:fjv46aTxv%2BcEWG8Muwowo%2B-WKt7nrswFmUqcmcQ@mail.gmail.com">fjv46aTxv+cEWG8Muwowo+-WKt7nrswFmUqcmcQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Peter,<br>
<br>
On Tue, Mar 1, 2016 at 4:32 AM, Peter Teoh via llvm-dev <<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
<br>
> After issuing:<br>
><br>
> cmake -DLLVM_ENABLE_DOXYGEN=ON -DLLVM_ENABLE_WERROR=OFF<br>
> -DLLVM_TARGETS_TO_BUILD="X86" ../llvm<br>
><br>
> I got the following results.<br>
><br>
> Not sure what does the "failed" means?<br>
><br>
<br>
That's fine - it just means that your compiler doesn't support certain<br>
flags (most of them are MSVC-specific, so this is<br>
totally expected). You should still be able to build successfully.<br>
<br>
<br>
><br>
> -- Performing Test COMPILER_RT_HAS_W3_FLAG<br>
> -- Performing Test COMPILER_RT_HAS_W3_FLAG - Failed<br>
> -- Performing Test COMPILER_RT_HAS_WX_FLAG<br>
> -- Performing Test COMPILER_RT_HAS_WX_FLAG - Failed<br>
> -- Performing Test COMPILER_RT_HAS_WD4146_FLAG<br>
> -- Performing Test COMPILER_RT_HAS_WD4146_FLAG - Failed<br>
> -- Performing Test COMPILER_RT_HAS_WD4291_FLAG<br>
> -- Performing Test COMPILER_RT_HAS_WD4291_FLAG - Failed<br>
> -- Performing Test COMPILER_RT_HAS_WD4391_FLAG<br>
> -- Performing Test COMPILER_RT_HAS_WD4391_FLAG - Failed<br>
> -- Performing Test COMPILER_RT_HAS_WD4722_FLAG<br>
> -- Performing Test COMPILER_RT_HAS_WD4722_FLAG - Failed<br>
> -- Performing Test COMPILER_RT_HAS_WD4800_FLAG<br>
> -- Performing Test COMPILER_RT_HAS_WD4800_FLAG - Failed<br>
> -- Looking for __func__<br>
> -- Looking for __func__ - found<br>
> -- Looking for fopen in c<br>
> -- Looking for fopen in c - found<br>
> -- Looking for dlopen in dl<br>
> -- Looking for dlopen in dl - found<br>
> -- Looking for shm_open in rt<br>
> -- Looking for shm_open in rt - found<br>
> -- Looking for pow in m<br>
> -- Looking for pow in m - found<br>
> -- Looking for pthread_create in pthread<br>
> -- Looking for pthread_create in pthread - found<br>
> -- Looking for __cxa_throw in stdc++<br>
> -- Looking for __cxa_throw in stdc++ - found<br>
> -- Looking for __i686__<br>
> -- Looking for __i686__ - not found<br>
> -- Looking for __i386__<br>
> -- Looking for __i386__ - not found<br>
> -- Compiler-RT supported architectures: x86_64<br>
> -- Looking for rpc/xdr.h<br>
> -- Looking for rpc/xdr.h - found<br>
> -- Looking for tirpc/rpc/xdr.h<br>
> -- Looking for tirpc/rpc/xdr.h - found<br>
> -- Performing Test COMPILER_RT_TARGET_HAS_ATOMICS<br>
> -- Performing Test COMPILER_RT_TARGET_HAS_ATOMICS - Success<br>
> -- Clang version: 3.9.0<br>
> -- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG<br>
> -- Performing Test CXX_SUPPORTS_NO_NESTED_ANON_TYPES_FLAG - Failed<br>
> -- Configuring done<br>
> -- Generating done<br>
> -- Build files have been written to: /home/tthtlc/llvm/build1mar2016<br>
><br>
><br>
> --<br>
> Regards,<br>
> Peter Teoh<br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
><br>
><br>
--<br>
Alexey Samsonov<br>
<a href="mailto:vonosmas@gmail.com">vonosmas@gmail.com</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.llvm.org/pipermail/llvm-dev/attachments/20160301/63927b2e/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.llvm.org/pipermail/llvm-dev/attachments/20160301/63927b2e/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Tue, 1 Mar 2016 18:49:51 +0100<br>
From: Kai Nacke via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
To: Justin Bogner <<a href="mailto:mail@justinbogner.com">mail@justinbogner.com</a>>, Kai Nacke via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>><br>
Subject: Re: [llvm-dev] Compiling for AArch64: CommandLine Error:<br>
Option 'aarch64-branch-relax' registered more than once!<br>
Message-ID: <<a href="mailto:69a86847-9d2e-8dec-2b12-b118e4170471@redstar.de">69a86847-9d2e-8dec-2b12-b118e4170471@redstar.de</a>><br>
Content-Type: text/plain; charset=windows-1252; format=flowed<br>
<br>
On 27.02.2016 22:45, Justin Bogner wrote:<br>
> Kai Nacke via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> writes:<br>
>> Compiling for AArch64: CommandLine Error: Option<br>
>> 'aarch64-branch-relax' registered more than once!<br>
>><br>
>> Hi all!<br>
>><br>
>> I am trying to run LDC (LLVM-based D compiler) on AArch64. The<br>
>> compiler contains all IR and target specific passes. You can view it<br>
>> as combined llc/opt tool. It uses the same strategy as opt to collect<br>
>> the passes with the NameParser. Like llc, it calls<br>
>> Target.addPassesToEmitFile() to add the target specific passes.<br>
>><br>
>> I now get the following error message:<br>
>><br>
>> ldc2.exe: CommandLine Error: Option 'aarch64-branch-relax' registered<br>
>> more than once!<br>
>> LLVM ERROR: inconsistency in registered CommandLine options<br>
>><br>
>> Reason is that the option 'aarch64-branch-relax' is registered in file<br>
>> lib/Target/AArch64/AArch64BranchRelaxation.cpp and a second time<br>
>> through PassRegistry::registerPass() (because of the use of the<br>
>> NameParser - the pass is also named 'aarch64-branch-relax').<br>
><br>
> I wouldn't really recommend using the NameParser outside of a testing<br>
> tool. The "throw all of the pass names at cl::opt and see what sticks"<br>
> thing is pretty specialized to opt and makes for a pretty messy command<br>
> line interface for something that does anything other than just running<br>
> passes.<br>
><br>
> That said, the aarch64-branch-relax option in AArch64BranchRelaxation is<br>
> a bit silly: it's only useful for *disabling* the pass, despite the<br>
> name, and it isn't tested at all. I suspect it's just leftover from when<br>
> this pass was first being implemented and can be removed.<br>
><br>
> Tim: does it make sense to just remove this flag?<br>
<br>
Hi Justin!<br>
<br>
Thanks for the answer! I think I will remove this "feature" from ldc.<br>
Looks like asking for more trouble if I keep it...<br>
<br>
Regards,<br>
Kai<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
llvm-dev mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
<br>
------------------------------<br>
<br>
End of llvm-dev Digest, Vol 141, Issue 4<br>
****************************************<br>
</blockquote></div><br></div></div>