blob: 4b68694c92be89f19d45ada59fb31dbf21007439 [file] [log] [blame]
Misha Brukman076438b2003-11-14 17:34:38 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3<html>
4<head>
5 <title>Open LLVM Projects</title>
6 <link rel="stylesheet" href="llvm.css" type="text/css">
7</head>
8<body>
Chris Lattnerb7131092003-02-06 19:39:21 +00009
Misha Brukman076438b2003-11-14 17:34:38 +000010<div class="doc_title">
11 Open LLVM Projects
12</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000013
14<ul>
Misha Brukman076438b2003-11-14 17:34:38 +000015 <li><a href="#what">What is this?</a></li>
Chris Lattnerb7131092003-02-06 19:39:21 +000016 <li><a href="#improving">Improving the current system</a>
17 <ol>
Chris Lattner7e0281f2004-05-28 20:41:37 +000018 <li><a href="#code-cleanups">Implementing Code Cleanup bugs</a></li>
Misha Brukman076438b2003-11-14 17:34:38 +000019 <li><a href="#glibc">Port glibc to LLVM</a></li>
Misha Brukman076438b2003-11-14 17:34:38 +000020 <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>
23 </ol></li>
Chris Lattnerb7131092003-02-06 19:39:21 +000024
25 <li><a href="#new">Adding new capabilities to LLVM</a>
26 <ol>
Chris Lattner7e0281f2004-05-28 20:41:37 +000027 <li><a href="#newfeaturebugs">Implementing new feature PRs</a></li>
Misha Brukman076438b2003-11-14 17:34:38 +000028 <li><a href="#pointeranalysis">Pointer and Alias Analysis</a></li>
Misha Brukman05bcca92004-09-06 22:35:43 +000029 <li><a href="#profileguided">Profile-Guided Optimization</a></li>
Misha Brukman076438b2003-11-14 17:34:38 +000030 <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>
33 </ol></li>
Chris Lattnerb7131092003-02-06 19:39:21 +000034</ul>
35
Chris Lattner97d49ef2004-05-23 21:06:21 +000036<div class="doc_author">
37 <p>Written by the <a href="http://llvm.cs.uiuc.edu/">LLVM Team</a></p>
38</div>
39
40
Chris Lattnerb7131092003-02-06 19:39:21 +000041<!-- *********************************************************************** -->
Misha Brukman076438b2003-11-14 17:34:38 +000042<div class="doc_section">
43 <a name="what">What is this?</a>
44</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000045<!-- *********************************************************************** -->
46
Misha Brukman076438b2003-11-14 17:34:38 +000047<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +000048
Misha Brukman076438b2003-11-14 17:34:38 +000049<p>This document is meant to be a sort of "big TODO list" for LLVM. Each
50project in this document is something that would be useful for LLVM to have, and
51would also be a great way to get familiar with the system. Some of these
52projects are small and self-contained, which may be implemented in a couple of
53days, others are larger. Several of these projects may lead to interesting
54research projects in their own right. In any case, we welcome all
55contributions.</p>
56
57<p>If you are thinking about tackling one of these projects, please send a mail
58to the <a href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM
Chris Lattnerb7131092003-02-06 19:39:21 +000059Developer's</a> mailing list, so that we know the project is being worked on.
60Additionally this is a good way to get more information about a specific project
Alkis Evlogimenos45ff0272004-03-11 02:50:35 +000061or to suggest other projects to add to this page.
62</p>
63
Misha Brukman836db502004-05-12 18:57:54 +000064<p>The projects in this page are open-ended. More specific projects are
65filed as unassigned enhancements in the <a href="http://llvm.cs.uiuc.edu/bugs/">
Chris Lattner9f57b182004-05-23 20:29:35 +000066LLVM bug tracker</a>. See the <a href="http://llvm.cs.uiuc.edu/bugs/buglist.cgi?keywords_type=allwords&amp;keywords=&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;bug_severity=enhancement&amp;emailassigned_to1=1&amp;emailtype1=substring&amp;email1=unassigned">list of currently outstanding issues</a> if you wish to help improve LLVM.</p>
Chris Lattnerb7131092003-02-06 19:39:21 +000067
Misha Brukman076438b2003-11-14 17:34:38 +000068</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000069
70<!-- *********************************************************************** -->
Misha Brukman076438b2003-11-14 17:34:38 +000071<div class="doc_section">
72 <a name="improving">Improving the current system</a>
73</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000074<!-- *********************************************************************** -->
75
Misha Brukman076438b2003-11-14 17:34:38 +000076<div class="doc_text">
77
78<p>Improvements to the current infrastructure are always very welcome and tend
79to be fairly straight-forward to implement. Here are some of the key areas that
80can use improvement...</p>
81
82</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000083
84<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +000085<div class="doc_subsection">
Chris Lattner7e0281f2004-05-28 20:41:37 +000086 <a name="code-cleanups">Implementing Code Cleanup bugs</a>
87</div>
88
89<div class="doc_text">
90
91<p>
92The <a href="http://llvm.cs.uiuc.edu/bugs/">LLVM bug tracker</a> occasionally
93has <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
94way to get your feet wet in the LLVM code and discover how some of its components
95work.
96</p>
97
98</div>
99
100<!-- ======================================================================= -->
101<div class="doc_subsection">
Misha Brukman076438b2003-11-14 17:34:38 +0000102 <a name="glibc">Port glibc to LLVM</a>
103</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000104
Misha Brukman076438b2003-11-14 17:34:38 +0000105<div class="doc_text">
106
107<p>It would be very useful to <a
Tanya Lattner09cf73c2004-06-22 04:24:55 +0000108href="http://www.gnu.org/software/libc/manual/html_node/Porting.html">port</a> <a
109href="http://www.gnu.org/software/libc/">glibc</a> to LLVM. This would allow a
Chris Lattnerb7131092003-02-06 19:39:21 +0000110variety of interprocedural algorithms to be much more effective in the face of
111library calls. The most important pieces to port are things like the string
112library and the <tt>stdio</tt> related functions... low-level system calls like
Misha Brukman076438b2003-11-14 17:34:38 +0000113'<tt>read</tt>' should stay unimplemented in LLVM.</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000114
Misha Brukman076438b2003-11-14 17:34:38 +0000115</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000116
117<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000118<div class="doc_subsection">
Misha Brukman076438b2003-11-14 17:34:38 +0000119 <a name="programs">Compile programs with the LLVM Compiler</a>
120</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000121
Misha Brukman076438b2003-11-14 17:34:38 +0000122<div class="doc_text">
123
124<p>We are always looking for new testcases and benchmarks for use with LLVM. In
Chris Lattnerb7131092003-02-06 19:39:21 +0000125particular, it is useful to try compiling your favorite C source code with LLVM.
126If it doesn't compile, try to figure out why or report it to the <a
127href="http://mail.cs.uiuc.edu/pipermail/llvmbugs/">llvm-bugs</a> list. If you
128get the program to compile, it would be extremely useful to convert the build
129system to be compatible with the LLVM Programs testsuite so that we can check it
Chris Lattner1b360042003-02-07 19:25:35 +0000130into CVS and the automated tester can use it to track progress of the
Misha Brukman076438b2003-11-14 17:34:38 +0000131compiler.</p>
Chris Lattner1b360042003-02-07 19:25:35 +0000132
Misha Brukman076438b2003-11-14 17:34:38 +0000133<p>When testing a code, try running it with a variety of optimizations, and with
134all the back-ends: CBE, llc, and lli.</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000135
Misha Brukman076438b2003-11-14 17:34:38 +0000136</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000137
138<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000139<div class="doc_subsection">
140 <a name="llvm_ir">Extend the LLVM intermediate representation</a>
141</div>
142
143<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000144
145<ol>
Misha Brukman076438b2003-11-14 17:34:38 +0000146<li>Add support for platform-independent prefetch support. The GCC <a
Chris Lattnerb7131092003-02-06 19:39:21 +0000147 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
Misha Brukman076438b2003-11-14 17:34:38 +0000149 processors.</li>
150
Chris Lattnerb7131092003-02-06 19:39:21 +0000151</ol>
152
Misha Brukman076438b2003-11-14 17:34:38 +0000153</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000154
155<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000156<div class="doc_subsection">
157 <a name="misc_imp">Miscellaneous Improvements</a>
158</div>
159
160<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000161
162<ol>
Chris Lattner8bde96f2003-05-06 20:47:11 +0000163<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
Misha Brukman076438b2003-11-14 17:34:38 +0000166 <tt>gccld</tt>.</li>
Chris Lattner8bde96f2003-05-06 20:47:11 +0000167
Misha Brukman076438b2003-11-14 17:34:38 +0000168<li>Rework the PassManager to be more flexible</li>
169
Chris Lattnerb7131092003-02-06 19:39:21 +0000170<li>Some transformations and analyses only work on reducible flow graphs. It
171would be nice to have a transformation which could be "required" by these passes
172which makes irreducible graphs reducible. This can easily be accomplished
173through code duplication. See <a
174href="http://citeseer.nj.nec.com/janssen97making.html">Making Graphs Reducible
175with Controlled Node Splitting</a> and perhaps <a
176href="http://doi.acm.org/10.1145/262004.262005">Nesting of Reducible and
Misha Brukman076438b2003-11-14 17:34:38 +0000177Irreducible Loops</a>.</li>
178
Chris Lattnerb7131092003-02-06 19:39:21 +0000179</ol>
180
Misha Brukman076438b2003-11-14 17:34:38 +0000181</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000182
183<!-- *********************************************************************** -->
Misha Brukman076438b2003-11-14 17:34:38 +0000184<div class="doc_section">
185 <a name="new">Adding new capabilities to LLVM</a>
186</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000187<!-- *********************************************************************** -->
188
Misha Brukman076438b2003-11-14 17:34:38 +0000189<div class="doc_text">
190
Brian Gaeke2d261352004-04-07 15:31:23 +0000191<p>Sometimes creating new things is more fun than improving existing things.
Misha Brukman076438b2003-11-14 17:34:38 +0000192These projects tend to be more involved and perhaps require more work, but can
193also be very rewarding.</p>
194
195</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000196
Chris Lattner7e0281f2004-05-28 20:41:37 +0000197
198<!-- ======================================================================= -->
199<div class="doc_subsection">
200 <a name="newfeaturebugs">Implementing new feature PRs</a>
201</div>
202
203<div class="doc_text">
204
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>
206
207</div>
208
Chris Lattnerb7131092003-02-06 19:39:21 +0000209<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000210<div class="doc_subsection">
211 <a name="pointeranalysis">Pointer and Alias Analysis</a>
212</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000213
Misha Brukman076438b2003-11-14 17:34:38 +0000214<div class="doc_text">
215
216<p>We have a <a href="AliasAnalysis.html">strong base for development</a> of
217both pointer analysis based optimizations as well as pointer analyses
218themselves. It seems natural to want to take advantage of this...</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000219
220<ol>
221<li>Implement a flow-sensitive context-sensitive alias analysis algorithm<br>
222 - Pick one of the somewhat efficient algorithms, but strive for maximum
Misha Brukman076438b2003-11-14 17:34:38 +0000223 precision</li>
224
Chris Lattnerf56703b2003-06-25 14:31:06 +0000225<li>Implement a flow-sensitive context-insensitive alias analysis algorithm<br>
Misha Brukman076438b2003-11-14 17:34:38 +0000226 - Just an efficient local algorithm perhaps?</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000227
Misha Brukman076438b2003-11-14 17:34:38 +0000228<li>Implement alias-analysis-based optimizations:
Chris Lattnerb7131092003-02-06 19:39:21 +0000229 <ul>
Misha Brukman076438b2003-11-14 17:34:38 +0000230 <li>...</li>
231 </ul></li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000232</ol>
233
Misha Brukman076438b2003-11-14 17:34:38 +0000234</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000235
Misha Brukman076438b2003-11-14 17:34:38 +0000236<!-- ======================================================================= -->
237<div class="doc_subsection">
Misha Brukman05bcca92004-09-06 22:35:43 +0000238 <a name="profileguided">Profile-Guided Optimization</a>
Misha Brukman076438b2003-11-14 17:34:38 +0000239</div>
240
241<div class="doc_text">
242
Chris Lattnera5422e42004-03-08 22:29:35 +0000243<p>We now have a unified infrastructure for writing profile-guided
244transformations, which will work either at offline-compile-time or in the JIT,
245but we don't have many transformations. We would welcome new profile-guided
246transformations as well as improvements to the current profiling system.
247</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000248
Misha Brukman05bcca92004-09-06 22:35:43 +0000249<p>Ideas for profile-guided transformations:</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000250
251<ol>
Misha Brukman076438b2003-11-14 17:34:38 +0000252<li>Superblock formation (with many optimizations)</li>
253<li>Loop unrolling/peeling</li>
254<li>Profile directed inlining</li>
255<li>Code layout</li>
256<li>...</li>
257</ol>
Chris Lattnerb7131092003-02-06 19:39:21 +0000258
Chris Lattnera5422e42004-03-08 22:29:35 +0000259<p>Improvements to the existing support:</p>
260
261<ol>
262<li>The current block and edge profiling code that gets inserted is very simple
263and inefficient. Through the use of control-dependence information, many fewer
264counters could be inserted into the code. Also, if the execution count of a
265loop is known to be a compile-time or runtime constant, all of the counters in
266the loop could be avoided.</li>
267
268<li>You could implement one of the "static profiling" algorithms which analyze a
269piece of code an make educated guesses about the relative execution frequencies
270of various parts of the code.</li>
271
272<li>You could add path profiling support, or adapt the existing LLVM path
273profiling code to work with the generic profiling interfaces.</li>
274</ol>
275
Misha Brukman076438b2003-11-14 17:34:38 +0000276</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000277
278<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000279<div class="doc_subsection">
280 <a name="xforms">New Transformations and Analyses</a>
281</div>
282
283<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000284
285<ol>
286<li>Implement a Dependence Analysis Infrastructure<br>
Misha Brukman076438b2003-11-14 17:34:38 +0000287 - Design some way to represent and query dep analysis</li>
Misha Brukman076438b2003-11-14 17:34:38 +0000288<li>Implement a strength reduction pass</li>
289<li>Value range propagation pass</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000290</ol>
291
Misha Brukman076438b2003-11-14 17:34:38 +0000292</div>
293
Chris Lattnerb7131092003-02-06 19:39:21 +0000294<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000295<div class="doc_section">
296 <a name="x86be">X86 Back-end Improvements</a>
297</div>
298
299<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000300
301<ol>
Misha Brukman076438b2003-11-14 17:34:38 +0000302<li>Implement a better instruction selector</li>
Chris Lattner99df25f2003-04-28 03:42:31 +0000303<li>Implement support for the "switch" instruction without requiring the
Misha Brukman076438b2003-11-14 17:34:38 +0000304 lower-switches pass.</li>
Reid Spencer750c4252004-07-02 06:27:12 +0000305<li>Implement interprocedural register allocation. The CallGraphSCCPass can be
306 used to implement a bottom-up analysis that will determine the *actual*
307 registers clobbered by a function. Use the pass to fine tune register usage
308 in callers based on *actual* registers used by the callee.</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000309</ol>
310
Misha Brukman076438b2003-11-14 17:34:38 +0000311</div>
312
Chris Lattnerb7131092003-02-06 19:39:21 +0000313<!-- ======================================================================= -->
Misha Brukman3497ae92004-03-11 21:26:29 +0000314<div class="doc_section">
Misha Brukman076438b2003-11-14 17:34:38 +0000315 <a name="misc_new">Miscellaneous Additions</a>
316</div>
317
318<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000319
320<ol>
Misha Brukman85595942004-07-12 21:10:47 +0000321<li>Port the <a href="http://www-sop.inria.fr/mimosa/fp/Bigloo/">Bigloo</A>
Brian Gaeke2d261352004-04-07 15:31:23 +0000322Scheme compiler, from Manuel Serrano at INRIA Sophia-Antipolis, to
323output LLVM bytecode. It seems that it can already output .NET
324bytecode, JVM bytecode, and C, so LLVM would ostensibly be another good
325candidate.</li>
Misha Brukman85595942004-07-12 21:10:47 +0000326<li>Write a new frontend for C/C++ <b>in</b> C++, giving us the ability to
327directly use LLVM C++ classes from within a compiler rather than use
328C-based wrapper functions a la llvm-gcc. One possible starting point is the <a
329href="http://www.parashift.com/c++-faq-lite/compiler-dependencies.html#faq-37.11">C++
330yacc grammar by Ed Willink</a>.</li>
Brian Gaeke2d261352004-04-07 15:31:23 +0000331<li>Write a new frontend for some other language (Java? OCaml? Forth?)</li>
Misha Brukman076438b2003-11-14 17:34:38 +0000332<li>Write a new backend for a target (IA64? MIPS? MMIX?)</li>
Misha Brukmandec8cfb2004-04-16 16:55:30 +0000333<li>Write a disassembler for machine code that would use TableGen to output
334<tt>MachineInstr</tt>s for transformations, optimizations, etc.</li>
Brian Gaekea2245a32004-03-10 19:15:50 +0000335<li>Random test vector generator: Use a C grammar to generate random C code;
336run it through llvm-gcc, then run a random set of passes on it using opt.
337Try to crash opt. When opt crashes, use bugpoint to reduce the test case and
338mail the result to yourself. Repeat ad infinitum.</li>
Misha Brukman1a49bc82004-03-10 19:22:29 +0000339<li>Design a simple, recognizable logo.</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000340</ol>
341
Misha Brukman076438b2003-11-14 17:34:38 +0000342</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000343
344<!-- *********************************************************************** -->
Chris Lattnerb7131092003-02-06 19:39:21 +0000345
Misha Brukman076438b2003-11-14 17:34:38 +0000346<hr>
Misha Brukman836db502004-05-12 18:57:54 +0000347<address>
348 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
349 src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
350 <a href="http://validator.w3.org/check/referer"><img
351 src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
352
353 <a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
354 <a href="http://llvm.cs.uiuc.edu">LLVM Compiler Infrastructure</a><br>
Misha Brukman076438b2003-11-14 17:34:38 +0000355 Last modified: $Date$
Misha Brukman836db502004-05-12 18:57:54 +0000356</address>
Misha Brukman076438b2003-11-14 17:34:38 +0000357
358</body>
359</html>