Get rid of bogus entity references.
[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="#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>
23   </ol></li>
24
25   <li><a href="#new">Adding new capabilities to LLVM</a>
26   <ol>
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>
33   </ol></li>
34 </ul>
35
36 <div class="doc_author">
37   <p>Written by the <a href="http://llvm.cs.uiuc.edu/">LLVM Team</a></p>
38 </div>
39
40
41 <!-- *********************************************************************** -->
42 <div class="doc_section">
43   <a name="what">What is this?</a>
44 </div>
45 <!-- *********************************************************************** -->
46
47 <div class="doc_text">
48
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
55 contributions.</p>
56
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.
62 </p>
63
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&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>
67
68 </div>
69
70 <!-- *********************************************************************** -->
71 <div class="doc_section">
72   <a name="improving">Improving the current system</a>
73 </div>
74 <!-- *********************************************************************** -->
75
76 <div class="doc_text">
77
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>
81
82 </div>
83
84 <!-- ======================================================================= -->
85 <div class="doc_subsection">
86   <a name="code-cleanups">Implementing Code Cleanup bugs</a>
87 </div>
88
89 <div class="doc_text">
90
91 <p>
92 The <a href="http://llvm.cs.uiuc.edu/bugs/">LLVM bug tracker</a> occasionally
93 has <a
94   href="http://llvm.cs.uiuc.edu/bugs/buglist.cgi?short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;bug_file_loc_type=allwordssubstr&amp;bug_file_loc=&amp;status_whiteboard_type=allwordssubstr&amp;status_whiteboard=&amp;keywords_type=allwords&amp;keywords=code-cleanup&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;emailassigned_to1=1&amp;emailtype1=substring&amp;email1=&amp;emailassigned_to2=1&amp;emailreporter2=1&amp;emailcc2=1&amp;emailtype2=substring&amp;email2=&amp;bugidtype=include&amp;bug_id=&amp;votes=&amp;changedin=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;cmdtype=doit&amp;order=Bug+Number&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=">"code-cleanup" bugs</a> filed in it.  Taking one of these and fixing it is a good
95 way to get your feet wet in the LLVM code and discover how some of its components
96 work.
97 </p>
98
99 </div>
100
101 <!-- ======================================================================= -->
102 <div class="doc_subsection">
103   <a name="glibc">Port glibc to LLVM</a>
104 </div>
105
106 <div class="doc_text">
107
108 <p>It would be very useful to <a
109 href="http://www.gnu.org/software/libc/manual/html_node/Porting.html">port</a> <a
110 href="http://www.gnu.org/software/libc/">glibc</a> to LLVM.  This would allow a
111 variety of interprocedural algorithms to be much more effective in the face of
112 library calls.  The most important pieces to port are things like the string
113 library and the <tt>stdio</tt> related functions... low-level system calls like
114 '<tt>read</tt>' should stay unimplemented in LLVM.</p>
115
116 </div>
117
118 <!-- ======================================================================= -->
119 <div class="doc_subsection">
120   <a name="programs">Compile programs with the LLVM Compiler</a>
121 </div>
122
123 <div class="doc_text">
124
125 <p>We are always looking for new testcases and benchmarks for use with LLVM.  In
126 particular, it is useful to try compiling your favorite C source code with LLVM.
127 If it doesn't compile, try to figure out why or report it to the <a
128 href="http://mail.cs.uiuc.edu/pipermail/llvmbugs/">llvm-bugs</a> list.  If you
129 get the program to compile, it would be extremely useful to convert the build
130 system to be compatible with the LLVM Programs testsuite so that we can check it
131 into CVS and the automated tester can use it to track progress of the
132 compiler.</p>
133
134 <p>When testing a code, try running it with a variety of optimizations, and with
135 all the back-ends: CBE, llc, and lli.</p>
136
137 </div>
138
139 <!-- ======================================================================= -->
140 <div class="doc_subsection">
141   <a name="llvm_ir">Extend the LLVM intermediate representation</a>
142 </div>
143
144 <div class="doc_text">
145
146 <ol>
147 <li>Add support for platform-independent prefetch support.  The GCC <a
148     href="http://gcc.gnu.org/projects/prefetch.html">prefetch project</a> page
149     has a good survey of the prefetching capabilities of a variety of modern
150     processors.</li>
151
152 </ol>
153
154 </div>
155
156 <!-- ======================================================================= -->
157 <div class="doc_subsection">
158   <a name="misc_imp">Miscellaneous Improvements</a>
159 </div>
160
161 <div class="doc_text">
162
163 <ol>
164 <li>Someone needs to look into getting the <tt>ranlib</tt> tool to index LLVM
165     bytecode files, so that linking in .a files is not hideously slow.  They
166     would also then have to implement the reader for this index in
167     <tt>gccld</tt>.</li>
168
169 <li>Rework the PassManager to be more flexible</li>
170
171 <li>Some transformations and analyses only work on reducible flow graphs.  It
172 would be nice to have a transformation which could be "required" by these passes
173 which makes irreducible graphs reducible.  This can easily be accomplished
174 through code duplication.  See <a
175 href="http://citeseer.nj.nec.com/janssen97making.html">Making Graphs Reducible
176 with Controlled Node Splitting</a> and perhaps <a
177 href="http://doi.acm.org/10.1145/262004.262005">Nesting of Reducible and
178 Irreducible Loops</a>.</li>
179
180 </ol>
181
182 </div>
183
184 <!-- *********************************************************************** -->
185 <div class="doc_section">
186   <a name="new">Adding new capabilities to LLVM</a>
187 </div>
188 <!-- *********************************************************************** -->
189
190 <div class="doc_text">
191
192 <p>Sometimes creating new things is more fun than improving existing things.
193 These projects tend to be more involved and perhaps require more work, but can
194 also be very rewarding.</p>
195
196 </div>
197
198
199 <!-- ======================================================================= -->
200 <div class="doc_subsection">
201   <a name="newfeaturebugs">Implementing new feature PRs</a>
202 </div>
203
204 <div class="doc_text">
205
206 <p>Many ideas for feature requests are stored in LLVM bugzilla.  Just <a
207   href="http://llvm.org/bugs/buglist.cgi?short_desc_type=allwordssubstr&amp;short_desc=&amp;long_desc_type=allwordssubstr&amp;long_desc=&amp;bug_file_loc_type=allwordssubstr&amp;bug_file_loc=&amp;status_whiteboard_type=allwordssubstr&amp;status_whiteboard=&amp;keywords_type=allwords&amp;keywords=new-feature&amp;bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED&amp;bug_status=REOPENED&amp;emailassigned_to1=1&amp;emailtype1=substring&amp;email1=&amp;emailassigned_to2=1&amp;emailreporter2=1&amp;emailcc2=1&amp;emailtype2=substring&amp;email2=&amp;bugidtype=include&amp;bug_id=&amp;votes=&amp;changedin=&amp;chfieldfrom=&amp;chfieldto=Now&amp;chfieldvalue=&amp;cmdtype=doit&amp;namedcmd=All+PRs&amp;newqueryname=&amp;order=Bug+Number&amp;field0-0-0=noop&amp;type0-0-0=noop&amp;value0-0-0=">search for bugs with a "new-feature" keyword</a>.</p>
208
209 </div>
210
211 <!-- ======================================================================= -->
212 <div class="doc_subsection">
213   <a name="pointeranalysis">Pointer and Alias Analysis</a>
214 </div>
215
216 <div class="doc_text">
217
218 <p>We have a <a href="AliasAnalysis.html">strong base for development</a> of
219 both pointer analysis based optimizations as well as pointer analyses
220 themselves.  It seems natural to want to take advantage of this...</p>
221
222 <ol>
223 <li>Implement a flow-sensitive context-sensitive alias analysis algorithm<br>
224   - Pick one of the somewhat efficient algorithms, but strive for maximum
225     precision</li>
226
227 <li>Implement a flow-sensitive context-insensitive alias analysis algorithm<br>
228   - Just an efficient local algorithm perhaps?</li>
229
230 <li>Implement alias-analysis-based optimizations:
231   <ul>
232   <li>...</li>
233   </ul></li>
234 </ol>
235
236 </div>
237
238 <!-- ======================================================================= -->
239 <div class="doc_subsection">
240   <a name="profileguided">Profile-Guided Optimization</a>
241 </div>
242
243 <div class="doc_text">
244
245 <p>We now have a unified infrastructure for writing profile-guided
246 transformations, which will work either at offline-compile-time or in the JIT,
247 but we don't have many transformations.  We would welcome new profile-guided
248 transformations as well as improvements to the current profiling system.
249 </p>
250
251 <p>Ideas for profile-guided transformations:</p>
252
253 <ol>
254 <li>Superblock formation (with many optimizations)</li>
255 <li>Loop unrolling/peeling</li>
256 <li>Profile directed inlining</li>
257 <li>Code layout</li>
258 <li>...</li>
259 </ol>
260
261 <p>Improvements to the existing support:</p>
262
263 <ol>
264 <li>The current block and edge profiling code that gets inserted is very simple
265 and inefficient.  Through the use of control-dependence information, many fewer
266 counters could be inserted into the code.  Also, if the execution count of a
267 loop is known to be a compile-time or runtime constant, all of the counters in
268 the loop could be avoided.</li>
269
270 <li>You could implement one of the "static profiling" algorithms which analyze a
271 piece of code an make educated guesses about the relative execution frequencies
272 of various parts of the code.</li>
273
274 <li>You could add path profiling support, or adapt the existing LLVM path
275 profiling code to work with the generic profiling interfaces.</li>
276 </ol>
277
278 </div>
279
280 <!-- ======================================================================= -->
281 <div class="doc_subsection">
282   <a name="xforms">New Transformations and Analyses</a>
283 </div>
284
285 <div class="doc_text">
286
287 <ol>
288 <li>Implement <a href="http://www.cs.purdue.edu/homes/vandrutj/">GVN-PRE</a>, a 
289   powerful and simple Partial Redundancy Elimination algorithm for SSA form</li>
290 <li>Implement a Dependence Analysis Infrastructure<br>
291      - Design some way to represent and query dep analysis</li>
292 <li>Implement a strength reduction pass</li>
293 <li>Value range propagation pass</li>
294 </ol>
295
296 </div>
297
298 <!-- ======================================================================= -->
299 <div class="doc_section">
300   <a name="x86be">X86 Back-end Improvements</a>
301 </div>
302
303 <div class="doc_text">
304
305 <ol>
306 <li>Implement a better instruction selector</li>
307 <li>Implement support for the "switch" instruction without requiring the 
308     lower-switches pass.</li>
309 <li>Implement interprocedural register allocation. The CallGraphSCCPass can be
310     used to implement a bottom-up analysis that will determine the *actual* 
311     registers clobbered by a function. Use the pass to fine tune register usage 
312     in callers based on *actual* registers used by the callee.</li>
313 </ol>
314
315 </div>
316
317 <!-- ======================================================================= -->
318 <div class="doc_section">
319   <a name="misc_new">Miscellaneous Additions</a>
320 </div>
321
322 <div class="doc_text">
323
324 <ol>
325 <li>Port the <a href="http://www-sop.inria.fr/mimosa/fp/Bigloo/">Bigloo</A>
326 Scheme compiler, from Manuel Serrano at INRIA Sophia-Antipolis, to
327 output LLVM bytecode. It seems that it can already output .NET
328 bytecode, JVM bytecode, and C, so LLVM would ostensibly be another good
329 candidate.</li>
330 <li>Write a new frontend for C/C++ <b>in</b> C++, giving us the ability to
331 directly use LLVM C++ classes from within a compiler rather than use
332 C-based wrapper functions a la llvm-gcc.  One possible starting point is the <a
333 href="http://www.parashift.com/c++-faq-lite/compiler-dependencies.html#faq-37.11">C++
334 yacc grammar by Ed Willink</a>.</li>
335 <li>Write a new frontend for some other language (Java? OCaml? Forth?)</li>
336 <li>Write a new backend for a target (IA64? MIPS? MMIX?)</li>
337 <li>Write a disassembler for machine code that would use TableGen to output 
338 <tt>MachineInstr</tt>s for transformations, optimizations, etc.</li>
339 <li>Random test vector generator: Use a C grammar to generate random C code;
340 run it through llvm-gcc, then run a random set of passes on it using opt.
341 Try to crash opt. When opt crashes, use bugpoint to reduce the test case and
342 mail the result to yourself.  Repeat ad infinitum.</li>
343 <li>Design a simple, recognizable logo.</li>
344 <li>Improve the usefulness and utility of the Skeleton target backend:
345 <ul>
346   <li>Convert the non-functional Skeleton target to become an abstract machine
347   target (choose some simple instructions, a register set, etc).  This will
348   become a much more useful example of a backend since it would be a simple
349   but <em>functional</em> backend.  Examples of such architectures include MIX,
350   MMIX, <a
351   href="http://www.cs.cinvestav.mx/SC/prof_personal/adiaz/vhdl/DLX/">DLX</a>,
352   or come up with your own!</li>
353   <li>Use the new Skeleton backend in the Interpreter: compile LLVM to Skeleton
354   target, and then interpret that code instead of LLVM.  Performance win would
355   be the primary goal, as the number of registers would be a small constant
356   instead of unbounded, for example.</li>
357 </ul></li>
358 </ol>
359
360 </div>
361
362 <!-- *********************************************************************** -->
363
364 <hr>
365 <address>
366   <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
367   src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
368   <a href="http://validator.w3.org/check/referer"><img
369   src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
370
371   <a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
372   <a href="http://llvm.cs.uiuc.edu">LLVM Compiler Infrastructure</a><br>
373   Last modified: $Date$
374 </address>
375
376 </body>
377 </html>