aboutsummaryrefslogtreecommitdiffstats
path: root/docs/OpenProjects.html
blob: cc0f133d9a2c3fd0a3dc9bdc8c8b0de02c3067f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
                      "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <title>Open LLVM Projects</title>
  <link rel="stylesheet" href="llvm.css" type="text/css">
</head>
<body>

<div class="doc_title">
  Open LLVM Projects
</div>

<ul>
  <li><a href="#what">What is this?</a></li>
  <li><a href="#improving">Improving the current system</a>
  <ol>
    <li><a href="#code-cleanups">Implementing Code Cleanup bugs</a></li>
    <li><a href="#glibc">Port glibc to LLVM</a></li>
    <li><a href="#programs">Compile programs with the LLVM Compiler</a></li>
    <li><a href="#llvm_ir">Extend the LLVM intermediate representation</a></li>
    <li><a href="#misc_imp">Miscellaneous Improvements</a></li>
  </ol></li>

  <li><a href="#new">Adding new capabilities to LLVM</a>
  <ol>
    <li><a href="#newfeaturebugs">Implementing new feature PRs</a></li>
    <li><a href="#pointeranalysis">Pointer and Alias Analysis</a></li>
    <li><a href="#profileguided">Profile Guided Optimization</a></li>
    <li><a href="#xforms">New Transformations and Analyses</a></li>
    <li><a href="#x86be">X86 Back-end Improvements</a></li>
    <li><a href="#misc_new">Miscellaneous Additions</a></li>
  </ol></li>
</ul>

<div class="doc_author">
  <p>Written by the <a href="http://llvm.cs.uiuc.edu/">LLVM Team</a></p>
</div>


<!-- *********************************************************************** -->
<div class="doc_section">
  <a name="what">What is this?</a>
</div>
<!-- *********************************************************************** -->

<div class="doc_text">

<p>This document is meant to be a sort of "big TODO list" for LLVM.  Each
project in this document is something that would be useful for LLVM to have, and
would also be a great way to get familiar with the system.  Some of these
projects are small and self-contained, which may be implemented in a couple of
days, others are larger.  Several of these projects may lead to interesting
research projects in their own right.  In any case, we welcome all
contributions.</p>

<p>If you are thinking about tackling one of these projects, please send a mail
to the <a href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM
Developer's</a> mailing list, so that we know the project is being worked on.
Additionally this is a good way to get more information about a specific project
or to suggest other projects to add to this page.
</p>

<p>The projects in this page are open-ended. More specific projects are
filed as unassigned enhancements in the <a href="http://llvm.cs.uiuc.edu/bugs/">
LLVM 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>

</div>

<!-- *********************************************************************** -->
<div class="doc_section">
  <a name="improving">Improving the current system</a>
</div>
<!-- *********************************************************************** -->

<div class="doc_text">

<p>Improvements to the current infrastructure are always very welcome and tend
to be fairly straight-forward to implement.  Here are some of the key areas that
can use improvement...</p>

</div>

<!-- ======================================================================= -->
<div class="doc_subsection">
  <a name="code-cleanups">Implementing Code Cleanup bugs</a>
</div>

<div class="doc_text">

<p>
The <a href="http://llvm.cs.uiuc.edu/bugs/">LLVM bug tracker</a> occasionally
has <a href="http://llvm.cs.uiuc.edu/bugs/buglist.cgi?short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=code-cleanup&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Bug+Number&field0-0-0=noop&type0-0-0=noop&value0-0-0=">"code-cleanup" bugs</a> filed in it.  Taking one of these and fixing it is a good
way to get your feet wet in the LLVM code and discover how some of its components
work.
</p>

</div>

<!-- ======================================================================= -->
<div class="doc_subsection">
  <a name="glibc">Port glibc to LLVM</a>
</div>

<div class="doc_text">

<p>It would be very useful to <a
href="http://www.gnu.org/software/libc/manual/html_node/Porting.html">port</a> <a
href="http://www.gnu.org/software/libc/">glibc</a> to LLVM.  This would allow a
variety of interprocedural algorithms to be much more effective in the face of
library calls.  The most important pieces to port are things like the string
library and the <tt>stdio</tt> related functions... low-level system calls like
'<tt>read</tt>' should stay unimplemented in LLVM.</p>

