@@ -293,81 +293,55 @@ warranted when performing a code review.
293293Quality
294294-------
295295
296- Sending patches, PRs, RFCs, comments, etc to LLVM, is not free -- it takes a lot
297- of maintainer time and energy to review those contributions! Our **golden rule **
298- is that a contribution should be worth more to the project than the time it
299- takes to review it. These ideas are captured by this quote from the book
300- `Working in Public <https://press.stripe.com/working-in-public >`_ by Nadia
301- Eghbal:
302-
303- .. pull-quote ::
304-
305- "When attention is being appropriated, producers need to weigh the costs and
306- benefits of the transaction. To assess whether the appropriation of attention
307- is net-positive, it’s useful to distinguish between *extractive * and
308- *non-extractive * contributions. Extractive contributions are those where the
309- marginal cost of reviewing and merging that contribution is greater than the
310- marginal benefit to the project’s producers. In the case of a code
311- contribution, it might be a pull request that’s too complex or unwieldy to
312- review, given the potential upside."
313- -- Nadia Eghbal
314-
315- We encourage non-extractive contributions that help sustain the project. We want
316- the LLVM project to be welcoming and open to aspiring compiler engineers who are
317- willing to invest time and effort to learn and grow, because growing our
318- contributor base and recruiting new maintainers helps sustain the project over
319- the long term. We therefore automatically post a greeting comment to pull
320- requests from new contributors and encourage maintainers to spend their time to
321- help new contributors learn.
322-
323- However, we expect to see a growth pattern in the quality of a contributor's
324- work over time. Maintainers are empowered to push back against *extractive *
325- contributions and explain why they believe a contribution is overly burdensome
326- or not aligned with the project goals.
327-
328- If a maintainer judges that a contribution is extractive (i.e. it is generated
329- with tool-assistance and is not valuable), they should copy-paste the following
330- response, add the ``extractive `` label if applicable, and refrain from further
331- engagement::
332-
333- This PR appears to be extractive, and requires additional justification for
334- why it is valuable enough to the project for us to review it. Please see
335- our developer policy on quality and AI contributions:
336- http://llvm.org/docs/DeveloperPolicy.html#quality
337-
338- Contribution size is an imperfect proxy of the burden of review, and the
339- potential user base of the feature is another possible proxy for the value of
340- the contribution. The best ways to make a change less extractive and more
341- valuable are to reduce its size or complexity or to increase its usefulness to
342- the community. These factors are impossible to weigh objectively, and our
343- project policy leaves this determination up to the maintainers of the project,
344- i.e. those who are doing the work of sustaining the project.
345-
346- While our quality policy is subjective at its core, here are some guidelines
347- that can be used to assess the quality of a contribution:
348-
349- * Bug fixes and new features should `include a testcase `_ so we know if the
350- fix/feature ever regresses in the future.
351-
352- * Pull requests should build and pass premerge checks. For first-time
353- contributors, this will require an initial cursory review to run the checks.
354-
355- * Code must adhere to the `LLVM Coding Standards <CodingStandards.html >`_.
356-
357- * Ensure that links in source code and test files point to publicly available
358- resources and are used primarily to add additional information rather than to
359- supply critical context. The surrounding comments should be sufficient to
360- provide the context behind such links.
361-
362- * Use relevant test suites and verification tools (e.g. `Alive2
363- <https://github.com/AliveToolkit/alive2> `_) and provide evidence that they
364- pass.
365-
366- * RFCs and issues should be clear and concise.
367-
368- * Issues with compact reproducers, especially those which can be replicated on
369- `the godbolt compiler explorer <https://godbolt.org >`_, are considered high
370- quality.
296+ The minimum quality standards that any change must satisfy before being
297+ committed to the main development branch are:
298+
299+ #. Code must adhere to the :doc: `LLVM Coding Standards <CodingStandards >`.
300+
301+ #. Code must compile cleanly (no errors, no warnings) on at least one platform.
302+
303+ #. Bug fixes and new features should `include a testcase `_ so we know if the
304+ fix/feature ever regresses in the future.
305+
306+ #. Pull requests should build and pass premerge checks. For first-time
307+ contributors, this will require an initial cursory review to run the checks.
308+
309+ #. Ensure that links in source code and test files point to publicly available
310+ resources and are used primarily to add additional information rather than to
311+ supply critical context. The surrounding comments should be sufficient to
312+ provide the context behind such links.
313+
314+ Additionally, the committer is responsible for addressing any problems found in
315+ the future that the change is responsible for. For example:
316+
317+ * The code needs to compile cleanly and pass tests on all stable `LLVM
318+ buildbots <https://lab.llvm.org/buildbot/> `_.
319+
320+ * The changes should not cause any correctness regressions in the
321+ `llvm-test-suite <https://github.com/llvm/llvm-test-suite >`_
322+ and must not cause any major performance regressions.
323+
324+ * The change set should not cause performance or correctness regressions for the
325+ LLVM tools. See `llvm-compile-time-tracker.com <https://llvm-compile-time-tracker.com >`_
326+
327+ * The changes should not cause performance or correctness regressions in code
328+ compiled by LLVM on all applicable targets.
329+
330+ * You are expected to address any `GitHub Issues
331+ <https://github.com/llvm/llvm-project/issues> `_ that result from your change.
332+
333+ Our build bots and `nightly testing infrastructure
334+ <https://llvm.org/docs/lnt/intro.html> `_ find many of these issues. Build bots
335+ will directly email you if a group of commits that included yours caused a
336+ failure. You are expected to check the build bot messages to see if they are
337+ your fault and, if so, fix the breakage. However, keep in mind that if you
338+ receive such an email, it is highly likely that your change is not at fault.
339+ Changes are batched together precisely because these tests are generally too
340+ expensive to run continuously for every change.
341+
342+ Commits that violate these quality standards may be reverted (see below). This
343+ is necessary when the change blocks other developers from making progress. The
344+ developer is welcome to re-commit the change after the problem has been fixed.
371345
372346
373347.. _commit messages :
@@ -449,44 +423,6 @@ squashing and merging PRs.
449423For minor violations of these recommendations, the community normally favors
450424reminding the contributor of this policy over reverting.
451425
452- Post-commit responsibilities
453- ----------------------------
454-
455- There are many important qualities that LLVM aims for, but which we cannot
456- afford to test for as part of our premerge pipeline. After landing a change,
457- the committer is responsible for addressing any problems found in the future
458- that the change is responsible for. Here are some of the issues that arise
459- post-commit:
460-
461- * The code needs to compile cleanly and pass tests on all stable `LLVM
462- buildbots <https://lab.llvm.org/buildbot/> `_.
463-
464- * The changes should not cause any correctness regressions in the
465- `llvm-test-suite <https://github.com/llvm/llvm-test-suite >`_
466- and must not cause any major performance regressions.
467-
468- * The change set should not cause performance or correctness regressions for the
469- LLVM tools. See `llvm-compile-time-tracker.com <https://llvm-compile-time-tracker.com >`_
470-
471- * The changes should not cause performance or correctness regressions in code
472- compiled by LLVM on all applicable targets.
473-
474- * You are expected to address any `GitHub Issues
475- <https://github.com/llvm/llvm-project/issues> `_ that result from your change.
476-
477- Our build bots and `nightly testing infrastructure
478- <https://llvm.org/docs/lnt/intro.html> `_ find many of these issues. Build bots
479- will directly email you if a group of commits that included yours caused a
480- failure. You are expected to check the build bot messages to see if they are
481- your fault and, if so, fix the breakage. However, keep in mind that if you
482- receive such an email, it is highly likely that your change is not at fault.
483- Changes are batched together precisely because these tests are generally too
484- expensive to run continuously for every change.
485-
486- Commits that violate these quality standards may be reverted (see below). This
487- is necessary when the change blocks other developers from making progress. The
488- developer is welcome to re-commit the change after the problem has been fixed.
489-
490426.. _revert_policy :
491427
492428Patch reversion policy
@@ -1521,66 +1457,4 @@ permission.
15211457AI generated contributions
15221458--------------------------
15231459
1524- LLVM's policy on AI-assisted tooling is fundamentally liberal -- We want to
1525- enable contributors to use the latest and greatest tools available. Our policy
1526- guided by two major concerns:
1527-
1528- 1. Ensuring that contributions do not contain copyrighted content.
1529- 2. Ensuring that contributions are not extractive and meet our `quality `_ bar.
1530-
1531- Artificial intelligence systems raise many questions around copyright that have
1532- yet to be answered. Our policy on AI tools is guided by our copyright policy:
1533- Contributors are responsible for ensuring that they have the right to contribute
1534- code under the terms of our license, typically meaning that either they, their
1535- employer, or their collaborators hold the copyright. Using AI tools to
1536- regenerate copyrighted material does not remove the copyright, and contributors
1537- are responsible for ensuring that such material does not appear in their
1538- contributions. Contributions found to violate this policy will be removed just
1539- like any other offending contribution.
1540-
1541- Recent improvements in AI-assisted tooling have made it easy to generate large
1542- volumes of code and text with little effort on the part of the contributor. This
1543- has increased the asymmetry between the work of producing a contribution, and
1544- the work of reviewing the contribution. In order to protect the time and
1545- attentional resources of LLVM project maintainers, the onus is on contributors
1546- to justify why their contributions are not extractive and meet our `quality `_
1547- bar. Contributors who repeatedly send low-quality contributions to our project
1548- will be subject to escalating moderation actions and eventually a project ban.
1549-
1550- This policy covers, but is not limited to, the following kinds of contributions:
1551-
1552- * Code, usually in the form of a pull request
1553- * RFCs or design proposals
1554- * Issues or security vulnerabilities
1555- * Comments and feedback on pull requests
1556-
1557- We encourage, but do not require, contributors making large changes to document
1558- the tools that they used as part of the rationale for why they believe their
1559- contribution has merit. This is similar in spirit to including a sed or Python
1560- script in the commit message when making large-scale changes to the project,
1561- such as updating the LLVM IR textual syntax.
1562-
1563- Here are some examples of contributions that demonstrate how to apply the
1564- principles of this policy:
1565-
1566- * `This PR <https://github.com/llvm/llvm-project/pull/142869 >`_ contains a
1567- proof from Alive2, which is a strong signal of value and correctness.
1568-
1569- * This `generated documentation
1570- <https://discourse.llvm.org/t/searching-for-gsym-documentation/85185/2> `_ was
1571- reviewed for correctness by a human before being posted.
1572-
1573- **References: ** Our policy was informed by experiences in other communities:
1574-
1575- * `Rust policy on burdensome PRs
1576- <https://github.com/rust-lang/compiler-team/issues/893> `_
1577-
1578- * `Seth Larson's post <https://sethmlarson.dev/slop-security-reports >`_ on slop
1579- security reports in the Python ecosystem
1580-
1581- * The METR paper `Measuring the Impact of Early-2025 AI on Experienced
1582- Open-Source Developer Productivity
1583- <https://metr.org/blog/2025-07-10-early-2025-ai-experienced-os-dev-study/> `_.
1584-
1585- * `QEMU bans use of AI content generators
1586- <https://www.qemu.org/docs/master/devel/code-provenance.html#use-of-ai-content-generators> `_
1460+ This section has moved into a :doc: `separate policy document <AIToolPolicy >`.
0 commit comments