blob: 5f648374d1a5539e5340adb6bfbc89b848a3314c [file] [log] [blame]
Chris Lattner66f24702003-02-06 19:39:21 +00001<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html><head><title>Open LLVM Projects</title></head>
3
4<body bgcolor=white>
5<center><h1><font size=7>Open LLVM Projects</font></h1></center>
6
7<ul>
8 <li><a href="#what">What is this?</a>
9 <li><a href="#improving">Improving the current system</a>
10 <ol>
11 <li><a href="#glibc">Port glibc to LLVM</a>
12 <li><a href="#NightlyTest">Improving the Nightly Tester</a>
13 <li><a href="#programs">Compile programs with the LLVM Compiler</a>
14 <li><a href="#llvm_ir">Extend the LLVM intermediate representation</a>
15 <li><a href="#misc_imp">Miscellaneous Improvements</a>
16 </ol>
17
18 <li><a href="#new">Adding new capabilities to LLVM</a>
19 <ol>
20 <li><a href="#pointeranalysis">Pointer and Alias Analysis</a>
21 <li><a href="#profileguided">Profile Guided Optimization</a>
22 <li><a href="#xforms">New Transformations and Analyses</a>
23 <li><a href="#x86be">X86 Back-end Improvements</a>
24 <li><a href="#misc_new">Miscellaneous Additions</a>
25 </ol>
26</ul>
27
28<br><br>
29
30<!-- *********************************************************************** -->
31<table width="100%" bgcolor="#330077" border=0 cellpadding=4 cellspacing=0>
32<tr><td align=center><font color="#EEEEFF" size=+2 face="Georgia,Palatino"><b>
33<a name="what">What is this?
34</b></font></td></tr></table><ul>
35<!-- *********************************************************************** -->
36
37This document is meant to be a sort of "big TODO list" for LLVM. Each project
38in this document is something that would be useful for LLVM to have, and would
39also be a great way to get familiar with the system. Some of these projects are
40small and self-contained, which may be implemented in a couple of days, others
41are larger. Several of these projects may lead to interesting research projects
42in their own right. In any case, we welcome all contributions.<p>
43
44If you are thinking about tackling one of these projects, please send a mail to
45the <a href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM
46Developer's</a> mailing list, so that we know the project is being worked on.
47Additionally this is a good way to get more information about a specific project
48or to suggest other projects to add to this page.<p>
49
50
51<!-- *********************************************************************** -->
52</ul><table width="100%" bgcolor="#330077" border=0 cellpadding=4 cellspacing=0>
53<tr><td align=center><font color="#EEEEFF" size=+2 face="Georgia,Palatino"><b>
54<a name="improving">Improving the current system
55</b></font></td></tr></table><ul>
56<!-- *********************************************************************** -->
57
58Improvements to the current infrastructure are always very welcome and tend to
59be fairly straight-forward to implement. Here are some of the key areas that
60can use improvement...<p>
61
62<!-- ======================================================================= -->
63</ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0>
64<tr><td>&nbsp;</td><td width=100%>&nbsp;
65<font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b>
66<a name="glibc">Port glibc to LLVM
67</b></font></td></tr></table><ul>
68
69It would be very useful to <a
70href="http://www.gnu.org/software/libc/porting.html">port</a> <a
71href="http://www.gnu.org/software/glibc/">glibc</a> to LLVM. This would allow a
72variety of interprocedural algorithms to be much more effective in the face of
73library calls. The most important pieces to port are things like the string
74library and the <tt>stdio</tt> related functions... low-level system calls like
75'<tt>read</tt>' should stay unimplemented in LLVM.<p>
76
77
78<!-- ======================================================================= -->
79</ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0>
80<tr><td>&nbsp;</td><td width=100%>&nbsp;
81<font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b>
82<a name="NightlyTest">Improving the Nightly Tester
83</b></font></td></tr></table><ul>
84
85The <a href="/testresults/">Nightly Tester</a> is a simple perl script (located
86in utils/NightlyTest.pl) which runs every night to generate a daily report. It
87could use the following improvements:<p>
88
89<ol>
90<li>Olden timings - Time the compilation and execution times for the Olden
91 benchmark suite, keeping track of these values over time.
92
93<li>Graphs - It would be great to have gnuplot graphs to keep track of how the
94 tree is changing over time. We already gather a several statistics, it
Misha Brukman7eb05a12003-08-18 14:43:39 +000095 just necessary to add the script-fu to gnuplotize it.
Chris Lattner66f24702003-02-06 19:39:21 +000096
97<li>Regression tests - We should run the regression tests in addition to the
98 program tests...
99</ol><p>
100
Chris Lattnerafc83ba2003-02-07 19:25:35 +0000101
Chris Lattner66f24702003-02-06 19:39:21 +0000102<!-- ======================================================================= -->
103</ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0>
104<tr><td>&nbsp;</td><td width=100%>&nbsp;
105<font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b>
106<a name="programs">Compile programs with the LLVM Compiler
107</b></font></td></tr></table><ul>
108
109We are always looking for new testcases and benchmarks for use with LLVM. In
110particular, it is useful to try compiling your favorite C source code with LLVM.
111If it doesn't compile, try to figure out why or report it to the <a
112href="http://mail.cs.uiuc.edu/pipermail/llvmbugs/">llvm-bugs</a> list. If you
113get the program to compile, it would be extremely useful to convert the build
114system to be compatible with the LLVM Programs testsuite so that we can check it
Chris Lattnerafc83ba2003-02-07 19:25:35 +0000115into CVS and the automated tester can use it to track progress of the
116compiler.<p>
117
118When testing a code, try running it with a variety of optimizations, and with
119all the back-ends: CBE, llc, and lli.<p>
Chris Lattner66f24702003-02-06 19:39:21 +0000120
121
122<!-- ======================================================================= -->
123</ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0>
124<tr><td>&nbsp;</td><td width=100%>&nbsp;
125<font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b>
126<a name="llvm_ir">Extend the LLVM intermediate representation
127</b></font></td></tr></table><ul>
128
129<ol>
Chris Lattner66f24702003-02-06 19:39:21 +0000130<li>Add a new conditional move instruction: <tt>X = select bool Cond, Y, Z</tt>
Misha Brukman2645cf62003-03-08 23:59:05 +0000131<li>Add support for platform independent prefetch support. The GCC <a
Chris Lattner66f24702003-02-06 19:39:21 +0000132 href="http://gcc.gnu.org/projects/prefetch.html">prefetch project</a> page
133 has a good survey of the prefetching capabilities of a variety of modern
134 processors.
135</ol>
136
137
138<!-- ======================================================================= -->
139</ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0>
140<tr><td>&nbsp;</td><td width=100%>&nbsp;
141<font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b>
142<a name="misc_imp">Miscellaneous Improvements
143</b></font></td></tr></table><ul>
144
145<ol>
Chris Lattner94809ee2003-05-06 20:47:11 +0000146<li>Someone needs to look into getting the <tt>ranlib</tt> tool to index LLVM
147 bytecode files, so that linking in .a files is not hideously slow. They
148 would also then have to implement the reader for this index in
149 <tt>gccld</tt>.<br>
150
Chris Lattnerdf089a12003-10-01 21:49:55 +0000151<li>Improve the efficiency of the bytecode loader/writer<br>
152<li>Extend the FunctionPassManager to use a ModuleProvider to stream functions
153 in on demand. This would improve the efficiency of the JIT.
Chris Lattner50645812003-04-28 03:42:31 +0000154<li>Rework the PassManager to be more flexible
Chris Lattner66f24702003-02-06 19:39:21 +0000155<li>Some transformations and analyses only work on reducible flow graphs. It
156would be nice to have a transformation which could be "required" by these passes
157which makes irreducible graphs reducible. This can easily be accomplished
158through code duplication. See <a
159href="http://citeseer.nj.nec.com/janssen97making.html">Making Graphs Reducible
160with Controlled Node Splitting</a> and perhaps <a
161href="http://doi.acm.org/10.1145/262004.262005">Nesting of Reducible and
162Irreducible Loops</a>.
163</ol>
164
165
166<!-- *********************************************************************** -->
167</ul><table width="100%" bgcolor="#330077" border=0 cellpadding=4 cellspacing=0>
168<tr><td align=center><font color="#EEEEFF" size=+2 face="Georgia,Palatino"><b>
169<a name="new">Adding new capabilities to LLVM
170</b></font></td></tr></table><ul>
171<!-- *********************************************************************** -->
172
173Sometimes creating new things is more fun that improving existing things. These
174projects tend to be more involved and perhaps require more work, but can also be
175very rewarding.<p>
176
177<!-- ======================================================================= -->
178</ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0>
179<tr><td>&nbsp;</td><td width=100%>&nbsp;
180<font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b>
181<a name="pointeranalysis">Pointer and Alias Analysis
182</b></font></td></tr></table><ul>
183
Chris Lattner4cd484f2003-07-25 18:05:38 +0000184We have a <a href="AliasAnalysis.html">strong base for development</a> of both
185pointer analysis based optimizations as well as pointer analyses themselves. It
186seems natural to want to take advantage of this...<p>
Chris Lattner66f24702003-02-06 19:39:21 +0000187
188<ol>
189<li>Implement a flow-sensitive context-sensitive alias analysis algorithm<br>
190 - Pick one of the somewhat efficient algorithms, but strive for maximum
191 precision
Chris Lattner0b3def42003-06-25 14:31:06 +0000192<li>Implement a flow-sensitive context-insensitive alias analysis algorithm<br>
Chris Lattner66f24702003-02-06 19:39:21 +0000193 - Just an efficient local algorithm perhaps?
194
195<li>Implement an interface to update analyses in response to common code motion
196 transformations
197<li>Implement alias analysis based optimizations:
198 <ul>
199 <li>Dead store elimination
Chris Lattner66f24702003-02-06 19:39:21 +0000200 </ul>
201</ol>
202
203<!-- ======================================================================= -->
204</ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0>
205<tr><td>&nbsp;</td><td width=100%>&nbsp;
206<font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b>
207<a name="profileguided">Profile Guided Optimization
208</b></font></td></tr></table><ul>
209
210We are getting to the point where we really need a unified infrastructure for
211profile guided optimizations. It would be wonderful to be able to write profile
212guided transformations which can be performed either at static compile time
213(compile time or offline optimization time) or at runtime in a JIT type setup.
214The LLVM transformation itself shouldn't need to know how it is being used.<p>
215
216Ideas for profile guided transformations:<p>
217
218<ol>
219<li>Superblock formation (with many optimizations)
220<li>Loop unrolling/peeling
221<li>Profile directed inlining
222<li>Code layout
223<li>...
224</ol><p>
225
226
227<!-- ======================================================================= -->
228</ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0>
229<tr><td>&nbsp;</td><td width=100%>&nbsp;
230<font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b>
231<a name="xforms">New Transformations and Analyses
232</b></font></td></tr></table><ul>
233
234<ol>
235<li>Implement a Dependence Analysis Infrastructure<br>
236 - Design some way to represent and query dep analysis
237<li>Implement a faster Dominator Set Construction Algorithm<br>
238 - A linear time or nearly so algorithm
239<li>Implement a strength reduction pass
240<li>Value range propagation pass
Chris Lattner66f24702003-02-06 19:39:21 +0000241<li>Implement an unswitching pass
Chris Lattnera0de5c82003-08-06 15:40:37 +0000242<li>Write a loop unroller, with a simple heuristic for when to unroll
Chris Lattner66f24702003-02-06 19:39:21 +0000243</ol>
244
245<!-- ======================================================================= -->
246</ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0>
247<tr><td>&nbsp;</td><td width=100%>&nbsp;
248<font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b>
249<a name="x86be">X86 Back-end Improvements
250</b></font></td></tr></table><ul>
251
252<ol>
253<li>Implement a global register allocator
254<li>Implement a better instruction selector
Chris Lattner50645812003-04-28 03:42:31 +0000255<li>Implement support for the "switch" instruction without requiring the
256 lower-switches pass.
Chris Lattner66f24702003-02-06 19:39:21 +0000257</ol>
258
259<!-- ======================================================================= -->
260</ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0>
261<tr><td>&nbsp;</td><td width=100%>&nbsp;
262<font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b>
263<a name="misc_new">Miscellaneous Additions
264</b></font></td></tr></table><ul>
265
266<ol>
267<li>Write a new frontend for some language (Java? OCaml? Forth?)
268<li>Write a new backend for a target (IA64? MIPS? MMIX?)
269</ol>
270
271
272<!-- *********************************************************************** -->
273</ul>
274<!-- *********************************************************************** -->
275
276<hr><font size-1>
277<address><a href="mailto:sabre@nondot.org">Chris Lattner</a></address>
278<!-- Created: Tue Aug 6 15:00:33 CDT 2002 -->
279<!-- hhmts start -->
Chris Lattnerdf089a12003-10-01 21:49:55 +0000280Last modified: Wed Oct 1 16:48:54 CDT 2003
Chris Lattner66f24702003-02-06 19:39:21 +0000281<!-- hhmts end -->
282</font></body></html>