</div>

<!-- ======================================================================= -->
<div class="doc_subsection">
  <a name="programs">Compile programs with the LLVM Compiler</a>
</div>

<div class="doc_text">

<p>We are always looking for new testcases and benchmarks for use with LLVM.  In
particular, it is useful to try compiling your favorite C source code with LLVM.
If it doesn't compile, try to figure out why or report it to the <a
href="http://mail.cs.uiuc.edu/pipermail/llvmbugs/">llvm-bugs</a> list.  If you
get the program to compile, it would be extremely useful to convert the build
system to be compatible with the LLVM Programs testsuite so that we can check it
into CVS and the automated tester can use it to track progress of the
compiler.</p>

<p>When testing a code, try running it with a variety of optimizations, and with
all the back-ends: CBE, llc, and lli.</p>

</div>

<!-- ======================================================================= -->
<div class="doc_subsection">
  <a name="llvm_ir">Extend the LLVM intermediate representation</a>
</div>

<div class="doc_text">

<ol>
<li>Add support for platform-independent prefetch support.  The GCC <a
    href="http://gcc.gnu.org/projects/prefetch.html">prefetch project</a> page
    has a good survey of the prefetching capabilities of a variety of modern
    processors.</li>

</ol>

</div>

<!-- ======================================================================= -->
<div class="doc_subsection">
  <a name="misc_imp">Miscellaneous Improvements</a>
</div>

<div class="doc_text">

<ol>
<li>Someone needs to look into getting the <tt>ranlib</tt> tool to index LLVM
    bytecode files, so that linking in .a files is not hideously slow.  They
    would also then have to implement the reader for this index in
    <tt>gccld</tt>.</li>

<li>Rework the PassManager to be more flexible</li>

<li>Some transformations and analyses only work on reducible flow graphs.  It
would be nice to have a transformation which could be "required" by these passes
which makes irreducible graphs reducible.  This can easily be accomplished
through code duplication.  See <a
href="http://citeseer.nj.nec.com/janssen97making.html">Making Graphs Reducible
with Controlled Node Splitting</a> and perhaps <a
href="http://doi.acm.org/10.1145/262004.262005">Nesting of Reducible and
Irreducible Loops</a>.</li>

</ol>

</div>

<!-- *********************************************************************** -->
<div class="doc_section">
  <a name="new">Adding new capabilities to LLVM</a>
</div>
<!-- *********************************************************************** -->

<div class="doc_text">

<p>Sometimes creating new things is more fun than improving existing things.
These projects tend to be more involved and perhaps require more work, but can
also be very rewarding.</p>

</div>


<!-- ======================================================================= -->
<div class="doc_subsection">
  <a name="newfeaturebugs">Implementing new feature PRs</a>
</div>

<div class="doc_text">

<p>Many ideas for feature requests are stored in LLVM bugzilla.  Just <a href="http://llvm.org/bugs/buglist.cgi?short_desc_type=allwordssubstr&short_desc=&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=new-feature&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&changedin=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&namedcmd=All+PRs&newqueryname=&order=Bug+Number&field0-0-0=noop&type0-0-0=noop&value0-0-0=">search for bugs with a "new-feature" keyword</a>.</p>

</div>

<!-- ======================================================================= -->
<div class="doc_subsection">
  <a name="pointeranalysis">Pointer and Alias Analysis</a>
</div>

<div class="doc_text">

<p>We have a <a href="AliasAnalysis.html">strong base for development</a> of
both pointer analysis based optimizations as well as pointer analyses
themselves.  It seems natural to want to take advantage of this...</p>

<ol>
<li>Implement a flow-sensitive context-sensitive alias analysis algorithm<br>
  - Pick one of the somewhat efficient algorithms, but strive for maximum
    precision</li>

<li>Implement a flow-sensitive context-insensitive alias analysis algorithm<br>
  - Just an efficient local algorithm perhaps?</li>

<li>Implement alias-analysis-based optimizations:
  <ul>
  <li>Dead store elimination</li>
  <li>...</li>
  </ul></li>
</ol>

