blob: 56dcea8602a6686c15acde327a6aaf61ee1def6c [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>
Misha Brukman076438b2003-11-14 17:34:38 +000019 <li><a href="#programs">Compile programs with the LLVM Compiler</a></li>
20 <li><a href="#llvm_ir">Extend the LLVM intermediate representation</a></li>
21 <li><a href="#misc_imp">Miscellaneous Improvements</a></li>
22 </ol></li>
Chris Lattnerb7131092003-02-06 19:39:21 +000023
24 <li><a href="#new">Adding new capabilities to LLVM</a>
25 <ol>
Misha Brukman076438b2003-11-14 17:34:38 +000026 <li><a href="#pointeranalysis">Pointer and Alias Analysis</a></li>
27 <li><a href="#profileguided">Profile Guided Optimization</a></li>
28 <li><a href="#xforms">New Transformations and Analyses</a></li>
29 <li><a href="#x86be">X86 Back-end Improvements</a></li>
30 <li><a href="#misc_new">Miscellaneous Additions</a></li>
31 </ol></li>
Chris Lattnerb7131092003-02-06 19:39:21 +000032</ul>
33
Chris Lattner97d49ef2004-05-23 21:06:21 +000034<div class="doc_author">
35 <p>Written by the <a href="http://llvm.cs.uiuc.edu/">LLVM Team</a></p>
36</div>
37
38
Chris Lattnerb7131092003-02-06 19:39:21 +000039<!-- *********************************************************************** -->
Misha Brukman076438b2003-11-14 17:34:38 +000040<div class="doc_section">
41 <a name="what">What is this?</a>
42</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000043<!-- *********************************************************************** -->
44
Misha Brukman076438b2003-11-14 17:34:38 +000045<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +000046
Misha Brukman076438b2003-11-14 17:34:38 +000047<p>This document is meant to be a sort of "big TODO list" for LLVM. Each
48project in this document is something that would be useful for LLVM to have, and
49would also be a great way to get familiar with the system. Some of these
50projects are small and self-contained, which may be implemented in a couple of
51days, others are larger. Several of these projects may lead to interesting
52research projects in their own right. In any case, we welcome all
53contributions.</p>
54
55<p>If you are thinking about tackling one of these projects, please send a mail
56to the <a href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM
Chris Lattnerb7131092003-02-06 19:39:21 +000057Developer's</a> mailing list, so that we know the project is being worked on.
58Additionally this is a good way to get more information about a specific project
Alkis Evlogimenos45ff0272004-03-11 02:50:35 +000059or to suggest other projects to add to this page.
60</p>
61
Misha Brukman836db502004-05-12 18:57:54 +000062<p>The projects in this page are open-ended. More specific projects are
63filed as unassigned enhancements in the <a href="http://llvm.cs.uiuc.edu/bugs/">
Chris Lattner9f57b182004-05-23 20:29:35 +000064LLVM 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>
Chris Lattnerb7131092003-02-06 19:39:21 +000065
Misha Brukman076438b2003-11-14 17:34:38 +000066</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000067
68<!-- *********************************************************************** -->
Misha Brukman076438b2003-11-14 17:34:38 +000069<div class="doc_section">
70 <a name="improving">Improving the current system</a>
71</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000072<!-- *********************************************************************** -->
73
Misha Brukman076438b2003-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 Lattnerb7131092003-02-06 19:39:21 +000081
82<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +000083<div class="doc_subsection">
84 <a name="glibc">Port glibc to LLVM</a>
85</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000086
Misha Brukman076438b2003-11-14 17:34:38 +000087<div class="doc_text">
88
89<p>It would be very useful to <a
Chris Lattnerb7131092003-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 Brukman076438b2003-11-14 17:34:38 +000095'<tt>read</tt>' should stay unimplemented in LLVM.</p>
Chris Lattnerb7131092003-02-06 19:39:21 +000096
Misha Brukman076438b2003-11-14 17:34:38 +000097</div>
Chris Lattnerb7131092003-02-06 19:39:21 +000098
99<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000100<div class="doc_subsection">
Misha Brukman076438b2003-11-14 17:34:38 +0000101 <a name="programs">Compile programs with the LLVM Compiler</a>
102</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000103
Misha Brukman076438b2003-11-14 17:34:38 +0000104<div class="doc_text">
105
106<p>We are always looking for new testcases and benchmarks for use with LLVM. In
Chris Lattnerb7131092003-02-06 19:39:21 +0000107particular, it is useful to try compiling your favorite C source code with LLVM.
108If it doesn't compile, try to figure out why or report it to the <a
109href="http://mail.cs.uiuc.edu/pipermail/llvmbugs/">llvm-bugs</a> list. If you
110get the program to compile, it would be extremely useful to convert the build
111system to be compatible with the LLVM Programs testsuite so that we can check it
Chris Lattner1b360042003-02-07 19:25:35 +0000112into CVS and the automated tester can use it to track progress of the
Misha Brukman076438b2003-11-14 17:34:38 +0000113compiler.</p>
Chris Lattner1b360042003-02-07 19:25:35 +0000114
Misha Brukman076438b2003-11-14 17:34:38 +0000115<p>When testing a code, try running it with a variety of optimizations, and with
116all the back-ends: CBE, llc, and lli.</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000117
Misha Brukman076438b2003-11-14 17:34:38 +0000118</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000119
120<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000121<div class="doc_subsection">
122 <a name="llvm_ir">Extend the LLVM intermediate representation</a>
123</div>
124
125<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000126
127<ol>
Misha Brukman076438b2003-11-14 17:34:38 +0000128<li>Add support for platform-independent prefetch support. The GCC <a
Chris Lattnerb7131092003-02-06 19:39:21 +0000129 href="http://gcc.gnu.org/projects/prefetch.html">prefetch project</a> page
130 has a good survey of the prefetching capabilities of a variety of modern
Misha Brukman076438b2003-11-14 17:34:38 +0000131 processors.</li>
132
Chris Lattnerb7131092003-02-06 19:39:21 +0000133</ol>
134
Misha Brukman076438b2003-11-14 17:34:38 +0000135</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000136
137<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000138<div class="doc_subsection">
139 <a name="misc_imp">Miscellaneous Improvements</a>
140</div>
141
142<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000143
144<ol>
Chris Lattner8bde96f2003-05-06 20:47:11 +0000145<li>Someone needs to look into getting the <tt>ranlib</tt> tool to index LLVM
146 bytecode files, so that linking in .a files is not hideously slow. They
147 would also then have to implement the reader for this index in
Misha Brukman076438b2003-11-14 17:34:38 +0000148 <tt>gccld</tt>.</li>
Chris Lattner8bde96f2003-05-06 20:47:11 +0000149
Misha Brukman076438b2003-11-14 17:34:38 +0000150<li>Rework the PassManager to be more flexible</li>
151
Chris Lattnerb7131092003-02-06 19:39:21 +0000152<li>Some transformations and analyses only work on reducible flow graphs. It
153would be nice to have a transformation which could be "required" by these passes
154which makes irreducible graphs reducible. This can easily be accomplished
155through code duplication. See <a
156href="http://citeseer.nj.nec.com/janssen97making.html">Making Graphs Reducible
157with Controlled Node Splitting</a> and perhaps <a
158href="http://doi.acm.org/10.1145/262004.262005">Nesting of Reducible and
Misha Brukman076438b2003-11-14 17:34:38 +0000159Irreducible Loops</a>.</li>
160
Chris Lattnerb7131092003-02-06 19:39:21 +0000161</ol>
162
Misha Brukman076438b2003-11-14 17:34:38 +0000163</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000164
165<!-- *********************************************************************** -->
Misha Brukman076438b2003-11-14 17:34:38 +0000166<div class="doc_section">
167 <a name="new">Adding new capabilities to LLVM</a>
168</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000169<!-- *********************************************************************** -->
170
Misha Brukman076438b2003-11-14 17:34:38 +0000171<div class="doc_text">
172
Brian Gaeke2d261352004-04-07 15:31:23 +0000173<p>Sometimes creating new things is more fun than improving existing things.
Misha Brukman076438b2003-11-14 17:34:38 +0000174These projects tend to be more involved and perhaps require more work, but can
175also be very rewarding.</p>
176
177</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000178
179<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000180<div class="doc_subsection">
181 <a name="pointeranalysis">Pointer and Alias Analysis</a>
182</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000183
Misha Brukman076438b2003-11-14 17:34:38 +0000184<div class="doc_text">
185
186<p>We have a <a href="AliasAnalysis.html">strong base for development</a> of
187both pointer analysis based optimizations as well as pointer analyses
188themselves. It seems natural to want to take advantage of this...</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000189
190<ol>
191<li>Implement a flow-sensitive context-sensitive alias analysis algorithm<br>
192 - Pick one of the somewhat efficient algorithms, but strive for maximum
Misha Brukman076438b2003-11-14 17:34:38 +0000193 precision</li>
194
Chris Lattnerf56703b2003-06-25 14:31:06 +0000195<li>Implement a flow-sensitive context-insensitive alias analysis algorithm<br>
Misha Brukman076438b2003-11-14 17:34:38 +0000196 - Just an efficient local algorithm perhaps?</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000197
Misha Brukman076438b2003-11-14 17:34:38 +0000198<li>Implement alias-analysis-based optimizations:
Chris Lattnerb7131092003-02-06 19:39:21 +0000199 <ul>
Misha Brukman076438b2003-11-14 17:34:38 +0000200 <li>Dead store elimination</li>
201 <li>...</li>
202 </ul></li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000203</ol>
204
Misha Brukman076438b2003-11-14 17:34:38 +0000205</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000206
Misha Brukman076438b2003-11-14 17:34:38 +0000207<!-- ======================================================================= -->
208<div class="doc_subsection">
209 <a name="profileguided">Profile Guided Optimization</a>
210</div>
211
212<div class="doc_text">
213
Chris Lattnera5422e42004-03-08 22:29:35 +0000214<p>We now have a unified infrastructure for writing profile-guided
215transformations, which will work either at offline-compile-time or in the JIT,
216but we don't have many transformations. We would welcome new profile-guided
217transformations as well as improvements to the current profiling system.
218</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000219
Misha Brukman076438b2003-11-14 17:34:38 +0000220<p>Ideas for profile guided transformations:</p>
Chris Lattnerb7131092003-02-06 19:39:21 +0000221
222<ol>
Misha Brukman076438b2003-11-14 17:34:38 +0000223<li>Superblock formation (with many optimizations)</li>
224<li>Loop unrolling/peeling</li>
225<li>Profile directed inlining</li>
226<li>Code layout</li>
227<li>...</li>
228</ol>
Chris Lattnerb7131092003-02-06 19:39:21 +0000229
Chris Lattnera5422e42004-03-08 22:29:35 +0000230<p>Improvements to the existing support:</p>
231
232<ol>
233<li>The current block and edge profiling code that gets inserted is very simple
234and inefficient. Through the use of control-dependence information, many fewer
235counters could be inserted into the code. Also, if the execution count of a
236loop is known to be a compile-time or runtime constant, all of the counters in
237the loop could be avoided.</li>
238
239<li>You could implement one of the "static profiling" algorithms which analyze a
240piece of code an make educated guesses about the relative execution frequencies
241of various parts of the code.</li>
242
243<li>You could add path profiling support, or adapt the existing LLVM path
244profiling code to work with the generic profiling interfaces.</li>
245</ol>
246
Misha Brukman076438b2003-11-14 17:34:38 +0000247</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000248
249<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000250<div class="doc_subsection">
251 <a name="xforms">New Transformations and Analyses</a>
252</div>
253
254<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000255
256<ol>
257<li>Implement a Dependence Analysis Infrastructure<br>
Misha Brukman076438b2003-11-14 17:34:38 +0000258 - Design some way to represent and query dep analysis</li>
Misha Brukman076438b2003-11-14 17:34:38 +0000259<li>Implement a strength reduction pass</li>
260<li>Value range propagation pass</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000261</ol>
262
Misha Brukman076438b2003-11-14 17:34:38 +0000263</div>
264
Chris Lattnerb7131092003-02-06 19:39:21 +0000265<!-- ======================================================================= -->
Misha Brukman076438b2003-11-14 17:34:38 +0000266<div class="doc_section">
267 <a name="x86be">X86 Back-end Improvements</a>
268</div>
269
270<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000271
272<ol>
Misha Brukman076438b2003-11-14 17:34:38 +0000273<li>Implement a better instruction selector</li>
Chris Lattner99df25f2003-04-28 03:42:31 +0000274<li>Implement support for the "switch" instruction without requiring the
Misha Brukman076438b2003-11-14 17:34:38 +0000275 lower-switches pass.</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000276</ol>
277
Misha Brukman076438b2003-11-14 17:34:38 +0000278</div>
279
Chris Lattnerb7131092003-02-06 19:39:21 +0000280<!-- ======================================================================= -->
Misha Brukman3497ae92004-03-11 21:26:29 +0000281<div class="doc_section">
Misha Brukman076438b2003-11-14 17:34:38 +0000282 <a name="misc_new">Miscellaneous Additions</a>
283</div>
284
285<div class="doc_text">
Chris Lattnerb7131092003-02-06 19:39:21 +0000286
287<ol>
Brian Gaeke2d261352004-04-07 15:31:23 +0000288<li>Port the <A HREF="http://www-sop.inria.fr/mimosa/fp/Bigloo/">Bigloo</A>
289Scheme compiler, from Manuel Serrano at INRIA Sophia-Antipolis, to
290output LLVM bytecode. It seems that it can already output .NET
291bytecode, JVM bytecode, and C, so LLVM would ostensibly be another good
292candidate.</li>
293<li>Write a new frontend for some other language (Java? OCaml? Forth?)</li>
Misha Brukman076438b2003-11-14 17:34:38 +0000294<li>Write a new backend for a target (IA64? MIPS? MMIX?)</li>
Misha Brukmandec8cfb2004-04-16 16:55:30 +0000295<li>Write a disassembler for machine code that would use TableGen to output
296<tt>MachineInstr</tt>s for transformations, optimizations, etc.</li>
Brian Gaekea2245a32004-03-10 19:15:50 +0000297<li>Random test vector generator: Use a C grammar to generate random C code;
298run it through llvm-gcc, then run a random set of passes on it using opt.
299Try to crash opt. When opt crashes, use bugpoint to reduce the test case and
300mail the result to yourself. Repeat ad infinitum.</li>
Misha Brukman1a49bc82004-03-10 19:22:29 +0000301<li>Design a simple, recognizable logo.</li>
Chris Lattnerb7131092003-02-06 19:39:21 +0000302</ol>
303
Misha Brukman076438b2003-11-14 17:34:38 +0000304</div>
Chris Lattnerb7131092003-02-06 19:39:21 +0000305
306<!-- *********************************************************************** -->
Chris Lattnerb7131092003-02-06 19:39:21 +0000307
Misha Brukman076438b2003-11-14 17:34:38 +0000308<hr>
Misha Brukman836db502004-05-12 18:57:54 +0000309<address>
310 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
311 src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
312 <a href="http://validator.w3.org/check/referer"><img
313 src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>
314
315 <a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
316 <a href="http://llvm.cs.uiuc.edu">LLVM Compiler Infrastructure</a><br>
Misha Brukman076438b2003-11-14 17:34:38 +0000317 Last modified: $Date$
Misha Brukman836db502004-05-12 18:57:54 +0000318</address>
Misha Brukman076438b2003-11-14 17:34:38 +0000319
320</body>
321</html>