Chris Lattner | b713109 | 2003-02-06 19:39:21 +0000 | [diff] [blame^] | 1 | <!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 | |
| 37 | This document is meant to be a sort of "big TODO list" for LLVM. Each project |
| 38 | in this document is something that would be useful for LLVM to have, and would |
| 39 | also be a great way to get familiar with the system. Some of these projects are |
| 40 | small and self-contained, which may be implemented in a couple of days, others |
| 41 | are larger. Several of these projects may lead to interesting research projects |
| 42 | in their own right. In any case, we welcome all contributions.<p> |
| 43 | |
| 44 | If you are thinking about tackling one of these projects, please send a mail to |
| 45 | the <a href="http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev">LLVM |
| 46 | Developer's</a> mailing list, so that we know the project is being worked on. |
| 47 | Additionally this is a good way to get more information about a specific project |
| 48 | or 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 | |
| 58 | Improvements to the current infrastructure are always very welcome and tend to |
| 59 | be fairly straight-forward to implement. Here are some of the key areas that |
| 60 | can use improvement...<p> |
| 61 | |
| 62 | <!-- ======================================================================= --> |
| 63 | </ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0> |
| 64 | <tr><td> </td><td width=100%> |
| 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 | |
| 69 | It would be very useful to <a |
| 70 | href="http://www.gnu.org/software/libc/porting.html">port</a> <a |
| 71 | href="http://www.gnu.org/software/glibc/">glibc</a> to LLVM. This would allow a |
| 72 | variety of interprocedural algorithms to be much more effective in the face of |
| 73 | library calls. The most important pieces to port are things like the string |
| 74 | library 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> </td><td width=100%> |
| 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 | |
| 85 | The <a href="/testresults/">Nightly Tester</a> is a simple perl script (located |
| 86 | in utils/NightlyTest.pl) which runs every night to generate a daily report. It |
| 87 | could 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 |
| 95 | just neccesary to add the script-fu to gnuplotize it. |
| 96 | |
| 97 | <li>Regression tests - We should run the regression tests in addition to the |
| 98 | program tests... |
| 99 | </ol><p> |
| 100 | |
| 101 | <!-- ======================================================================= --> |
| 102 | </ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0> |
| 103 | <tr><td> </td><td width=100%> |
| 104 | <font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b> |
| 105 | <a name="programs">Compile programs with the LLVM Compiler |
| 106 | </b></font></td></tr></table><ul> |
| 107 | |
| 108 | We are always looking for new testcases and benchmarks for use with LLVM. In |
| 109 | particular, it is useful to try compiling your favorite C source code with LLVM. |
| 110 | If it doesn't compile, try to figure out why or report it to the <a |
| 111 | href="http://mail.cs.uiuc.edu/pipermail/llvmbugs/">llvm-bugs</a> list. If you |
| 112 | get the program to compile, it would be extremely useful to convert the build |
| 113 | system to be compatible with the LLVM Programs testsuite so that we can check it |
| 114 | into CVS and the automated tester can use it to track progress of the compiler. |
| 115 | |
| 116 | |
| 117 | <!-- ======================================================================= --> |
| 118 | </ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0> |
| 119 | <tr><td> </td><td width=100%> |
| 120 | <font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b> |
| 121 | <a name="llvm_ir">Extend the LLVM intermediate representation |
| 122 | </b></font></td></tr></table><ul> |
| 123 | |
| 124 | <ol> |
| 125 | <li>Transform <tt>setjmp</tt> and <tt>longjmp</tt> calls to use the LLVM |
| 126 | <tt>invoke</tt> mechanism. |
| 127 | <li>Add support for a volatile attribute on loads and stores |
| 128 | <li>Support for variable argument functions |
| 129 | <li>Add a new conditional move instruction: <tt>X = select bool Cond, Y, Z</tt> |
| 130 | <li>Add support for platform independant prefetch support. The GCC <a |
| 131 | href="http://gcc.gnu.org/projects/prefetch.html">prefetch project</a> page |
| 132 | has a good survey of the prefetching capabilities of a variety of modern |
| 133 | processors. |
| 134 | </ol> |
| 135 | |
| 136 | |
| 137 | <!-- ======================================================================= --> |
| 138 | </ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0> |
| 139 | <tr><td> </td><td width=100%> |
| 140 | <font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b> |
| 141 | <a name="misc_imp">Miscellaneous Improvements |
| 142 | </b></font></td></tr></table><ul> |
| 143 | |
| 144 | <ol> |
| 145 | <li>Improve the efficiency of the bytecode loader/writer, allow streaming lazy |
| 146 | loading of functions from the bytecode (for use by the JIT, for example)<br> |
| 147 | <li>Rework the PassManager |
| 148 | <li>Do not encode zero intializers for large arrays into the bytecode |
| 149 | |
| 150 | <li>Some transformations and analyses only work on reducible flow graphs. It |
| 151 | would be nice to have a transformation which could be "required" by these passes |
| 152 | which makes irreducible graphs reducible. This can easily be accomplished |
| 153 | through code duplication. See <a |
| 154 | href="http://citeseer.nj.nec.com/janssen97making.html">Making Graphs Reducible |
| 155 | with Controlled Node Splitting</a> and perhaps <a |
| 156 | href="http://doi.acm.org/10.1145/262004.262005">Nesting of Reducible and |
| 157 | Irreducible Loops</a>. |
| 158 | </ol> |
| 159 | |
| 160 | |
| 161 | <!-- *********************************************************************** --> |
| 162 | </ul><table width="100%" bgcolor="#330077" border=0 cellpadding=4 cellspacing=0> |
| 163 | <tr><td align=center><font color="#EEEEFF" size=+2 face="Georgia,Palatino"><b> |
| 164 | <a name="new">Adding new capabilities to LLVM |
| 165 | </b></font></td></tr></table><ul> |
| 166 | <!-- *********************************************************************** --> |
| 167 | |
| 168 | Sometimes creating new things is more fun that improving existing things. These |
| 169 | projects tend to be more involved and perhaps require more work, but can also be |
| 170 | very rewarding.<p> |
| 171 | |
| 172 | <!-- ======================================================================= --> |
| 173 | </ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0> |
| 174 | <tr><td> </td><td width=100%> |
| 175 | <font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b> |
| 176 | <a name="pointeranalysis">Pointer and Alias Analysis |
| 177 | </b></font></td></tr></table><ul> |
| 178 | |
| 179 | We have a strong base for development of both pointer analysis based |
| 180 | optimizations as well as pointer analyses themselves. It seems natural to want |
| 181 | to take advantage of this...<p> |
| 182 | |
| 183 | <ol> |
| 184 | <li>Implement a flow-sensitive context-sensitive alias analysis algorithm<br> |
| 185 | - Pick one of the somewhat efficient algorithms, but strive for maximum |
| 186 | precision |
| 187 | <li>Implement a flow-sensitive context-insensitive alias anlaysis algorithm<br> |
| 188 | - Just an efficient local algorithm perhaps? |
| 189 | |
| 190 | <li>Implement an interface to update analyses in response to common code motion |
| 191 | transformations |
| 192 | <li>Implement alias analysis based optimizations: |
| 193 | <ul> |
| 194 | <li>Dead store elimination |
| 195 | <li>Location invariant Code Motion (LcICM) |
| 196 | <li>Store+Reload or "store forwarding" elimination:<p> |
| 197 | Change: |
| 198 | <pre> |
| 199 | store int X, int* P |
| 200 | Y = load int* P</pre> |
| 201 | into: |
| 202 | <pre> |
| 203 | store int X, int *P |
| 204 | Y = X</pre> |
| 205 | <li>Register promotion (move loads and stores out of loop bodies, for example) |
| 206 | </ul> |
| 207 | </ol> |
| 208 | |
| 209 | <!-- ======================================================================= --> |
| 210 | </ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0> |
| 211 | <tr><td> </td><td width=100%> |
| 212 | <font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b> |
| 213 | <a name="profileguided">Profile Guided Optimization |
| 214 | </b></font></td></tr></table><ul> |
| 215 | |
| 216 | We are getting to the point where we really need a unified infrastructure for |
| 217 | profile guided optimizations. It would be wonderful to be able to write profile |
| 218 | guided transformations which can be performed either at static compile time |
| 219 | (compile time or offline optimization time) or at runtime in a JIT type setup. |
| 220 | The LLVM transformation itself shouldn't need to know how it is being used.<p> |
| 221 | |
| 222 | Ideas for profile guided transformations:<p> |
| 223 | |
| 224 | <ol> |
| 225 | <li>Superblock formation (with many optimizations) |
| 226 | <li>Loop unrolling/peeling |
| 227 | <li>Profile directed inlining |
| 228 | <li>Code layout |
| 229 | <li>... |
| 230 | </ol><p> |
| 231 | |
| 232 | |
| 233 | <!-- ======================================================================= --> |
| 234 | </ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0> |
| 235 | <tr><td> </td><td width=100%> |
| 236 | <font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b> |
| 237 | <a name="xforms">New Transformations and Analyses |
| 238 | </b></font></td></tr></table><ul> |
| 239 | |
| 240 | <ol> |
| 241 | <li>Implement a Dependence Analysis Infrastructure<br> |
| 242 | - Design some way to represent and query dep analysis |
| 243 | <li>Implement a faster Dominator Set Construction Algorithm<br> |
| 244 | - A linear time or nearly so algorithm |
| 245 | <li>Implement a strength reduction pass |
| 246 | <li>Value range propagation pass |
| 247 | <li>Implement a tail recursion elimination pass |
| 248 | <li>Implement an unswitching pass |
| 249 | </ol> |
| 250 | |
| 251 | <!-- ======================================================================= --> |
| 252 | </ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0> |
| 253 | <tr><td> </td><td width=100%> |
| 254 | <font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b> |
| 255 | <a name="x86be">X86 Back-end Improvements |
| 256 | </b></font></td></tr></table><ul> |
| 257 | |
| 258 | <ol> |
| 259 | <li>Implement a global register allocator |
| 260 | <li>Implement a better instruction selector |
| 261 | <li>Implement a static compiler in addition to the JIT (easy project) |
| 262 | </ol> |
| 263 | |
| 264 | <!-- ======================================================================= --> |
| 265 | </ul><table width="50%" bgcolor="#441188" border=0 cellpadding=4 cellspacing=0> |
| 266 | <tr><td> </td><td width=100%> |
| 267 | <font color="#EEEEFF" size=+1 face="Georgia,Palatino"><b> |
| 268 | <a name="misc_new">Miscellaneous Additions |
| 269 | </b></font></td></tr></table><ul> |
| 270 | |
| 271 | <ol> |
| 272 | <li>Write a new frontend for some language (Java? OCaml? Forth?) |
| 273 | <li>Write a new backend for a target (IA64? MIPS? MMIX?) |
| 274 | </ol> |
| 275 | |
| 276 | |
| 277 | <!-- *********************************************************************** --> |
| 278 | </ul> |
| 279 | <!-- *********************************************************************** --> |
| 280 | |
| 281 | <hr><font size-1> |
| 282 | <address><a href="mailto:sabre@nondot.org">Chris Lattner</a></address> |
| 283 | <!-- Created: Tue Aug 6 15:00:33 CDT 2002 --> |
| 284 | <!-- hhmts start --> |
| 285 | Last modified: Thu Feb 6 13:38:41 CST 2003 |
| 286 | <!-- hhmts end --> |
| 287 | </font></body></html> |