blob: fe854db014a52ed8f2bdf5a954bcfd2a04e0cc9e [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
Alkis Evlogimenos45ff0272004-03-11 02:50:35 +000055or to suggest other projects to add to this page.
56</p>
57
Misha Brukman836db502004-05-12 18:57:54 +000058<p>The projects in this page are open-ended. More specific projects are
59filed as unassigned enhancements in the <a href="http://llvm.cs.uiuc.edu/bugs/">
Alkis Evlogimenos3ca836a2004-05-23 11:10:55 +000060LLVM bug tracker</a>. Here is the current list:
61<object width="100%" height="400" data="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" /></p>
Chris Lattnerb7131092003-02-06 19:39:21 +000062
Misha Brukman076438b2003-11-14 17:34:38 +000063</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000064
65<!-- *********************************************************************** -->
Misha Brukman076438b2003-11-14 17:34:38 +000066<div class="doc_section">
67 <a name="improving">Improving the current system</a>
68</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000069<!-- *********************************************************************** -->
70
Misha Brukman076438b2003-11-14 17:34:38 +000071<div class="doc_text">
72
73<p>Improvements to the current infrastructure are always very welcome and tend
74to be fairly straight-forward to implement. Here are some of the key areas that
75can use improvement...</p>
76
77</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000078
79<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +000080<div class="doc_subsection">
81 <a name="glibc">Port glibc to LLVM</a>
82</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000083
Misha Brukman076438b2003-11-14 17:34:38 +000084<div class="doc_text">
85
86<p>It would be very useful to <a
Chris Lattnerb7131092003-02-06 19:39:21 +000087href="http://www.gnu.org/software/libc/porting.html">port</a> <a
88href="http://www.gnu.org/software/glibc/">glibc</a> to LLVM. This would allow a
89variety of interprocedural algorithms to be much more effective in the face of
90library calls. The most important pieces to port are things like the string
91library and the <tt>stdio</tt> related functions... low-level system calls like
Misha Brukman076438b2003-11-14 17:34:38 +000092'<tt>read</tt>' should stay unimplemented in LLVM.</p>
Chris Lattnerb7131092003-02-06 19:39:21 +000093
Misha Brukman076438b2003-11-14 17:34:38 +000094</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000095
96<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +000097<div class="doc_subsection">
98 <a name="NightlyTest">Improving the Nightly Tester</a>
99</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000100
Misha Brukman076438b2003-11-14 17:34:38 +0000101<div class="doc_text">
102
103<p>The <a href="/testresults/">Nightly Tester</a> is a simple perl script
104(located in <tt>utils/NightlyTest.pl</tt>) which runs every night to generate a
105daily report. It could use the following improvements:</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000106
107<ol>
Chris Lattnerb7131092003-02-06 19:39:21 +0000108<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<li>Add support for platform-independent prefetch support. The GCC <a
Chris Lattnerb7131092003-02-06 19:39:21 +0000144 href="http://gcc.gnu.org/projects/prefetch.html">prefetch project</a> page
145 has a good survey of the prefetching capabilities of a variety of modern
Misha Brukman076438b2003-11-14 17:34:38 +0000146 processors.</li>
147
Chris Lattnerb7131092003-02-06 19:39:21 +0000148</ol>
149
Misha Brukman076438b2003-11-14 17:34:38 +0000150</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000151
152<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000153<div class="doc_subsection">
154 <a name="misc_imp">Miscellaneous Improvements</a>
155</div>
156
157<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000158
159<ol>
Chris Lattner8bde96f2003-05-06 20:47:11 +0000160<li>Someone needs to look into getting the <tt>ranlib</tt> tool to index LLVM
161 bytecode files, so that linking in .a files is not hideously slow. They
162 would also then have to implement the reader for this index in
Misha Brukman076438b2003-11-14 17:34:38 +0000163 <tt>gccld</tt>.</li>
Chris Lattner8bde96f2003-05-06 20:47:11 +0000164
Misha Brukman076438b2003-11-14 17:34:38 +0000165<li>Rework the PassManager to be more flexible</li>
166
Chris Lattnerb7131092003-02-06 19:39:21 +0000167<li>Some transformations and analyses only work on reducible flow graphs. It
168would be nice to have a transformation which could be "required" by these passes
169which makes irreducible graphs reducible. This can easily be accomplished
170through code duplication. See <a
171href="http://citeseer.nj.nec.com/janssen97making.html">Making Graphs Reducible
172with Controlled Node Splitting</a> and perhaps <a
173href="http://doi.acm.org/10.1145/262004.262005">Nesting of Reducible and
Misha Brukman076438b2003-11-14 17:34:38 +0000174Irreducible Loops</a>.</li>
175
Chris Lattnerb7131092003-02-06 19:39:21 +0000176</ol>
177
Misha Brukman076438b2003-11-14 17:34:38 +0000178</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000179
180<!-- *********************************************************************** -->
Misha Brukman076438b2003-11-14 17:34:38 +0000181<div class="doc_section">
182 <a name="new">Adding new capabilities to LLVM</a>
183</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000184<!-- *********************************************************************** -->
185
Misha Brukman076438b2003-11-14 17:34:38 +0000186<div class="doc_text">
187
Brian Gaeke2d261352004-04-07 15:31:23 +0000188<p>Sometimes creating new things is more fun than improving existing things.
Misha Brukman076438b2003-11-14 17:34:38 +0000189These projects tend to be more involved and perhaps require more work, but can
190also be very rewarding.</p>
191
192</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000193
194<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000195<div class="doc_subsection">
196 <a name="pointeranalysis">Pointer and Alias Analysis</a>
197</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000198
Misha Brukman076438b2003-11-14 17:34:38 +0000199<div class="doc_text">
200
201<p>We have a <a href="AliasAnalysis.html">strong base for development</a> of
202both pointer analysis based optimizations as well as pointer analyses
203themselves. It seems natural to want to take advantage of this...</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000204
205<ol>
206<li>Implement a flow-sensitive context-sensitive alias analysis algorithm<br>
207 - Pick one of the somewhat efficient algorithms, but strive for maximum
Misha Brukman076438b2003-11-14 17:34:38 +0000208 precision</li>
209
Chris Lattnerf56703b2003-06-25 14:31:06 +0000210<li>Implement a flow-sensitive context-insensitive alias analysis algorithm<br>
Misha Brukman076438b2003-11-14 17:34:38 +0000211 - Just an efficient local algorithm perhaps?</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000212
213<li>Implement an interface to update analyses in response to common code motion
Misha Brukman076438b2003-11-14 17:34:38 +0000214 transformations</li>
215
216<li>Implement alias-analysis-based optimizations:
Chris Lattnerb7131092003-02-06 19:39:21 +0000217 <ul>
Misha Brukman076438b2003-11-14 17:34:38 +0000218 <li>Dead store elimination</li>
219 <li>...</li>
220 </ul></li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000221</ol>
222
Misha Brukman076438b2003-11-14 17:34:38 +0000223</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000224
Misha Brukman076438b2003-11-14 17:34:38 +0000225<!-- ======================================================================= -->
226<div class="doc_subsection">
227 <a name="profileguided">Profile Guided Optimization</a>
228</div>
229
230<div class="doc_text">
231
Chris Lattnera5422e42004-03-08 22:29:35 +0000232<p>We now have a unified infrastructure for writing profile-guided
233transformations, which will work either at offline-compile-time or in the JIT,
234but we don't have many transformations. We would welcome new profile-guided
235transformations as well as improvements to the current profiling system.
236</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000237
Misha Brukman076438b2003-11-14 17:34:38 +0000238<p>Ideas for profile guided transformations:</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000239
240<ol>
Misha Brukman076438b2003-11-14 17:34:38 +0000241<li>Superblock formation (with many optimizations)</li>
242<li>Loop unrolling/peeling</li>
243<li>Profile directed inlining</li>
244<li>Code layout</li>
245<li>...</li>
246</ol>
Chris Lattnerb7131092003-02-06 19:39:21 +0000247
Chris Lattnera5422e42004-03-08 22:29:35 +0000248<p>Improvements to the existing support:</p>
249
250<ol>
251<li>The current block and edge profiling code that gets inserted is very simple
252and inefficient. Through the use of control-dependence information, many fewer
253counters could be inserted into the code. Also, if the execution count of a
254loop is known to be a compile-time or runtime constant, all of the counters in
255the loop could be avoided.</li>
256
257<li>You could implement one of the "static profiling" algorithms which analyze a
258piece of code an make educated guesses about the relative execution frequencies
259of various parts of the code.</li>
260
261<li>You could add path profiling support, or adapt the existing LLVM path
262profiling code to work with the generic profiling interfaces.</li>
263</ol>
264
Misha Brukman076438b2003-11-14 17:34:38 +0000265</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000266
267<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000268<div class="doc_subsection">
269 <a name="xforms">New Transformations and Analyses</a>
270</div>
271
272<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000273
274<ol>
275<li>Implement a Dependence Analysis Infrastructure<br>
Misha Brukman076438b2003-11-14 17:34:38 +0000276 - Design some way to represent and query dep analysis</li>
Misha Brukman076438b2003-11-14 17:34:38 +0000277<li>Implement a strength reduction pass</li>
278<li>Value range propagation pass</li>
279<li>Implement an unswitching pass</li>
280<li>Write a loop unroller, with a simple heuristic for when to unroll</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000281</ol>
282
Misha Brukman076438b2003-11-14 17:34:38 +0000283</div>
284
Chris Lattnerb7131092003-02-06 19:39:21 +0000285<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000286<div class="doc_section">
287 <a name="x86be">X86 Back-end Improvements</a>
288</div>
289
290<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000291
292<ol>
Misha Brukman076438b2003-11-14 17:34:38 +0000293<li>Implement a better instruction selector</li>
Chris Lattner99df25f2003-04-28 03:42:31 +0000294<li>Implement support for the "switch" instruction without requiring the
Misha Brukman076438b2003-11-14 17:34:38 +0000295 lower-switches pass.</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000296</ol>
297
Misha Brukman076438b2003-11-14 17:34:38 +0000298</div>
299
Chris Lattnerb7131092003-02-06 19:39:21 +0000300<!-- ======================================================================= -->
Misha Brukman3497ae92004-03-11 21:26:29 +0000301<div class="doc_section">
Misha Brukman076438b2003-11-14 17:34:38 +0000302 <a name="misc_new">Miscellaneous Additions</a>
303</div>
304
305<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000306
307<ol>
Brian Gaeke2d261352004-04-07 15:31:23 +0000308<li>Port the <A HREF="http://www-sop.inria.fr/mimosa/fp/Bigloo/">Bigloo</A>
309Scheme compiler, from Manuel Serrano at INRIA Sophia-Antipolis, to
310output LLVM bytecode. It seems that it can already output .NET
311bytecode, JVM bytecode, and C, so LLVM would ostensibly be another good
312candidate.</li>
313<li>Write a new frontend for some other language (Java? OCaml? Forth?)</li>
Misha Brukman076438b2003-11-14 17:34:38 +0000314<li>Write a new backend for a target (IA64? MIPS? MMIX?)</li>
Misha Brukmandec8cfb2004-04-16 16:55:30 +0000315<li>Write a disassembler for machine code that would use TableGen to output
316<tt>MachineInstr</tt>s for transformations, optimizations, etc.</li>
Brian Gaekea2245a32004-03-10 19:15:50 +0000317<li>Random test vector generator: Use a C grammar to generate random C code;
318run it through llvm-gcc, then run a random set of passes on it using opt.
319Try to crash opt. When opt crashes, use bugpoint to reduce the test case and
320mail the result to yourself. Repeat ad infinitum.</li>
Misha Brukman1a49bc82004-03-10 19:22:29 +0000321<li>Design a simple, recognizable logo.</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000322</ol>
323
Misha Brukman076438b2003-11-14 17:34:38 +0000324</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000325
326<!-- *********************************************************************** -->
Chris Lattnerb7131092003-02-06 19:39:21 +0000327
Misha Brukman076438b2003-11-14 17:34:38 +0000328<hr>
Misha Brukman836db502004-05-12 18:57:54 +0000329<address>
330 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
331 src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
332 <a href="http://validator.w3.org/check/referer"><img
333 src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
334
335 <a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
336 <a href="http://llvm.cs.uiuc.edu">LLVM Compiler Infrastructure</a><br>
Misha Brukman076438b2003-11-14 17:34:38 +0000337 Last modified: $Date$
Misha Brukman836db502004-05-12 18:57:54 +0000338</address>
Misha Brukman076438b2003-11-14 17:34:38 +0000339
340</body>
341</html>