blob: 7fa60d811dbfacf3b5421419b42e3fffeef54fa0 [file] [log] [blame]
Misha Brukmanc40257f2003-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 Lattner66f24702003-02-06 19:39:21 +00009
Misha Brukmanc40257f2003-11-14 17:34:38 +000010<div class="doc_title">
11 Open LLVM Projects
12</div>
Chris Lattner66f24702003-02-06 19:39:21 +000013
14<ul>
Misha Brukmanc40257f2003-11-14 17:34:38 +000015 <li><a href="#what">What is this?</a></li>
Chris Lattner66f24702003-02-06 19:39:21 +000016 <li><a href="#improving">Improving the current system</a>
17 <ol>
Misha Brukmanc40257f2003-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 Lattner66f24702003-02-06 19:39:21 +000024
25 <li><a href="#new">Adding new capabilities to LLVM</a>
26 <ol>
Misha Brukmanc40257f2003-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 Lattner66f24702003-02-06 19:39:21 +000033</ul>
34
Chris Lattner66f24702003-02-06 19:39:21 +000035<!-- *********************************************************************** -->
Misha Brukmanc40257f2003-11-14 17:34:38 +000036<div class="doc_section">
37 <a name="what">What is this?</a>
38</div>
Chris Lattner66f24702003-02-06 19:39:21 +000039<!-- *********************************************************************** -->
40
Misha Brukmanc40257f2003-11-14 17:34:38 +000041<div class="doc_text">
Chris Lattner66f24702003-02-06 19:39:21 +000042
Misha Brukmanc40257f2003-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 Lattner66f24702003-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
Alkis Evlogimenos9d088182004-03-11 02:50:35 +000055or 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
59filed as unassigned enhancements in our <a href="http://llvm.cs.uiuc.edu/bugs/">
60LLVM bug tracker</a>. Here is the current list:
61</p>
62
63<iframe src="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" frameborder="1" align="center" width="100%" height="400">
64</iframe>
Chris Lattner66f24702003-02-06 19:39:21 +000065
Misha Brukmanc40257f2003-11-14 17:34:38 +000066</div>
Chris Lattner66f24702003-02-06 19:39:21 +000067
68<!-- *********************************************************************** -->
Misha Brukmanc40257f2003-11-14 17:34:38 +000069<div class="doc_section">
70 <a name="improving">Improving the current system</a>
71</div>
Chris Lattner66f24702003-02-06 19:39:21 +000072<!-- *********************************************************************** -->
73
Misha Brukmanc40257f2003-11-14 17:34:38 +000074<div class="doc_text">
75
76<p>Improvements to the current infrastructure are always very welcome and tend
77to be fairly straight-forward to implement. Here are some of the key areas that
78can use improvement...</p>
79
80</div>
Chris Lattner66f24702003-02-06 19:39:21 +000081
82<!-- ======================================================================= -->
Misha Brukmanc40257f2003-11-14 17:34:38 +000083<div class="doc_subsection">
84 <a name="glibc">Port glibc to LLVM</a>
85</div>
Chris Lattner66f24702003-02-06 19:39:21 +000086
Misha Brukmanc40257f2003-11-14 17:34:38 +000087<div class="doc_text">
88
89<p>It would be very useful to <a
Chris Lattner66f24702003-02-06 19:39:21 +000090href="http://www.gnu.org/software/libc/porting.html">port</a> <a
91href="http://www.gnu.org/software/glibc/">glibc</a> to LLVM. This would allow a
92variety of interprocedural algorithms to be much more effective in the face of
93library calls. The most important pieces to port are things like the string
94library and the <tt>stdio</tt> related functions... low-level system calls like
Misha Brukmanc40257f2003-11-14 17:34:38 +000095'<tt>read</tt>' should stay unimplemented in LLVM.</p>
Chris Lattner66f24702003-02-06 19:39:21 +000096
Misha Brukmanc40257f2003-11-14 17:34:38 +000097</div>
Chris Lattner66f24702003-02-06 19:39:21 +000098
99<!-- ======================================================================= -->
Misha Brukmanc40257f2003-11-14 17:34:38 +0000100<div class="doc_subsection">
101 <a name="NightlyTest">Improving the Nightly Tester</a>
102</div>
Chris Lattner66f24702003-02-06 19:39:21 +0000103
Misha Brukmanc40257f2003-11-14 17:34:38 +0000104<div class="doc_text">
105
106<p>The <a href="/testresults/">Nightly Tester</a> is a simple perl script
107(located in <tt>utils/NightlyTest.pl</tt>) which runs every night to generate a
108daily report. It could use the following improvements:</p>
Chris Lattner66f24702003-02-06 19:39:21 +0000109
110<ol>
Chris Lattner66f24702003-02-06 19:39:21 +0000111<li>Regression tests - We should run the regression tests in addition to the
Misha Brukmanc40257f2003-11-14 17:34:38 +0000112 program tests...</li>
113</ol>
Chris Lattner66f24702003-02-06 19:39:21 +0000114
Misha Brukmanc40257f2003-11-14 17:34:38 +0000115</div>
Chris Lattnerafc83ba2003-02-07 19:25:35 +0000116
Chris Lattner66f24702003-02-06 19:39:21 +0000117<!-- ======================================================================= -->
Misha Brukmanc40257f2003-11-14 17:34:38 +0000118<div class="doc_subsection">
119 <a name="programs">Compile programs with the LLVM Compiler</a>
120</div>
Chris Lattner66f24702003-02-06 19:39:21 +0000121
Misha Brukmanc40257f2003-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 Lattner66f24702003-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 Lattnerafc83ba2003-02-07 19:25:35 +0000130into CVS and the automated tester can use it to track progress of the
Misha Brukmanc40257f2003-11-14 17:34:38 +0000131compiler.</p>
Chris Lattnerafc83ba2003-02-07 19:25:35 +0000132
Misha Brukmanc40257f2003-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 Lattner66f24702003-02-06 19:39:21 +0000135
Misha Brukmanc40257f2003-11-14 17:34:38 +0000136</div>
Chris Lattner66f24702003-02-06 19:39:21 +0000137
138<!-- ======================================================================= -->
Misha Brukmanc40257f2003-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 Lattner66f24702003-02-06 19:39:21 +0000144
145<ol>
Misha Brukmanc40257f2003-11-14 17:34:38 +0000146<li>Add support for platform-independent prefetch support. The GCC <a
Chris Lattner66f24702003-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 Brukmanc40257f2003-11-14 17:34:38 +0000149 processors.</li>
150
Chris Lattner66f24702003-02-06 19:39:21 +0000151</ol>
152
Misha Brukmanc40257f2003-11-14 17:34:38 +0000153</div>
Chris Lattner66f24702003-02-06 19:39:21 +0000154
155<!-- ======================================================================= -->
Misha Brukmanc40257f2003-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 Lattner66f24702003-02-06 19:39:21 +0000161
162<ol>
Chris Lattner94809ee2003-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 Brukmanc40257f2003-11-14 17:34:38 +0000166 <tt>gccld</tt>.</li>
Chris Lattner94809ee2003-05-06 20:47:11 +0000167
Misha Brukmanc40257f2003-11-14 17:34:38 +0000168<li>Rework the PassManager to be more flexible</li>
169
Chris Lattner66f24702003-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 Brukmanc40257f2003-11-14 17:34:38 +0000177Irreducible Loops</a>.</li>
178
Chris Lattner66f24702003-02-06 19:39:21 +0000179</ol>
180
Misha Brukmanc40257f2003-11-14 17:34:38 +0000181</div>
Chris Lattner66f24702003-02-06 19:39:21 +0000182
183<!-- *********************************************************************** -->
Misha Brukmanc40257f2003-11-14 17:34:38 +0000184<div class="doc_section">
185 <a name="new">Adding new capabilities to LLVM</a>
186</div>
Chris Lattner66f24702003-02-06 19:39:21 +0000187<!-- *********************************************************************** -->
188
Misha Brukmanc40257f2003-11-14 17:34:38 +0000189<div class="doc_text">
190
191<p>Sometimes creating new things is more fun that improving existing things.
192These projects tend to be more involved and perhaps require more work, but can
193also be very rewarding.</p>
194
195</div>
Chris Lattner66f24702003-02-06 19:39:21 +0000196
197<!-- ======================================================================= -->
Misha Brukmanc40257f2003-11-14 17:34:38 +0000198<div class="doc_subsection">
199 <a name="pointeranalysis">Pointer and Alias Analysis</a>
200</div>
Chris Lattner66f24702003-02-06 19:39:21 +0000201
Misha Brukmanc40257f2003-11-14 17:34:38 +0000202<div class="doc_text">
203
204<p>We have a <a href="AliasAnalysis.html">strong base for development</a> of
205both pointer analysis based optimizations as well as pointer analyses
206themselves. It seems natural to want to take advantage of this...</p>
Chris Lattner66f24702003-02-06 19:39:21 +0000207
208<ol>
209<li>Implement a flow-sensitive context-sensitive alias analysis algorithm<br>
210 - Pick one of the somewhat efficient algorithms, but strive for maximum
Misha Brukmanc40257f2003-11-14 17:34:38 +0000211 precision</li>
212
Chris Lattner0b3def42003-06-25 14:31:06 +0000213<li>Implement a flow-sensitive context-insensitive alias analysis algorithm<br>
Misha Brukmanc40257f2003-11-14 17:34:38 +0000214 - Just an efficient local algorithm perhaps?</li>
Chris Lattner66f24702003-02-06 19:39:21 +0000215
216<li>Implement an interface to update analyses in response to common code motion
Misha Brukmanc40257f2003-11-14 17:34:38 +0000217 transformations</li>
218
219<li>Implement alias-analysis-based optimizations:
Chris Lattner66f24702003-02-06 19:39:21 +0000220 <ul>
Misha Brukmanc40257f2003-11-14 17:34:38 +0000221 <li>Dead store elimination</li>
222 <li>...</li>
223 </ul></li>
Chris Lattner66f24702003-02-06 19:39:21 +0000224</ol>
225
Misha Brukmanc40257f2003-11-14 17:34:38 +0000226</div>
Chris Lattner66f24702003-02-06 19:39:21 +0000227
Misha Brukmanc40257f2003-11-14 17:34:38 +0000228<!-- ======================================================================= -->
229<div class="doc_subsection">
230 <a name="profileguided">Profile Guided Optimization</a>
231</div>
232
233<div class="doc_text">
234
Chris Lattnerd6e1b282004-03-08 22:29:35 +0000235<p>We now have a unified infrastructure for writing profile-guided
236transformations, which will work either at offline-compile-time or in the JIT,
237but we don't have many transformations. We would welcome new profile-guided
238transformations as well as improvements to the current profiling system.
239</p>
Chris Lattner66f24702003-02-06 19:39:21 +0000240
Misha Brukmanc40257f2003-11-14 17:34:38 +0000241<p>Ideas for profile guided transformations:</p>
Chris Lattner66f24702003-02-06 19:39:21 +0000242
243<ol>
Misha Brukmanc40257f2003-11-14 17:34:38 +0000244<li>Superblock formation (with many optimizations)</li>
245<li>Loop unrolling/peeling</li>
246<li>Profile directed inlining</li>
247<li>Code layout</li>
248<li>...</li>
249</ol>
Chris Lattner66f24702003-02-06 19:39:21 +0000250
Chris Lattnerd6e1b282004-03-08 22:29:35 +0000251<p>Improvements to the existing support:</p>
252
253<ol>
254<li>The current block and edge profiling code that gets inserted is very simple
255and inefficient. Through the use of control-dependence information, many fewer
256counters could be inserted into the code. Also, if the execution count of a
257loop is known to be a compile-time or runtime constant, all of the counters in
258the loop could be avoided.</li>
259
260<li>You could implement one of the "static profiling" algorithms which analyze a
261piece of code an make educated guesses about the relative execution frequencies
262of various parts of the code.</li>
263
264<li>You could add path profiling support, or adapt the existing LLVM path
265profiling code to work with the generic profiling interfaces.</li>
266</ol>
267
Misha Brukmanc40257f2003-11-14 17:34:38 +0000268</div>
Chris Lattner66f24702003-02-06 19:39:21 +0000269
270<!-- ======================================================================= -->
Misha Brukmanc40257f2003-11-14 17:34:38 +0000271<div class="doc_subsection">
272 <a name="xforms">New Transformations and Analyses</a>
273</div>
274
275<div class="doc_text">
Chris Lattner66f24702003-02-06 19:39:21 +0000276
277<ol>
278<li>Implement a Dependence Analysis Infrastructure<br>
Misha Brukmanc40257f2003-11-14 17:34:38 +0000279 - Design some way to represent and query dep analysis</li>
Misha Brukmanc40257f2003-11-14 17:34:38 +0000280<li>Implement a strength reduction pass</li>
281<li>Value range propagation pass</li>
282<li>Implement an unswitching pass</li>
283<li>Write a loop unroller, with a simple heuristic for when to unroll</li>
Chris Lattner66f24702003-02-06 19:39:21 +0000284</ol>
285
Misha Brukmanc40257f2003-11-14 17:34:38 +0000286</div>
287
Chris Lattner66f24702003-02-06 19:39:21 +0000288<!-- ======================================================================= -->
Misha Brukmanc40257f2003-11-14 17:34:38 +0000289<div class="doc_section">
290 <a name="x86be">X86 Back-end Improvements</a>
291</div>
292
293<div class="doc_text">
Chris Lattner66f24702003-02-06 19:39:21 +0000294
295<ol>
Misha Brukmanc40257f2003-11-14 17:34:38 +0000296<li>Implement a global register allocator</li>
297<li>Implement a better instruction selector</li>
Chris Lattner50645812003-04-28 03:42:31 +0000298<li>Implement support for the "switch" instruction without requiring the
Misha Brukmanc40257f2003-11-14 17:34:38 +0000299 lower-switches pass.</li>
Chris Lattner66f24702003-02-06 19:39:21 +0000300</ol>
301
Misha Brukmanc40257f2003-11-14 17:34:38 +0000302</div>
303
Chris Lattner66f24702003-02-06 19:39:21 +0000304<!-- ======================================================================= -->
Misha Brukmanfff0ac82004-03-11 21:26:29 +0000305<div class="doc_section">
Misha Brukmanc40257f2003-11-14 17:34:38 +0000306 <a name="misc_new">Miscellaneous Additions</a>
307</div>
308
309<div class="doc_text">
Chris Lattner66f24702003-02-06 19:39:21 +0000310
311<ol>
Misha Brukmanc40257f2003-11-14 17:34:38 +0000312<li>Write a new frontend for some language (Java? OCaml? Forth?)</li>
313<li>Write a new backend for a target (IA64? MIPS? MMIX?)</li>
Brian Gaeke53d25132004-03-10 19:15:50 +0000314<li>Random test vector generator: Use a C grammar to generate random C code;
315run it through llvm-gcc, then run a random set of passes on it using opt.
316Try to crash opt. When opt crashes, use bugpoint to reduce the test case and
317mail the result to yourself. Repeat ad infinitum.</li>
Misha Brukman12f1edd2004-03-10 19:22:29 +0000318<li>Design a simple, recognizable logo.</li>
Chris Lattner66f24702003-02-06 19:39:21 +0000319</ol>
320
Misha Brukmanc40257f2003-11-14 17:34:38 +0000321</div>
Chris Lattner66f24702003-02-06 19:39:21 +0000322
323<!-- *********************************************************************** -->
Chris Lattner66f24702003-02-06 19:39:21 +0000324
Misha Brukmanc40257f2003-11-14 17:34:38 +0000325<hr>
326<div class="doc_footer">
327 <address><a href="mailto:sabre@nondot.org">Chris Lattner</a></address>
328 <a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a>
329 <br>
330 Last modified: $Date$
331</div>
332
333</body>
334</html>