1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <title>Open LLVM Projects</title>
6 <link rel="stylesheet" href="llvm.css" type="text/css">
10 <div class="doc_title">
15 <li><a href="#what">What is this?</a></li>
16 <li><a href="#improving">Improving the current system</a>
18 <li><a href="#code-cleanups">Implementing Code Cleanup bugs</a></li>
19 <li><a href="#glibc">Port glibc to LLVM</a></li>
20 <li><a href="#programs">Compile programs with the LLVM Compiler</a></li>
21 <li><a href="#llvm_ir">Extend the LLVM intermediate representation</a></li>
22 <li><a href="#misc_imp">Miscellaneous Improvements</a></li>
25 <li><a href="#new">Adding new capabilities to LLVM</a>
27 <li><a href="#newfeaturebugs">Implementing new feature PRs</a></li>
28 <li><a href="#pointeranalysis">Pointer and Alias Analysis</a></li>
29 <li><a href="#profileguided">Profile Guided Optimization</a></li>
30 <li><a href="#xforms">New Transformations and Analyses</a></li>
31 <li><a href="#x86be">X86 Back-end Improvements</a></li>
32 <li><a href="#misc_new">Miscellaneous Additions</a></li>
36 <div class="doc_author">
37 <p>Written by the <a href="http://llvm.cs.uiuc.edu/">LLVM Team</a></p>
41 <!-- *********************************************************************** -->
42 <div class="doc_section">
43 <a name="what">What is this?</a>
45 <!-- *********************************************************************** -->
47 <div class="doc_text">
49 <p>This document is meant to be a sort of "big TODO list" for LLVM. Each
50 project in this document is something that would be useful for LLVM to have, and
51 would also be a great way to get familiar with the system. Some of these
52 projects are small and self-contained, which may be implemented in a couple of
53 days, others are larger. Several of these projects may lead to interesting
54 research projects in their own right. In any case, we welcome all
57 <p>If you are thinking about tackling one of these projects, please send a mail
58 to the <a href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM
59 Developer's</a> mailing list, so that we know the project is being worked on.
60 Additionally this is a good way to get more information about a specific project
61 or to suggest other projects to add to this page.
64 <p>The projects in this page are open-ended. More specific projects are
65 filed as unassigned enhancements in the <a href="http://llvm.cs.uiuc.edu/bugs/">
66 LLVM bug tracker</a>. See the <a href="http://llvm.cs.uiuc.edu/bugs/buglist.cgi?keywords_type=allwords&keywords=&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_severity=enhancement&emailassigned_to1=1&emailtype1=substring&email1=unassigned">list of currently outstanding issues</a> if you wish to help improve LLVM.</p>
70 <!-- *********************************************************************** -->
71 <div class="doc_section">
72 <a name="improving">Improving the current system</a>
74 <!-- *********************************************************************** -->
76 <div class="doc_text">
78 <p>Improvements to the current infrastructure are always very welcome and tend
79 to be fairly straight-forward to implement. Here are some of the key areas that
80 can use improvement...</p>
84 <!-- ======================================================================= -->
85 <div class="doc_subsection">
86 <a name="code-cleanups">Implementing Code Cleanup bugs</a>
89 <div class="doc_text">
92 The <a href="http://llvm.cs.uiuc.edu/bugs/">LLVM bug tracker</a> occasionally
93 has <a href="http://llvm.cs.uiuc.edu/bugs/buglist.cgi?short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=code-cleanup&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Bug+Number&field0-0-0=noop&type0-0-0=noop&value0-0-0=">"code-cleanup" bugs</a> filed in it. Taking one of these and fixing it is a good
94 way to get your feet wet in the LLVM code and discover how some of its components
100 <!-- ======================================================================= -->
101 <div class="doc_subsection">
102 <a name="glibc">Port glibc to LLVM</a>
105 <div class="doc_text">
107 <p>It would be very useful to <a
108 href="http://www.gnu.org/software/libc/manual/html_node/Porting.html">port</a> <a
109 href="http://www.gnu.org/software/libc/">glibc</a> to LLVM. This would allow a
110 variety of interprocedural algorithms to be much more effective in the face of
111 library calls. The most important pieces to port are things like the string
112 library and the <tt>stdio</tt> related functions... low-level system calls like
113 '<tt>read</tt>' should stay unimplemented in LLVM.</p>
117 <!-- ======================================================================= -->
118 <div class="doc_subsection">
119 <a name="programs">Compile programs with the LLVM Compiler</a>
122 <div class="doc_text">
124 <p>We are always looking for new testcases and benchmarks for use with LLVM. In
125 particular, it is useful to try compiling your favorite C source code with LLVM.
126 If it doesn't compile, try to figure out why or report it to the <a
127 href="http://mail.cs.uiuc.edu/pipermail/llvmbugs/">llvm-bugs</a> list. If you
128 get the program to compile, it would be extremely useful to convert the build
129 system to be compatible with the LLVM Programs testsuite so that we can check it
130 into CVS and the automated tester can use it to track progress of the
133 <p>When testing a code, try running it with a variety of optimizations, and with
134 all the back-ends: CBE, llc, and lli.</p>
138 <!-- ======================================================================= -->
139 <div class="doc_subsection">
140 <a name="llvm_ir">Extend the LLVM intermediate representation</a>
143 <div class="doc_text">
146 <li>Add support for platform-independent prefetch support. The GCC <a
147 href="http://gcc.gnu.org/projects/prefetch.html">prefetch project</a> page
148 has a good survey of the prefetching capabilities of a variety of modern
155 <!-- ======================================================================= -->
156 <div class="doc_subsection">
157 <a name="misc_imp">Miscellaneous Improvements</a>
160 <div class="doc_text">
163 <li>Someone needs to look into getting the <tt>ranlib</tt> tool to index LLVM
164 bytecode files, so that linking in .a files is not hideously slow. They
165 would also then have to implement the reader for this index in
168 <li>Rework the PassManager to be more flexible</li>
170 <li>Some transformations and analyses only work on reducible flow graphs. It
171 would be nice to have a transformation which could be "required" by these passes
172 which makes irreducible graphs reducible. This can easily be accomplished
173 through code duplication. See <a
174 href="http://citeseer.nj.nec.com/janssen97making.html">Making Graphs Reducible
175 with Controlled Node Splitting</a> and perhaps <a
176 href="http://doi.acm.org/10.1145/262004.262005">Nesting of Reducible and
177 Irreducible Loops</a>.</li>
183 <!-- *********************************************************************** -->
184 <div class="doc_section">
185 <a name="new">Adding new capabilities to LLVM</a>
187 <!-- *********************************************************************** -->
189 <div class="doc_text">
191 <p>Sometimes creating new things is more fun than improving existing things.
192 These projects tend to be more involved and perhaps require more work, but can
193 also be very rewarding.</p>
198 <!-- ======================================================================= -->
199 <div class="doc_subsection">
200 <a name="newfeaturebugs">Implementing new feature PRs</a>
203 <div class="doc_text">
205 <p>Many ideas for feature requests are stored in LLVM bugzilla. Just <a href="http://llvm.org/bugs/buglist.cgi?short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=new-feature&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&namedcmd=All+PRs&newqueryname=&order=Bug+Number&field0-0-0=noop&type0-0-0=noop&value0-0-0=">search for bugs with a "new-feature" keyword</a>.</p>
209 <!-- ======================================================================= -->
210 <div class="doc_subsection">
211 <a name="pointeranalysis">Pointer and Alias Analysis</a>
214 <div class="doc_text">
216 <p>We have a <a href="AliasAnalysis.html">strong base for development</a> of
217 both pointer analysis based optimizations as well as pointer analyses
218 themselves. It seems natural to want to take advantage of this...</p>
221 <li>Implement a flow-sensitive context-sensitive alias analysis algorithm<br>
222 - Pick one of the somewhat efficient algorithms, but strive for maximum
225 <li>Implement a flow-sensitive context-insensitive alias analysis algorithm<br>
226 - Just an efficient local algorithm perhaps?</li>
228 <li>Implement alias-analysis-based optimizations:
230 <li>Dead store elimination</li>
237 <!-- ======================================================================= -->
238 <div class="doc_subsection">
239 <a name="profileguided">Profile Guided Optimization</a>
242 <div class="doc_text">
244 <p>We now have a unified infrastructure for writing profile-guided
245 transformations, which will work either at offline-compile-time or in the JIT,
246 but we don't have many transformations. We would welcome new profile-guided
247 transformations as well as improvements to the current profiling system.
250 <p>Ideas for profile guided transformations:</p>
253 <li>Superblock formation (with many optimizations)</li>
254 <li>Loop unrolling/peeling</li>
255 <li>Profile directed inlining</li>
260 <p>Improvements to the existing support:</p>
263 <li>The current block and edge profiling code that gets inserted is very simple
264 and inefficient. Through the use of control-dependence information, many fewer
265 counters could be inserted into the code. Also, if the execution count of a
266 loop is known to be a compile-time or runtime constant, all of the counters in
267 the loop could be avoided.</li>
269 <li>You could implement one of the "static profiling" algorithms which analyze a
270 piece of code an make educated guesses about the relative execution frequencies
271 of various parts of the code.</li>
273 <li>You could add path profiling support, or adapt the existing LLVM path
274 profiling code to work with the generic profiling interfaces.</li>
279 <!-- ======================================================================= -->
280 <div class="doc_subsection">
281 <a name="xforms">New Transformations and Analyses</a>
284 <div class="doc_text">
287 <li>Implement a Dependence Analysis Infrastructure<br>
288 - Design some way to represent and query dep analysis</li>
289 <li>Implement a strength reduction pass</li>
290 <li>Value range propagation pass</li>
295 <!-- ======================================================================= -->
296 <div class="doc_section">
297 <a name="x86be">X86 Back-end Improvements</a>
300 <div class="doc_text">
303 <li>Implement a better instruction selector</li>
304 <li>Implement support for the "switch" instruction without requiring the
305 lower-switches pass.</li>
306 <li>Implement interprocedural register allocation. The CallGraphSCCPass can be
307 used to implement a bottom-up analysis that will determine the *actual*
308 registers clobbered by a function. Use the pass to fine tune register usage
309 in callers based on *actual* registers used by the callee.</li>
314 <!-- ======================================================================= -->
315 <div class="doc_section">
316 <a name="misc_new">Miscellaneous Additions</a>
319 <div class="doc_text">
322 <li>Port the <a href="http://www-sop.inria.fr/mimosa/fp/Bigloo/">Bigloo</A>
323 Scheme compiler, from Manuel Serrano at INRIA Sophia-Antipolis, to
324 output LLVM bytecode. It seems that it can already output .NET
325 bytecode, JVM bytecode, and C, so LLVM would ostensibly be another good
327 <li>Write a new frontend for C/C++ <b>in</b> C++, giving us the ability to
328 directly use LLVM C++ classes from within a compiler rather than use
329 C-based wrapper functions a la llvm-gcc. One possible starting point is the <a
330 href="http://www.parashift.com/c++-faq-lite/compiler-dependencies.html#faq-37.11">C++
331 yacc grammar by Ed Willink</a>.</li>
332 <li>Write a new frontend for some other language (Java? OCaml? Forth?)</li>
333 <li>Write a new backend for a target (IA64? MIPS? MMIX?)</li>
334 <li>Write a disassembler for machine code that would use TableGen to output
335 <tt>MachineInstr</tt>s for transformations, optimizations, etc.</li>
336 <li>Random test vector generator: Use a C grammar to generate random C code;
337 run it through llvm-gcc, then run a random set of passes on it using opt.
338 Try to crash opt. When opt crashes, use bugpoint to reduce the test case and
339 mail the result to yourself. Repeat ad infinitum.</li>
340 <li>Design a simple, recognizable logo.</li>
345 <!-- *********************************************************************** -->
349 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
350 src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
351 <a href="http://validator.w3.org/check/referer"><img
352 src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
354 <a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
355 <a href="http://llvm.cs.uiuc.edu">LLVM Compiler Infrastructure</a><br>
356 Last modified: $Date$