1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
5 <title>LLVM Developer Policy</title>
6 <link rel="stylesheet" href="llvm.css" type="text/css">
9 <div class="doc_warning">DRAFT Only. DRAFT Only. DRAFT Only. DRAFT Only.</div>
11 <div class="doc_title">LLVM Developer Policy</div>
12 <table class="layout"><tr class="layout"><td class="layout">
15 <li><a href="#introduction">Introduction</a></li>
16 <li><a href="#terms">Terminology</a></li>
17 <li><a href="#general">General Policies</a>
19 <li><a href="#informed">Stay Informed</a> </li>
20 <li><a href="#newwork">Starting New Work</a></li>
21 <li><a href="#reviews">Code Reviews</a></li>
22 <li><a href="#incremental">Incremental Development</a></li>
23 <li><a href="#quality">Quality</a></li>
24 <li><a href="#testcases">Test Cases</a></li>
26 <li><a href="#patches">Patch Policies</a>
28 <li><a href="#p_form">Patch Form</a></li>
29 <li><a href="#p_testing">Patch Testing</a></li>
30 <li><a href="#p_submission">Patch Submission</a></li>
31 <li><a href="#p_after">After Submission</a></li>
32 <li><a href="#c_access">Obtaining Commit Access</a></li>
33 <li><a href="#c_new">New Committers</a></li>
35 <li><a href="#candl">Copyright and License</a>
37 <li><a href="#attribution">Attribution</a></li>
38 <li><a href="#copyright">Copyright</a></li>
39 <li><a href="#license">License</a></li>
40 <li><a href="#devagree">Developer Agreements</a></li>
43 <div class="doc_author">Written by LLVM Oversight Team</div>
44 </td><td class="layout">
46 <!--=========================================================================-->
47 <div class="doc_section"><a name="overview">Overview</a></div>
48 <!--=========================================================================-->
49 <div class="doc_text">
50 <p>This document contains the LLVM Developer Policy which defines the
51 project's policy towards developers and their contributions. The intent of
52 this policy is to eliminate mis-communication, rework, and confusion that
53 might arise from the distributed nature of LLVM's development. By stating
54 the policy in clear terms, we hope each developer can know ahead of time
55 what to expect when making LLVM contributions.</p>
58 <!--=========================================================================-->
59 <div class="doc_section"><a name="general">General Policies</a></div>
60 <!--=========================================================================-->
61 <div class="doc_text">
62 <p>This section contains policies that pertain generally to LLVM developers.
63 LLVM Developers are expected to meet the following obligations in order
64 for LLVM to maintain a high standard of quality.<p>
67 <!-- _______________________________________________________________________ -->
68 <div class="doc_subsection"> <a name="informed">Stay Informed</a> </div>
69 <div class="doc_text">
70 <p>Developers should stay informed by reading at least the
71 <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">llvmdev</a>
72 email list. If you are doing anything more than just casual work on LLVM,
73 it is suggested that you also subscribe to the
74 <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">llvm-commits</a>
75 list and pay attention to changes being made by others.</p>
76 <p>We recommend that active developers register an email account with
77 <a href="http://llvm.org/bugs/">LLVM Bugzilla</a> and preferably subscribe to
78 the <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs">llvm-bugs</a>
79 email list to keep track of bugs and enhancements occurring in LLVM.</p>
82 <!-- _______________________________________________________________________ -->
83 <div class="doc_subsection"> <a name="newwork">Starting New Work</a></div>
84 <div class="doc_text">
85 <p>When a developer begins a major new project with the aim of contributing
86 it back to LLVM, s/he should inform the community with an email to
87 the <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">llvm-dev</a>
88 email list, to the extent possible. The reason for this is to:
90 <li>keep the community informed about future changes to LLVM, </li>
91 <li>avoid duplication of effort by having multiple parties working on the
92 same thing and not knowing about it, and</li>
93 <li>ensure that any technical issues around the proposed work are
94 discussed and resolved before any significant work is done.</li>
96 <p>The design of LLVM is carefully controlled to ensure that all the pieces
97 fit together well. If you plan to make a major change to the way LLVM works or
98 a major new extension, it is a good idea to get consensus with the development
99 community before you start working on it.</p>
103 <!-- _______________________________________________________________________ -->
104 <div class="doc_subsection"> <a name="reviews">Code Reviews</a></div>
105 <div class="doc_text">
106 <p>LLVM has a code review policy. Code review is an excellent way to ensure
107 high quality in the software. The following policies apply:</p>
109 <li>All developers are required to have significant changes reviewed
110 before they are committed to the repository.</li>
111 <li>Code reviews are conducted by email.</li>
112 <li>Code can be reviewed either before it is committed or after.</li>
113 <li>The developer responsible for a code change is also responsible for
114 making all necessary review changes.</li>
115 <li>Developers should participate in code reviews as both a reviewer and
116 a reviewee. We don't have a dedicated team of reviewers. If someone is
117 kind enough to review your code, you should return the favor for someone
122 <!-- _______________________________________________________________________ -->
123 <div class="doc_subsection"> <a name="incremental">Incremental Development</a>
125 <div class="doc_text">
126 <p>LLVM uses an incremental development style and all developers are expected
127 to follow this practice. Incremental development is a big key to LLVM's
128 success and it is essential that developers submit incremental patches. The
129 following defines the incremental development approach:</p>
131 <li>The first task is to define the increment and get consensus (with the
132 LLVM development community) on what the end goal of the change is. Making
133 random small changes that go nowhere is not useful for anyone.</li>
134 <li>An increment is the smallest patch size necessary to effect one change
136 <li>Increments can be stand alone (e.g. to fix a bug), or part of a planned
137 series of increments towards some development goal.</li>
138 <li>Increments should be kept as small as possible. This simplifies your
139 work (into a logical progression), simplifies code review and reduces the
140 chance that you will get negative feedback on the change. Small increments
141 also facilitate the maintenance of a high quality code base.</li>
142 <li>Larger increments require a larger testing effort.</li>
146 <!-- _______________________________________________________________________ -->
147 <div class="doc_subsection"> <a name="quality">Quality</a></div>
148 <div class="doc_text">
149 <p>The minimum quality standards for any change to the main development
152 <li>Code must adhere to the
153 <a href="CodingStandards.html">LLVM Coding Standards</a>.</li>
154 <li>Code must compile cleanly (no errors, no warnings) on at least one
156 <li>Code must pass the deja gnu (llvm/test) test suite.</li>
158 <p>Additionally, the committer is responsible for addressing all of the
159 following items (preferably before submission):</p>
161 <li>The code should compile cleanly on all platforms.</li>
162 <li>The changes should not cause regressions in the <tt>llvm-test</tt>
163 suite including SPEC CINT2000, SPEC CFP2000, SPEC CINT2006, and
165 <li>The change set should not cause performance or correctness regressions
166 for the LLVM tools.</li>
167 <li>The changes should not cause performance or correctness regressions in
168 code compiled by LLVM on all applicable targets.</li>
172 <!-- _______________________________________________________________________ -->
173 <div class="doc_subsection"> <a name="testcases">Test Cases</a></div>
174 <div class="doc_text">
175 <p>Developers are required to create test cases for regressions and new
176 features and include them with their changes. The following policies
179 <li>All feature and regression test cases must be added to the
180 <tt>llvm/test</tt> directory. The appropriate sub-directory should be
181 selected (see the <a href="TestingGuide.html">Testing Guide</a> for
183 <li>Test cases should be written in
184 <a href="LangRef.html">LLVM assembly language</a> unless the
185 feature or regression being tested requires another language (e.g. the
186 bug being fixed or feature being implemented is in the lvm-gcc C++
188 <li>Test cases, especially for regressions, should be reduced as much as
189 possible, by <a href="CommandGuide/html/bugpoint.html">bugpoint</a> or
190 manually. It is unacceptable
191 to place an entire failing program into <tt>llvm/test</tt> as this creates
192 a <i>time-to-test</i> burden on all developers. Please keep them short.</li>
193 <li>More extensive test cases (applications, benchmarks, etc.) should be
194 added to the <tt>llvm-test</tt> test suite. This test suite is for
195 coverage not features or regressions.</li>
199 <!--=========================================================================-->
200 <div class="doc_section"><a name="patches">Patch Policies</a></div>
201 <!--=========================================================================-->
202 <div class="doc_text">
203 <p>This section contains policies that pertain to submitting patches
204 to LLVM and committing code to the repository</p>
206 <!-- _______________________________________________________________________ -->
207 <div class="doc_subsection"> <a name="p_form">Patch Form</a></div>
208 <div class="doc_text">
209 <p>When submitting a patch, developers must follow these rules:</p>
211 <li>Patches must be made against the CVS HEAD (main development trunk),
213 <li>Patches should be made with this command:<pre>
214 cvs diff -Ntdup -5</pre> or with the utility <tt>utils/mkpatch</tt>.</li>
215 <li>Patches should not include differences in generated code such as the
216 code generated by <tt>flex</tt>, <tt>bison</tt> or <tt>tblgen</tt>. The
217 <tt>utils/mkpatch</tt> utility takes care of this for you.</li>
220 <!-- _______________________________________________________________________ -->
221 <div class="doc_subsection"> <a name="p_testing">Patch Testing</a></div>
222 <div class="doc_text">
223 <p>Before a patch is submitted for review, it should be tested to ensure
226 <li>The patch must compile against the CVS HEAD cleanly (zero warnings, zero
228 <li>All the llvm/test (Deja Gnu) tests must pass.</li>
229 <li>The patch should cause no regressions in the llvm-test test suite. How
230 much testing is appropriate depends on the nature of the patch. We leave it
231 to your good judgement, but you will be responsible for fixing any
232 regressions or reverting the patch.</li>
235 <!-- _______________________________________________________________________ -->
236 <div class="doc_subsection"> <a name="p_submission">Patch Submission</a></div>
237 <div class="doc_text">
238 <p>When a patch is ready to be submitted, these policies apply:</p>
240 <li>Patches should be submitted immediately after they are generated. Stale
241 patches may not apply correctly if the underlying code changes between the
242 time the patch was created and the time it is applied.</li>
243 <li>Patches should be submitted by e-mail to the
244 <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">
245 llvm-commits</a> list.</li>
249 <!-- _______________________________________________________________________ -->
250 <div class="doc_subsection"> <a name="p_after">After Submission</a></div>
251 <div class="doc_text">
252 <p>After a patch has been submitted, these policies apply:</p>
254 <li>The patch is subject to review by anyone on the
255 <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">llvm-commits</a>
257 <li>Changes recommended by a reviewer should be incorporated into your
258 patch or you should explain why the reviewer is incorrect.
259 <li>Changes to the patch must be re-submitted to the
260 <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">llvm-commits</a>
262 <li>This process iterates until all review issues have been addressed.</li>
266 <!-- _______________________________________________________________________ -->
267 <div class="doc_subsection"> <a name="p_after">After Commit</a></div>
268 <div class="doc_text">
269 <p>After a patch has been committed, these policies apply:</p>
271 <li>The patch is subject to further review by anyone on the llvm-commits
273 <li>The patch submitter is responsible for all aspects of the patch per
274 the <a href="quality">quality policy</a> above.</li>
275 <li>If the patch is discovered to not meet the
276 <a href="quality">quality policy</a> standards within a reasonable time
277 frame (24 hours), it may be subject to reversal.</li>
281 <!-- _______________________________________________________________________ -->
282 <div class="doc_subsection"> <a name="c_access">Gaining Commit Access</a></div>
283 <div class="doc_text">
284 <p>Commit access to the repository is granted according to this policy:</p>
286 <li>Commit access is not granted to anyone unless they specifically ask for
288 <li>Requests for commit access must be sent to the
289 <a href="mailto:llvm-oversight@cs.uiuc.edu">LLVM Oversight Group</a>.</li>
290 <li>Granting commit access is at the sole discretion of the LLVM Oversight
293 <p>Submitting patches to LLVM via the patch policy above will greatly
294 increase the chance that your request for commit access is granted. Getting
295 to know the members of the LLVM community (email, IRC, in person contact,
296 etc.) will also increase your chances.</p>
300 <!-- _______________________________________________________________________ -->
301 <div class="doc_subsection"> <a name="c_new">New Committers</a></div>
302 <div class="doc_text">
303 <p>For those who have recently obtained commit access, the following policies
306 <li>You are granted <i>commit-after-approval</i> to all parts of LLVM.
307 To get approval, submit a patch to
308 <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">llvm-commits</a>
309 per the <a href="#patches">patch policies</a> above. When approved you
310 may commit it yourself.</li>
311 <li>You are allowed to commit patches without approval which you think are
312 obvious. This is clearly a subjective decision. We simply expect you to
313 use good judgement.</li>
314 <li>You are allowed to commit patches without approval to those portions
315 of LLVM that you own (contributed) or maintain (have been assigned
316 responsibility for), with the proviso that such commits must not break the
317 build. This is a "trust but verify" policy and commits of this nature are
318 reviewed after they are committed.</li>
319 <li>Commits that violate the <a href="quality">quality standards</a> may
320 be reverted. This is necessary when the change blocks other developers from
321 making progress. The developer is welcome to re-commit the change after
322 the problem has been fixed.</li>
323 <li>Multiple violations of these policies or a single egregious violation
324 may cause commit access to be revoked.</li>
328 <!--=========================================================================-->
329 <div class="doc_section"><a name="candl">Copyright and License</a></div>
330 <!--=========================================================================-->
331 <div class="doc_text">
332 <p>We address here the issues of copyright and license for the LLVM project.
333 The object of the copyright and license is the LLVM source code and
335 Currently, the University of Illinois is the LLVM copyright holder and the
336 terms of its license to LLVM users and developers is the
337 <a href="http://www.opensource.org/licenses/UoI-NCSA.php">University of
338 Illinois/NCSA Open Source License</a>.
341 <div class="doc_notes">
342 <p>NOTE: This section deals with legal matters but does not provide legal
343 advice. It is intended only as a general guideline only.</p>
346 <!-- _______________________________________________________________________ -->
347 <div class="doc_subsection"><a name="attribution">Attribution</a></div>
348 <div class="doc_text">
349 <p>The LLVM project believes in correct attribution of contributions to
350 their contributors, as follows:</p>
352 <li>Developers who originate new files in LLVM should place their name at
353 the top of the file per the
354 <a href="CodingStandards.html">Coding Standards</a>.</li>
355 <li>There should be only one name at the top of the file and it should be
356 the person who created the file.</li>
357 <li>Placing your name in the file does not imply copyright but does
358 correctly attribute the file to its author.</li>
359 <li>Developers should be aware that after some time has passed, the name at
360 the top of a file may become meaningless as maintenance/ownership of files
362 <li>Developers should submit or commit patches to the
363 <a href="http://llvm.org/cvsweb/cvsweb.cgi/llvm/CREDITS.TXT?rev=1.67&content-type=text/x-cvsweb-markup">CREDITS.txt</a>
364 file to summarize their contributions.</li>
365 <li>Commit comments should contain correct attribution of the person who
366 submitted the patch if that person is not the committer (i.e. when a
367 developer with commit privileges commits a patch for someone else).</li>
371 <!-- _______________________________________________________________________ -->
372 <div class="doc_subsection"><a name="copyright">Copyright</a></div>
373 <div class="doc_text">
375 <p>For consistency and ease of management, the project requires the
376 copyright for all LLVM software to be held by a single copyright holder.
377 Although UIUC may assign the copyright of the software to another entity,
378 the intent for the project is to always have a single entity hold the copy
379 rights to LLVM at any given time.
380 <p>Having multiple copyright holders for various portions of LLVM is
381 problematic in the management of the software. Having a single copyright
382 holder is in the best interests of all developers and users as it greatly
383 reduces the managerial burden for any kind of administrative or technical
384 decisions about LLVM.</p>
386 <!-- _______________________________________________________________________ -->
387 <div class="doc_subsection"><a name="license">License</a></div>
388 <div class="doc_text">
389 <p>LLVM licensing decisions will be made by the LLVM Oversight Group. Any
390 issues, comments or suggestions with the licensing should be sent to the
391 <a href="mailto:llvm-oversight@cs.uiuc.edu">LLVM Oversight Group</a>.</p>
392 <p>The LLVM Oversight Group intends to keep LLVM perpetually open source
393 and to use liberal open source licenses. The current license is the
394 <a href="http://www.opensource.org/licenses/UoI-NCSA.php">
395 University of Illinois/NCSA Open Source License</a>, which boils
398 <li>You can freely distribute LLVM.</li>
399 <li>You must retain the copyright notice if you redistribute LLVM.</li>
400 <li>Binaries derived from LLVM must reproduce the copyright notice.</li>
401 <li>You can't use our names to promote your LLVM derived products.</li>
402 <li>There's no warranty on LLVM at all.</li>
404 <p>We believe this fosters the widest adoption of LLVM because it allows
405 commercial products to be derived from LLVM with few restrictions and
406 without a requirement for making any derived works also open source. We
407 suggest that you read the
408 <a href="http://www.opensource.org/licenses/UoI-NCSA.php">License</a> if
409 further clarification is needed.</p>
411 <!-- _______________________________________________________________________ -->
412 <div class="doc_subsection"><a name="devagree">Developer Agreements</a></div>
413 <div class="doc_text">
414 <p>With regards to the LLVM copyright and licensing, developers agree to:</p>
416 <li>assign their copy rights to UIUC for any contribution made so that
417 the entire software base can be managed by a single copyright holder.</li>
418 <li>allow their contribution(s) to be licensed as open source by the then
419 current license chosen by the LLVM Oversight Group.</li>
423 <!--=========================================================================-->
424 <div class="doc_section"><a name="terms">Terminology</a></div>
425 <!--=========================================================================-->
426 <div class="doc_text">
427 <p>So that the policies defined in this document are clear, we define some
430 <dt><a name="t_change">Change</a></dt>
431 <dd>Any modification to LLVM including documentation, tests, build system,
432 etc. either in <a href="#t_patch">patch</a> or
433 <a href="#t_commit">commit</a> form.</dd>
434 <dt><a name="t_commit">Commit</a><dt>
435 <dd>A <a href="t_change">change</a> submitted directly to LLVM software
436 repository via the <tt>cvs commit</tt> command.</dd>
437 <dt><a name="t_developer">Developer</a></dt>
438 <dd>Anyone who submits a <a href="#t_change">change</a> to LLVM.</dd>
439 <dt><a name="t_inrement">Increment</a></dt>
440 <dd>A <a href="#t_change">change</a> or set of changes, whether by
441 <a href="#t_patch">patch</a> or <a href="#t_commit">commit</a>, that are
442 related by a single common purpose. Increments are atomic as they
443 leave LLVM in a stable state (both compiling and working properly).</dd>
444 <dt><a name="t_must">Must</a></dt>
445 <dd>When used in a policy statement, the term <i>must</i> implies a
446 non-optional requirement on the developer.</dd>
447 <dt><a name="t_patch">Patch</a></dt>
448 <dd>A <a href="#t_change">change</a> submitted by email in patch (diff)
449 format generated by the <tt>cvs diff</tt> command.</dd>
450 <dt><a name="t_should">Should</a></dt>
451 <dd>When used in a policy statement, the term <i>should</i> implies a
452 recommended but optional requirement on the developer.</dd>
456 <!--=========================================================================-->
457 <div class="doc_section"><a name="notes">Policy Notes</a></div>
458 <!--=========================================================================-->
459 <div class="doc_text">
460 <p>This section contains some notes on policy topics that need to be
461 resolved and incorporated into the main body of the document above.</p>
463 <li>When to open a new bug and when to re-use an existing one. For example
464 PR1158. If the same assertion happens do you open a new bug or reopen
469 <!-- *********************************************************************** -->
472 <a href="http://jigsaw.w3.org/css-validator/check/referer"><img
473 src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"></a>
474 <a href="http://validator.w3.org/check/referer"><img
475 src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /></a>
477 <a href="mailto:llvm-oversight@cs.uiuc.edu">LLVM Oversight Group</a><br>
478 <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
479 Last modified: $Date$