</div>

<!-- ======================================================================= -->
<div class="doc_subsection">
  <a name="profileguided">Profile Guided Optimization</a>
</div>

<div class="doc_text">

<p>We now have a unified infrastructure for writing profile-guided
transformations, which will work either at offline-compile-time or in the JIT,
but we don't have many transformations.  We would welcome new profile-guided
transformations as well as improvements to the current profiling system.
</p>

<p>Ideas for profile guided transformations:</p>

<ol>
<li>Superblock formation (with many optimizations)</li>
<li>Loop unrolling/peeling</li>
<li>Profile directed inlining</li>
<li>Code layout</li>
<li>...</li>
</ol>

<p>Improvements to the existing support:</p>

<ol>
<li>The current block and edge profiling code that gets inserted is very simple
and inefficient.  Through the use of control-dependence information, many fewer
counters could be inserted into the code.  Also, if the execution count of a
loop is known to be a compile-time or runtime constant, all of the counters in
the loop could be avoided.</li>

<li>You could implement one of the "static profiling" algorithms which analyze a
piece of code an make educated guesses about the relative execution frequencies
of various parts of the code.</li>

<li>You could add path profiling support, or adapt the existing LLVM path
profiling code to work with the generic profiling interfaces.</li>
</ol>

</div>

<!-- ======================================================================= -->
<div class="doc_subsection">
  <a name="xforms">New Transformations and Analyses</a>
</div>

<div class="doc_text">

<ol>
<li>Implement a Dependence Analysis Infrastructure<br>
     - Design some way to represent and query dep analysis</li>
<li>Implement a strength reduction pass</li>
<li>Value range propagation pass</li>
</ol>

</div>

<!-- ======================================================================= -->
<div class="doc_section">
  <a name="x86be">X86 Back-end Improvements</a>
</div>

<div class="doc_text">

<ol>
<li>Implement a better instruction selector</li>
<li>Implement support for the "switch" instruction without requiring the 
    lower-switches pass.</li>
<li>Implement interprocedural register allocation. The CallGraphSCCPass can be
    used to implement a bottom-up analysis that will determine the *actual* 
    registers clobbered by a function. Use the pass to fine tune register usage 
    in callers based on *actual* registers used by the callee.</li>
</ol>

</div>

<!-- ======================================================================= -->
<div class="doc_section">
  <a name="misc_new">Miscellaneous Additions</a>
</div>

<div class="doc_text">

<ol>
<li>Port the <a href="http://www-sop.inria.fr/mimosa/fp/Bigloo/">Bigloo</A>
Scheme compiler, from Manuel Serrano at INRIA Sophia-Antipolis, to
output LLVM bytecode. It seems that it can already output .NET
bytecode, JVM bytecode, and C, so LLVM would ostensibly be another good
candidate.</li>
<li>Write a new frontend for C/C++ <b>in</b> C++, giving us the ability to
directly use LLVM C++ classes from within a compiler rather than use
C-based wrapper functions a la llvm-gcc.  One possible starting point is the <a
href="http://www.parashift.com/c++-faq-lite/compiler-dependencies.html#faq-37.11">C++
yacc grammar by Ed Willink</a>.</li>
<li>Write a new frontend for some other language (Java? OCaml? Forth?)</li>
<li>Write a new backend for a target (IA64? MIPS? MMIX?)</li>
<li>Write a disassembler for machine code that would use TableGen to output 
<tt>MachineInstr</tt>s for transformations, optimizations, etc.</li>
<li>Random test vector generator: Use a C grammar to generate random C code;
run it through llvm-gcc, then run a random set of passes on it using opt.
Try to crash opt. When opt crashes, use bugpoint to reduce the test case and
mail the result to yourself.  Repeat ad infinitum.</li>
<li>Design a simple, recognizable logo.</li>
</ol>

</div>

<!-- *********************************************************************** -->

<hr>
<address>
  <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
  src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
  <a href="http://validator.w3.org/check/referer"><img
  src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!"></a>

  <a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
  <a href="http://llvm.cs.uiuc.edu">LLVM Compiler Infrastructure</a><br>
  Last modified: $Date$
</address>

</body>
</html>