[LLVMdev] Compile programs with the LLVM Compiler as a gsoc project
Török Edwin
edwintorok at gmail.com
Sun Mar 30 10:26:28 PDT 2008
Chris Lattner wrote:
>
> On Mar 29, 2008, at 11:53 PM, Kumaripaba Miyurusara Atukorala wrote:
>
>> hi,
>> This e-mail is written to involve some of the project ideas in LLVM
>> in GSOC this year.
>> I was looking in to the ideas mentioned under improving current
>> system and found the idea of "Compile programs with the LLVM
>> Compiler" to be interesting. I would like to compile one of the large
>> code bases that have not yet been compiled with LLVM and convert the
>> build system to be compatible with the LLVM Programs testsuite.
>>
>>
>>
>> But I have several doubts to be clarified. They are listed below.
>>
>> * I would like to know whether this is a suitable project for GSOC?
>> * What software has already been compiled with LLVM and what are
>> not; so that I can identify the possible candidates for the
>> project?
>>
> I think this would be a great project. However, I would rephrase it
> to be more concrete.
>
> How about taking a linux distro like redhat or gentoo or whatever you
> are familiar of comfortable with, and try compiling the whole thing
> with llvm-gcc? As part of the GSoC project, you could file bug
> reports for any issues you hit and help track down problems.
>
Excellent idea!
When testing large code bases built with llvm, and trying to track down
where the problem is it would be very useful to have an automated tool
to help. Something similar to 'git bisect', or bugpoint but for many
source files.
For example: built entire code with gcc, get some "expected output" (run
make check, ....), same for llvm-gcc. If they differ, start tracking
down (automatically!) in which source files the problem is. Then you
build half code with llvm, half with gcc. If it breaks, you build 1/4
llvm, 3/4 gcc; if it doesn't break you build 3/4 llvm, 1/4 gcc, and so
on. The situation should be logged by a tool, because for example I
would certainly forget which build worked, and which one didn't.
It would make sense to cache files previously built, an easy way to do
that would be to build everything with one compiler, then backup&remove
one half, and built it with the other compiler (just run make with the
correct compiler, it will rebuild the missing files). Then restore the
half, remove a quarter, repeat.
If this tool could be a drop-in wrapper for CC/CXX, it would be
excellent, since nearly every autotooled package could be tested this way.
P.S.: to avoid duplicate bug reports, I think filing a "meta" bug that
holds as depedencies all bugs that affect package X would be useful.
Best regards,
--Edwin
More information about the llvm-dev
mailing list