blob: ebbf7b3e72b054e29264dd8ae501cec39a12369c [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>
Misha Brukman076438b2003-11-14 17:34:38 +000018 <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>
Chris Lattnerb7131092003-02-06 19:39:21 +000024
25 <li><a href="#new">Adding new capabilities to LLVM</a>
26 <ol>
Misha Brukman076438b2003-11-14 17:34:38 +000027 <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>
Chris Lattnerb7131092003-02-06 19:39:21 +000033</ul>
34
Chris Lattnerb7131092003-02-06 19:39:21 +000035<!-- *********************************************************************** -->
Misha Brukman076438b2003-11-14 17:34:38 +000036<div class="doc_section">
37 <a name="what">What is this?</a>
38</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000039<!-- *********************************************************************** -->
40
Misha Brukman076438b2003-11-14 17:34:38 +000041<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +000042
Misha Brukman076438b2003-11-14 17:34:38 +000043<p>This document is meant to be a sort of "big TODO list" for LLVM. Each
44project in this document is something that would be useful for LLVM to have, and
45would also be a great way to get familiar with the system. Some of these
46projects are small and self-contained, which may be implemented in a couple of
47days, others are larger. Several of these projects may lead to interesting
48research projects in their own right. In any case, we welcome all
49contributions.</p>
50
51<p>If you are thinking about tackling one of these projects, please send a mail
52to the <a href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM
Chris Lattnerb7131092003-02-06 19:39:21 +000053Developer's</a> mailing list, so that we know the project is being worked on.
54Additionally this is a good way to get more information about a specific project
Misha Brukman076438b2003-11-14 17:34:38 +000055or to suggest other projects to add to this page. Another good place to look
56for ideas is the <a href="http://llvm.cs.uiuc.edu/bugs/">LLVM bug
57tracker</a>.</p>
Chris Lattnerb7131092003-02-06 19:39:21 +000058
Misha Brukman076438b2003-11-14 17:34:38 +000059</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000060
61<!-- *********************************************************************** -->
Misha Brukman076438b2003-11-14 17:34:38 +000062<div class="doc_section">
63 <a name="improving">Improving the current system</a>
64</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000065<!-- *********************************************************************** -->
66
Misha Brukman076438b2003-11-14 17:34:38 +000067<div class="doc_text">
68
69<p>Improvements to the current infrastructure are always very welcome and tend
70to be fairly straight-forward to implement. Here are some of the key areas that
71can use improvement...</p>
72
73</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000074
75<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +000076<div class="doc_subsection">
77 <a name="glibc">Port glibc to LLVM</a>
78</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000079
Misha Brukman076438b2003-11-14 17:34:38 +000080<div class="doc_text">
81
82<p>It would be very useful to <a
Chris Lattnerb7131092003-02-06 19:39:21 +000083href="http://www.gnu.org/software/libc/porting.html">port</a> <a
84href="http://www.gnu.org/software/glibc/">glibc</a> to LLVM. This would allow a
85variety of interprocedural algorithms to be much more effective in the face of
86library calls. The most important pieces to port are things like the string
87library and the <tt>stdio</tt> related functions... low-level system calls like
Misha Brukman076438b2003-11-14 17:34:38 +000088'<tt>read</tt>' should stay unimplemented in LLVM.</p>
Chris Lattnerb7131092003-02-06 19:39:21 +000089
Misha Brukman076438b2003-11-14 17:34:38 +000090</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000091
92<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +000093<div class="doc_subsection">
94 <a name="NightlyTest">Improving the Nightly Tester</a>
95</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000096
Misha Brukman076438b2003-11-14 17:34:38 +000097<div class="doc_text">
98
99<p>The <a href="/testresults/">Nightly Tester</a> is a simple perl script
100(located in <tt>utils/NightlyTest.pl</tt>) which runs every night to generate a
101daily report. It could use the following improvements:</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000102
103<ol>
Chris Lattnerb7131092003-02-06 19:39:21 +0000104<li>Graphs - It would be great to have gnuplot graphs to keep track of how the
105 tree is changing over time. We already gather a several statistics, it
Misha Brukman076438b2003-11-14 17:34:38 +0000106 just necessary to add the script-fu to gnuplotize it.</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000107
108<li>Regression tests - We should run the regression tests in addition to the
Misha Brukman076438b2003-11-14 17:34:38 +0000109 program tests...</li>
110</ol>
Chris Lattnerb7131092003-02-06 19:39:21 +0000111
Misha Brukman076438b2003-11-14 17:34:38 +0000112</div>
Chris Lattner1b360042003-02-07 19:25:35 +0000113
Chris Lattnerb7131092003-02-06 19:39:21 +0000114<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000115<div class="doc_subsection">
116 <a name="programs">Compile programs with the LLVM Compiler</a>
117</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000118
Misha Brukman076438b2003-11-14 17:34:38 +0000119<div class="doc_text">
120
121<p>We are always looking for new testcases and benchmarks for use with LLVM. In
Chris Lattnerb7131092003-02-06 19:39:21 +0000122particular, it is useful to try compiling your favorite C source code with LLVM.
123If it doesn't compile, try to figure out why or report it to the <a
124href="http://mail.cs.uiuc.edu/pipermail/llvmbugs/">llvm-bugs</a> list. If you
125get the program to compile, it would be extremely useful to convert the build
126system to be compatible with the LLVM Programs testsuite so that we can check it
Chris Lattner1b360042003-02-07 19:25:35 +0000127into CVS and the automated tester can use it to track progress of the
Misha Brukman076438b2003-11-14 17:34:38 +0000128compiler.</p>
Chris Lattner1b360042003-02-07 19:25:35 +0000129
Misha Brukman076438b2003-11-14 17:34:38 +0000130<p>When testing a code, try running it with a variety of optimizations, and with
131all the back-ends: CBE, llc, and lli.</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000132
Misha Brukman076438b2003-11-14 17:34:38 +0000133</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000134
135<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000136<div class="doc_subsection">
137 <a name="llvm_ir">Extend the LLVM intermediate representation</a>
138</div>
139
140<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000141
142<ol>
Misha Brukman076438b2003-11-14 17:34:38 +0000143
144<li>Add a new conditional move instruction: <tt>X = select bool Cond, Y,
145 Z</tt></li>
146
147<li>Add support for platform-independent prefetch support. The GCC <a
Chris Lattnerb7131092003-02-06 19:39:21 +0000148 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
Misha Brukman076438b2003-11-14 17:34:38 +0000150 processors.</li>
151
Chris Lattnerb7131092003-02-06 19:39:21 +0000152</ol>
153
Misha Brukman076438b2003-11-14 17:34:38 +0000154</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000155
156<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000157<div class="doc_subsection">
158 <a name="misc_imp">Miscellaneous Improvements</a>
159</div>
160
161<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000162
163<ol>
Chris Lattner8bde96f2003-05-06 20:47:11 +0000164<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
Misha Brukman076438b2003-11-14 17:34:38 +0000167 <tt>gccld</tt>.</li>
Chris Lattner8bde96f2003-05-06 20:47:11 +0000168
Misha Brukman076438b2003-11-14 17:34:38 +0000169<li>Improve the efficiency of the bytecode loader/writer</li>
170
Chris Lattner08fdac82003-10-01 21:49:55 +0000171<li>Extend the FunctionPassManager to use a ModuleProvider to stream functions
Misha Brukman076438b2003-11-14 17:34:38 +0000172 in on demand. This would improve the efficiency of the JIT.</li>
173
174<li>Rework the PassManager to be more flexible</li>
175
Chris Lattnerb7131092003-02-06 19:39:21 +0000176<li>Some transformations and analyses only work on reducible flow graphs. It
177would be nice to have a transformation which could be "required" by these passes
178which makes irreducible graphs reducible. This can easily be accomplished
179through code duplication. See <a
180href="http://citeseer.nj.nec.com/janssen97making.html">Making Graphs Reducible
181with Controlled Node Splitting</a> and perhaps <a
182href="http://doi.acm.org/10.1145/262004.262005">Nesting of Reducible and
Misha Brukman076438b2003-11-14 17:34:38 +0000183Irreducible Loops</a>.</li>
184
Chris Lattnerb7131092003-02-06 19:39:21 +0000185</ol>
186
Misha Brukman076438b2003-11-14 17:34:38 +0000187</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000188
189<!-- *********************************************************************** -->
Misha Brukman076438b2003-11-14 17:34:38 +0000190<div class="doc_section">
191 <a name="new">Adding new capabilities to LLVM</a>
192</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000193<!-- *********************************************************************** -->
194
Misha Brukman076438b2003-11-14 17:34:38 +0000195<div class="doc_text">
196
197<p>Sometimes creating new things is more fun that improving existing things.
198These projects tend to be more involved and perhaps require more work, but can
199also be very rewarding.</p>
200
201</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000202
203<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000204<div class="doc_subsection">
205 <a name="pointeranalysis">Pointer and Alias Analysis</a>
206</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000207
Misha Brukman076438b2003-11-14 17:34:38 +0000208<div class="doc_text">
209
210<p>We have a <a href="AliasAnalysis.html">strong base for development</a> of
211both pointer analysis based optimizations as well as pointer analyses
212themselves. It seems natural to want to take advantage of this...</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000213
214<ol>
215<li>Implement a flow-sensitive context-sensitive alias analysis algorithm<br>
216 - Pick one of the somewhat efficient algorithms, but strive for maximum
Misha Brukman076438b2003-11-14 17:34:38 +0000217 precision</li>
218
Chris Lattnerf56703b2003-06-25 14:31:06 +0000219<li>Implement a flow-sensitive context-insensitive alias analysis algorithm<br>
Misha Brukman076438b2003-11-14 17:34:38 +0000220 - Just an efficient local algorithm perhaps?</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000221
222<li>Implement an interface to update analyses in response to common code motion
Misha Brukman076438b2003-11-14 17:34:38 +0000223 transformations</li>
224
225<li>Implement alias-analysis-based optimizations:
Chris Lattnerb7131092003-02-06 19:39:21 +0000226 <ul>
Misha Brukman076438b2003-11-14 17:34:38 +0000227 <li>Dead store elimination</li>
228 <li>...</li>
229 </ul></li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000230</ol>
231
Misha Brukman076438b2003-11-14 17:34:38 +0000232</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000233
Misha Brukman076438b2003-11-14 17:34:38 +0000234<!-- ======================================================================= -->
235<div class="doc_subsection">
236 <a name="profileguided">Profile Guided Optimization</a>
237</div>
238
239<div class="doc_text">
240
241<p>We are getting to the point where we really need a unified infrastructure for
Chris Lattnerb7131092003-02-06 19:39:21 +0000242profile guided optimizations. It would be wonderful to be able to write profile
243guided transformations which can be performed either at static compile time
244(compile time or offline optimization time) or at runtime in a JIT type setup.
Misha Brukman076438b2003-11-14 17:34:38 +0000245The LLVM transformation itself shouldn't need to know how it is being used.</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000246
Misha Brukman076438b2003-11-14 17:34:38 +0000247<p>Ideas for profile guided transformations:</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000248
249<ol>
Misha Brukman076438b2003-11-14 17:34:38 +0000250<li>Superblock formation (with many optimizations)</li>
251<li>Loop unrolling/peeling</li>
252<li>Profile directed inlining</li>
253<li>Code layout</li>
254<li>...</li>
255</ol>
Chris Lattnerb7131092003-02-06 19:39:21 +0000256
Misha Brukman076438b2003-11-14 17:34:38 +0000257</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000258
259<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000260<div class="doc_subsection">
261 <a name="xforms">New Transformations and Analyses</a>
262</div>
263
264<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000265
266<ol>
267<li>Implement a Dependence Analysis Infrastructure<br>
Misha Brukman076438b2003-11-14 17:34:38 +0000268 - Design some way to represent and query dep analysis</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000269<li>Implement a faster Dominator Set Construction Algorithm<br>
Misha Brukman076438b2003-11-14 17:34:38 +0000270 - A linear time or nearly so algorithm</li>
271<li>Implement a strength reduction pass</li>
272<li>Value range propagation pass</li>
273<li>Implement an unswitching pass</li>
274<li>Write a loop unroller, with a simple heuristic for when to unroll</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000275</ol>
276
Misha Brukman076438b2003-11-14 17:34:38 +0000277</div>
278
Chris Lattnerb7131092003-02-06 19:39:21 +0000279<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000280<div class="doc_section">
281 <a name="x86be">X86 Back-end Improvements</a>
282</div>
283
284<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000285
286<ol>
Misha Brukman076438b2003-11-14 17:34:38 +0000287<li>Implement a global register allocator</li>
288<li>Implement a better instruction selector</li>
Chris Lattner99df25f2003-04-28 03:42:31 +0000289<li>Implement support for the "switch" instruction without requiring the
Misha Brukman076438b2003-11-14 17:34:38 +0000290 lower-switches pass.</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000291</ol>
292
Misha Brukman076438b2003-11-14 17:34:38 +0000293</div>
294
Chris Lattnerb7131092003-02-06 19:39:21 +0000295<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000296<div class="doc_subsection">
297 <a name="misc_new">Miscellaneous Additions</a>
298</div>
299
300<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000301
302<ol>
Misha Brukman076438b2003-11-14 17:34:38 +0000303<li>Write a new frontend for some language (Java? OCaml? Forth?)</li>
304<li>Write a new backend for a target (IA64? MIPS? MMIX?)</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000305</ol>
306
Misha Brukman076438b2003-11-14 17:34:38 +0000307</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000308
309<!-- *********************************************************************** -->
Chris Lattnerb7131092003-02-06 19:39:21 +0000310
Misha Brukman076438b2003-11-14 17:34:38 +0000311<hr>
312<div class="doc_footer">
313 <address><a href="mailto:sabre@nondot.org">Chris Lattner</a></address>
314 <a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a>
315 <br>
316 Last modified: $Date$
317</div>
318
319</body>
320</html>