Make the subsubsections stand out a bit more
[oota-llvm.git] / docs / OpenProjects.html
1 <!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>
9
10 <div class="doc_title">
11   Open LLVM Projects
12 </div>
13
14 <ul>
15   <li><a href="#what">What is this?</a></li>
16   <li><a href="#improving">Improving the current system</a>
17   <ol>
18     <li><a href="#glibc">Port glibc to LLVM</a></li>
19     <li><a href="#NightlyTest">Improving the Nightly Tester</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>
23   </ol></li>
24
25   <li><a href="#new">Adding new capabilities to LLVM</a>
26   <ol>
27     <li><a href="#pointeranalysis">Pointer and Alias Analysis</a></li>
28     <li><a href="#profileguided">Profile Guided Optimization</a></li>
29     <li><a href="#xforms">New Transformations and Analyses</a></li>
30     <li><a href="#x86be">X86 Back-end Improvements</a></li>
31     <li><a href="#misc_new">Miscellaneous Additions</a></li>
32   </ol></li>
33 </ul>
34
35 <!-- *********************************************************************** -->
36 <div class="doc_section">
37   <a name="what">What is this?</a>
38 </div>
39 <!-- *********************************************************************** -->
40
41 <div class="doc_text">
42
43 <p>This document is meant to be a sort of "big TODO list" for LLVM.  Each
44 project in this document is something that would be useful for LLVM to have, and
45 would also be a great way to get familiar with the system.  Some of these
46 projects are small and self-contained, which may be implemented in a couple of
47 days, others are larger.  Several of these projects may lead to interesting
48 research projects in their own right.  In any case, we welcome all
49 contributions.</p>
50
51 <p>If you are thinking about tackling one of these projects, please send a mail
52 to the <a href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM
53 Developer's</a> mailing list, so that we know the project is being worked on.
54 Additionally this is a good way to get more information about a specific project
55 or to suggest other projects to add to this page.
56 </p>
57
58 <p>The projects in this page are open-ended. More specific projects are
59 filed as unassigned enhancements in the <a href="http://llvm.cs.uiuc.edu/bugs/">
60 LLVM 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>
61
62 </div>
63
64 <!-- *********************************************************************** -->
65 <div class="doc_section">
66   <a name="improving">Improving the current system</a>
67 </div>
68 <!-- *********************************************************************** -->
69
70 <div class="doc_text">
71
72 <p>Improvements to the current infrastructure are always very welcome and tend
73 to be fairly straight-forward to implement.  Here are some of the key areas that
74 can use improvement...</p>
75
76 </div>
77
78 <!-- ======================================================================= -->
79 <div class="doc_subsection">
80   <a name="glibc">Port glibc to LLVM</a>
81 </div>
82
83 <div class="doc_text">
84
85 <p>It would be very useful to <a
86 href="http://www.gnu.org/software/libc/porting.html">port</a> <a
87 href="http://www.gnu.org/software/glibc/">glibc</a> to LLVM.  This would allow a
88 variety of interprocedural algorithms to be much more effective in the face of
89 library calls.  The most important pieces to port are things like the string
90 library and the <tt>stdio</tt> related functions... low-level system calls like
91 '<tt>read</tt>' should stay unimplemented in LLVM.</p>
92
93 </div>
94
95 <!-- ======================================================================= -->
96 <div class="doc_subsection">
97   <a name="NightlyTest">Improving the Nightly Tester</a>
98 </div>
99
100 <div class="doc_text">
101
102 <p>The <a href="/testresults/">Nightly Tester</a> is a simple perl script
103 (located in <tt>utils/NightlyTest.pl</tt>) which runs every night to generate a
104 daily report.  It could use the following improvements:</p>
105
106 <ol>
107 <li>Regression tests - We should run the regression tests in addition to the
108     program tests...</li>
109 </ol>
110
111 </div>
112
113 <!-- ======================================================================= -->
114 <div class="doc_subsection">
115   <a name="programs">Compile programs with the LLVM Compiler</a>
116 </div>
117
118 <div class="doc_text">
119
120 <p>We are always looking for new testcases and benchmarks for use with LLVM.  In
121 particular, it is useful to try compiling your favorite C source code with LLVM.
122 If it doesn't compile, try to figure out why or report it to the <a
123 href="http://mail.cs.uiuc.edu/pipermail/llvmbugs/">llvm-bugs</a> list.  If you
124 get the program to compile, it would be extremely useful to convert the build
125 system to be compatible with the LLVM Programs testsuite so that we can check it
126 into CVS and the automated tester can use it to track progress of the
127 compiler.</p>
128
129 <p>When testing a code, try running it with a variety of optimizations, and with
130 all the back-ends: CBE, llc, and lli.</p>
131
132 </div>
133
134 <!-- ======================================================================= -->
135 <div class="doc_subsection">
136   <a name="llvm_ir">Extend the LLVM intermediate representation</a>
137 </div>
138
139 <div class="doc_text">
140
141 <ol>
142 <li>Add support for platform-independent prefetch support.  The GCC <a
143     href="http://gcc.gnu.org/projects/prefetch.html">prefetch project</a> page
144     has a good survey of the prefetching capabilities of a variety of modern
145     processors.</li>
146
147 </ol>
148
149 </div>
150
151 <!-- ======================================================================= -->
152 <div class="doc_subsection">
153   <a name="misc_imp">Miscellaneous Improvements</a>
154 </div>
155
156 <div class="doc_text">
157
158 <ol>
159 <li>Someone needs to look into getting the <tt>ranlib</tt> tool to index LLVM
160     bytecode files, so that linking in .a files is not hideously slow.  They
161     would also then have to implement the reader for this index in
162     <tt>gccld</tt>.</li>
163
164 <li>Rework the PassManager to be more flexible</li>
165
166 <li>Some transformations and analyses only work on reducible flow graphs.  It
167 would be nice to have a transformation which could be "required" by these passes
168 which makes irreducible graphs reducible.  This can easily be accomplished
169 through code duplication.  See <a
170 href="http://citeseer.nj.nec.com/janssen97making.html">Making Graphs Reducible
171 with Controlled Node Splitting</a> and perhaps <a
172 href="http://doi.acm.org/10.1145/262004.262005">Nesting of Reducible and
173 Irreducible Loops</a>.</li>
174
175 </ol>
176
177 </div>
178
179 <!-- *********************************************************************** -->
180 <div class="doc_section">
181   <a name="new">Adding new capabilities to LLVM</a>
182 </div>
183 <!-- *********************************************************************** -->
184
185 <div class="doc_text">
186
187 <p>Sometimes creating new things is more fun than improving existing things.
188 These projects tend to be more involved and perhaps require more work, but can
189 also be very rewarding.</p>
190
191 </div>
192
193 <!-- ======================================================================= -->
194 <div class="doc_subsection">
195   <a name="pointeranalysis">Pointer and Alias Analysis</a>
196 </div>
197
198 <div class="doc_text">
199
200 <p>We have a <a href="AliasAnalysis.html">strong base for development</a> of
201 both pointer analysis based optimizations as well as pointer analyses
202 themselves.  It seems natural to want to take advantage of this...</p>
203
204 <ol>
205 <li>Implement a flow-sensitive context-sensitive alias analysis algorithm<br>
206   - Pick one of the somewhat efficient algorithms, but strive for maximum
207     precision</li>
208
209 <li>Implement a flow-sensitive context-insensitive alias analysis algorithm<br>
210   - Just an efficient local algorithm perhaps?</li>
211
212 <li>Implement an interface to update analyses in response to common code motion
213     transformations</li>
214
215 <li>Implement alias-analysis-based optimizations:
216   <ul>
217   <li>Dead store elimination</li>
218   <li>...</li>
219   </ul></li>
220 </ol>
221
222 </div>
223
224 <!-- ======================================================================= -->
225 <div class="doc_subsection">
226   <a name="profileguided">Profile Guided Optimization</a>
227 </div>
228
229 <div class="doc_text">
230
231 <p>We now have a unified infrastructure for writing profile-guided
232 transformations, which will work either at offline-compile-time or in the JIT,
233 but we don't have many transformations.  We would welcome new profile-guided
234 transformations as well as improvements to the current profiling system.
235 </p>
236
237 <p>Ideas for profile guided transformations:</p>
238
239 <ol>
240 <li>Superblock formation (with many optimizations)</li>
241 <li>Loop unrolling/peeling</li>
242 <li>Profile directed inlining</li>
243 <li>Code layout</li>
244 <li>...</li>
245 </ol>
246
247 <p>Improvements to the existing support:</p>
248
249 <ol>
250 <li>The current block and edge profiling code that gets inserted is very simple
251 and inefficient.  Through the use of control-dependence information, many fewer
252 counters could be inserted into the code.  Also, if the execution count of a
253 loop is known to be a compile-time or runtime constant, all of the counters in
254 the loop could be avoided.</li>
255
256 <li>You could implement one of the "static profiling" algorithms which analyze a
257 piece of code an make educated guesses about the relative execution frequencies
258 of various parts of the code.</li>
259
260 <li>You could add path profiling support, or adapt the existing LLVM path
261 profiling code to work with the generic profiling interfaces.</li>
262 </ol>
263
264 </div>
265
266 <!-- ======================================================================= -->
267 <div class="doc_subsection">
268   <a name="xforms">New Transformations and Analyses</a>
269 </div>
270
271 <div class="doc_text">
272
273 <ol>
274 <li>Implement a Dependence Analysis Infrastructure<br>
275      - Design some way to represent and query dep analysis</li>
276 <li>Implement a strength reduction pass</li>
277 <li>Value range propagation pass</li>
278 <li>Implement an unswitching pass</li>
279 <li>Write a loop unroller, with a simple heuristic for when to unroll</li>
280 </ol>
281
282 </div>
283
284 <!-- ======================================================================= -->
285 <div class="doc_section">
286   <a name="x86be">X86 Back-end Improvements</a>
287 </div>
288
289 <div class="doc_text">
290
291 <ol>
292 <li>Implement a better instruction selector</li>
293 <li>Implement support for the "switch" instruction without requiring the 
294     lower-switches pass.</li>
295 </ol>
296
297 </div>
298
299 <!-- ======================================================================= -->
300 <div class="doc_section">
301   <a name="misc_new">Miscellaneous Additions</a>
302 </div>
303
304 <div class="doc_text">
305
306 <ol>
307 <li>Port the <A HREF="http://www-sop.inria.fr/mimosa/fp/Bigloo/">Bigloo</A>
308 Scheme compiler, from Manuel Serrano at INRIA Sophia-Antipolis, to
309 output LLVM bytecode. It seems that it can already output .NET
310 bytecode, JVM bytecode, and C, so LLVM would ostensibly be another good
311 candidate.</li>
312 <li>Write a new frontend for some other language (Java? OCaml? Forth?)</li>
313 <li>Write a new backend for a target (IA64? MIPS? MMIX?)</li>
314 <li>Write a disassembler for machine code that would use TableGen to output 
315 <tt>MachineInstr</tt>s for transformations, optimizations, etc.</li>
316 <li>Random test vector generator: Use a C grammar to generate random C code;
317 run it through llvm-gcc, then run a random set of passes on it using opt.
318 Try to crash opt. When opt crashes, use bugpoint to reduce the test case and
319 mail the result to yourself.  Repeat ad infinitum.</li>
320 <li>Design a simple, recognizable logo.</li>
321 </ol>
322
323 </div>
324
325 <!-- *********************************************************************** -->
326
327 <hr>
328 <address>
329   <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
330   src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
331   <a href="http://validator.w3.org/check/referer"><img
332   src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
333
334   <a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
335   <a href="http://llvm.cs.uiuc.edu">LLVM Compiler Infrastructure</a><br>
336   Last modified: $Date$
337 </address>
338
339 </body>
340 </html>