On Fri, Apr 24, 2026 at 11:02 AM Richard Biener
<[email protected]> wrote:
>
> On Fri, Apr 24, 2026 at 10:51 AM Florian Weimer via Gcc <[email protected]> 
> wrote:
> >
> > * Thomas Koenig via Gcc:
> >
> > > A patch for gcc has to apply and work.  For anything not completely
> > > trivial this means that it has to tie in with gcc's data structures
> > > and algorithms.  A non-trivial patch that is an exact copy of somebody
> > > else's work has to come from a gcc branch.  So it is already covered
> > > by the GPL v3 (or v2, for very old versions).
> >
> > I think for some auto-written patches, this line of argument has a lot
> > of merit.
> >
> > Aren't there newer front ends that are somewhat separated from the rest
> > of GCC's data structures?
>
> Yes.
>
> > And it clearly does not apply to run-time library code and test cases.
>
> That's true.  I'll note that verbatim copying of single lines or very
> small common patterns still happens, but of course legal significance
> is questionable.
>
> I think this just shows that a black-and-white view on this is wrong.

Another class of patches that should be "obviously" OK are when you
ask the LLM to do a specific refactoring, like "replace all PHI_RESULT
macro uses with gimple_phi_result calls".  I know there are/were source
refactoring tools out there that do not use LLMs, but prompting an LLM
is easier than trying to remember and be able to operate (open source)
refactoring tools.  The openJDK policy for example explicitly forbids this.

Richard.

Reply via email to