public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Dumping RTL???
@ 2002-12-02 20:39 gyanindra mishra
  2002-12-03  3:00 ` Andrew Haley
  0 siblings, 1 reply; 22+ messages in thread
From: gyanindra mishra @ 2002-12-02 20:39 UTC (permalink / raw)
  To: gcc; +Cc: dewar

Thanks ..

>Can you explain your problem, rather than just ask about a proposed
>solution. Why do you want to do this?

       I am trying to divide the Gcc flow into two parts so that the vast 
GCC code can be splitted.
In the front-end,i want to dump the RTL with full information and Back-End 
is to convert RTL to object.

So I need to dump the RTL into a file. and in backend to get it back into 
the same form.

Regards
Mishra



>From: dewar@gnat.com (Robert Dewar)
>To: gcc@gcc.gnu.org, gyana_m@hotmail.com
>Subject: Re: Dumping RTL???
>Date: Mon,  2 Dec 2002 09:57:05 -0500 (EST)
>
> > Hello,
> >      I am trying to dump the RTL into a file and in the backend to take 
>this
> > file and generate the assembly. What is the feasibility of my idea ??
> > Thanks in Adv..
> > Mishra
>
>

_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
  2002-12-02 20:39 Dumping RTL??? gyanindra mishra
@ 2002-12-03  3:00 ` Andrew Haley
  2002-12-03  4:13   ` Fabio Alemagna
  2002-12-04 15:13   ` Svein E. Seldal
  0 siblings, 2 replies; 22+ messages in thread
From: Andrew Haley @ 2002-12-03  3:00 UTC (permalink / raw)
  To: gyanindra mishra; +Cc: gcc

gyanindra mishra writes:
 > Thanks ..
 > 
 > >Can you explain your problem, rather than just ask about a proposed
 > >solution. Why do you want to do this?
 > 
 >        I am trying to divide the Gcc flow into two parts so that the vast 
 > GCC code can be splitted.
 > In the front-end,i want to dump the RTL with full information and Back-End 
 > is to convert RTL to object.
 > 
 > So I need to dump the RTL into a file. and in backend to get it back into 
 > the same form.

This question is asked quite a lot.

We've made that impossible with standard gcc.  This is deliberate.

It's deliberate because we don't want someone to be able to use the
front end of gcc with an unfree back end.

Andrew.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
  2002-12-03  3:00 ` Andrew Haley
@ 2002-12-03  4:13   ` Fabio Alemagna
  2002-12-03 11:36     ` Joe Buck
  2002-12-04 15:13   ` Svein E. Seldal
  1 sibling, 1 reply; 22+ messages in thread
From: Fabio Alemagna @ 2002-12-03  4:13 UTC (permalink / raw)
  To: Andrew Haley; +Cc: gyanindra mishra, gcc

On Tue, 3 Dec 2002, Andrew Haley wrote:
> We've made that impossible with standard gcc.  This is deliberate.
>
> It's deliberate because we don't want someone to be able to use the
> front end of gcc with an unfree back end.

Then just prohibit it in the license...

Fabio Alemagna

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
  2002-12-03  4:13   ` Fabio Alemagna
@ 2002-12-03 11:36     ` Joe Buck
  0 siblings, 0 replies; 22+ messages in thread
From: Joe Buck @ 2002-12-03 11:36 UTC (permalink / raw)
  To: Fabio Alemagna; +Cc: Andrew Haley, gyanindra mishra, gcc


On Tue, 3 Dec 2002, Andrew Haley wrote:
> > We've made that impossible with standard gcc.  This is deliberate.
> >
> > It's deliberate because we don't want someone to be able to use the
> > front end of gcc with an unfree back end.

Fabio Alemagna writes:
> Then just prohibit it in the license...

It's not that simple.  Licenses can't do everything.

[ It's quite likely that the following isn't completely correct, and
  my fellow amateur lawyers will enjoy picking it to death.  I suggest
  that this is only worthwhile if there are major errors rather than
  errors in detail. ]

Some types of license terms only work if there is a contract.  The GPL,
LGPL, Berkeley, and other open source licenses work because they start
with copyright law, and grant the user more rights: if you have legally
obtained a copyrighted work, you can use it however you want, but you have
(almost) no right to copy, modify or distribute it (I say "almost" because
the law lets you make a backup copy of a program, there's fair use, etc,
and details depend on the country you live in).  Free software/Open source
licenses let the user do things that copyright law normally forbids, if
certain conditions are followed (fewer conditions for Berkeley, more for
LGPL, still more for GPL).  Because rights are only added, not taken away,
we don't have to force GCC users to agree to a license.

But a license that forbids using a piece of software in a certain way (in
this case, reading the dumped output into a proprietary program, or
accepting certain data as input) takes rights away, so there has to be a
binding contract.  Shrink-wrap licenses are one possibility in some
jurisdictions, but how do you make sure that all users have agreed to the
license?

In the US, the DMCA could be used, I suppose: add some kind of bogus
encryption/access control mechanism, threaten users with five years in
jail if they go around it.  I'd be against such tactics.



^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
  2002-12-03  3:00 ` Andrew Haley
  2002-12-03  4:13   ` Fabio Alemagna
@ 2002-12-04 15:13   ` Svein E. Seldal
  2002-12-08  7:17     ` Marc Espie
  1 sibling, 1 reply; 22+ messages in thread
From: Svein E. Seldal @ 2002-12-04 15:13 UTC (permalink / raw)
  To: Andrew Haley; +Cc: gyanindra mishra, gcc

Andrew Haley wrote:

> It's deliberate because we don't want someone to be able to use the
> front end of gcc with an unfree back end.

Hmm... gcc is open source... A company like this could ""simply"" alter 
gcc to produce complete RTL output and then use their unfree backend 
anyways? Given that they release the gcc-patch-source, am I right? Or is 
this sceanrio merely academic?

Svein

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
  2002-12-04 15:13   ` Svein E. Seldal
@ 2002-12-08  7:17     ` Marc Espie
  0 siblings, 0 replies; 22+ messages in thread
From: Marc Espie @ 2002-12-08  7:17 UTC (permalink / raw)
  To: Svein.Seldal; +Cc: gcc

In article <3DEE8C16.2050107@solidas.com> you write:
>Andrew Haley wrote:
>
>> It's deliberate because we don't want someone to be able to use the
>> front end of gcc with an unfree back end.
>
>Hmm... gcc is open source... A company like this could ""simply"" alter 
>gcc to produce complete RTL output and then use their unfree backend 
>anyways? Given that they release the gcc-patch-source, am I right? Or is 
>this sceanrio merely academic?

No, this scenario is not merely academic.

In fact, anyone who wishes to patch gcc to dump intermediate representations
or use dumps of intermediate representations may do so.

I won't beat a dead horse and launch again into a discussion of the many
reasons why having intermediate representations dumps would be a good thing,
from many technical point of views.

Such a patch will emphatically not be supported by the official gcc release, 
and I wonder how it would fare over time.  Would it get active UNsupport by 
the official gcc release (e.g., changing enough details to deliberately break
it), or not ?  One wonders... then, this is probably not necessary to 
deliberately break an hypothetical patch, seeing the speed at which development
breaks existing extensions, or how hard it is to bring old existing front-ends
(modula3, mercury, pascal...) in line with recent gcc.

I do think that the current non-existence of such a patch mainly comes from
a lack of resources in the camp of those that would like to have intermediate
representations as full-fledged objects.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
@ 2002-12-08 18:55 Robert Dewar
  0 siblings, 0 replies; 22+ messages in thread
From: Robert Dewar @ 2002-12-08 18:55 UTC (permalink / raw)
  To: dberlin, kenner; +Cc: espie, gcc

> It couldn't ever be, unless you don't really mean "interface".
> Use of one work as the basic materials (ie the ideas or actual physical 
> materials from that work) to create another that does not include that 
> work does not make a derivative (Fer instance, as an an example of 
> physical materials, if I use copyrighted newspapers to make a paper 
> mache dinosaur, i've not created a derivative work of those newspapers. 

This is just a legal theory, not a statement of fact, since little of this
is statutory. I suggest reading up case law on recent copyright decisions
in software matters. It may make you less sanguine about the results. Note
that in particular there is no statutory notion of "interface", and only
a very vague and confused case law notion.

>   Same thing with the ideas part. Ideas are specifically *not* 
> protected).  As long as one can clearly delineate interfaces as the 
> idea, and the implementation as the expression, the interface is not 
> protectible.

Well we all know this is the principle, but the line between an idea
and an expression of an idea is quite flexible (look at the Coming to
America case Art Buchwald vs ??? for details).

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
@ 2002-12-08 11:59 Richard Kenner
  0 siblings, 0 replies; 22+ messages in thread
From: Richard Kenner @ 2002-12-08 11:59 UTC (permalink / raw)
  To: dberlin; +Cc: gcc

    Same thing with the ideas part. Ideas are specifically *not*
    protected).  As long as one can clearly delineate interfaces as the
    idea, and the implementation as the expression, the interface is not
    protectible.

Well, let's just say *less* protectable.  But that's exactly the point:
if we raise it to the level of an "interface", we lessen it's protection.
As long as it's simply a dump of internal data structures, it's much more
highly protectable.

    I don't think you mean "we" (I slip sometimes too in gcc talk), since 
    the FSF owns the copyright. :)

I mean "we" as developers for the FSF, but technically you're right, I
mean the FSF itself.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
  2002-12-08  8:16 Richard Kenner
@ 2002-12-08 10:36 ` Daniel Berlin
  0 siblings, 0 replies; 22+ messages in thread
From: Daniel Berlin @ 2002-12-08 10:36 UTC (permalink / raw)
  To: Richard Kenner; +Cc: espie, gcc


On Sunday, December 8, 2002, at 10:51  AM, Richard Kenner wrote:

>     BTW, if there is a legal argument that means such a scenario is 
> impossible,
>     why not allow people to dump the RTL ?
>
> A legal "argument" will not necessarily prevail in court since the 
> opposing
> side would have the opposite "argument".  This is an area of copyright 
> law
> that has not been ligitated yet so nobody can say for certain which 
> way it
> would go.

I should add that especially in these times, it is not a time to be 
litigating controversial issues.  Every decision lately seems to be of 
one extreme or another.

>


>     There is something subtle I must be missing here...
>
> You're missing it, but it's not that subtle and has been said before: 
> if the
> copyright holder were to provide such an interface, it could be used 
> to argue
> that using that interface was *not* a violation of the copyright.
It couldn't ever be, unless you don't really mean "interface".
Use of one work as the basic materials (ie the ideas or actual physical 
materials from that work) to create another that does not include that 
work does not make a derivative (Fer instance, as an an example of 
physical materials, if I use copyrighted newspapers to make a paper 
mache dinosaur, i've not created a derivative work of those newspapers. 
  Same thing with the ideas part. Ideas are specifically *not* 
protected).  As long as one can clearly delineate interfaces as the 
idea, and the implementation as the expression, the interface is not 
protectible.


> In other
> words, our legal position is far stronger without such an interface 
> because
> the fact that we haven't provided the interface it makes it clear that 
> we, as
> the copyright holders,

I don't think you mean "we" (I slip sometimes too in gcc talk), since 
the FSF owns the copyright. :)
>  do not view such activity as permissible.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
@ 2002-12-08  8:16 Richard Kenner
  2002-12-08 10:36 ` Daniel Berlin
  0 siblings, 1 reply; 22+ messages in thread
From: Richard Kenner @ 2002-12-08  8:16 UTC (permalink / raw)
  To: espie; +Cc: gcc

    BTW, if there is a legal argument that means such a scenario is impossible,
    why not allow people to dump the RTL ?

A legal "argument" will not necessarily prevail in court since the opposing
side would have the opposite "argument".  This is an area of copyright law
that has not been ligitated yet so nobody can say for certain which way it
would go.

    There is something subtle I must be missing here...

You're missing it, but it's not that subtle and has been said before: if the
copyright holder were to provide such an interface, it could be used to argue
that using that interface was *not* a violation of the copyright.  In other
words, our legal position is far stronger without such an interface because
the fact that we haven't provided the interface it makes it clear that we, as
the copyright holders, do not view such activity as permissible. 

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
@ 2002-12-08  7:49 Richard Kenner
  0 siblings, 0 replies; 22+ messages in thread
From: Richard Kenner @ 2002-12-08  7:49 UTC (permalink / raw)
  To: espie; +Cc: gcc

    Front-end/back-ends: separate programs.

So?  The fact that two programs are, from a technical point of view, separate
doesn't mean they are separate from a legal copyright point of view.  They
made be and they may not be.

    You can very well invoke closed source programs from within gcc.
    In fact, if you install it on many systems, then your toolchain will
    depend upon closed source assembler/linker.

    What we're talking about is:
    - release a gcc that's patched to dump intermediate representation, with
    complete source.
    - relase a binary program that's invoked by this gcc, without source.

    How is this different ?

Because the interface between the assembler and compiler is a
documented interface *meant* to be used for that purpose.  It is not a
copyrighted part of the assembler.  Here, data the that's being dumped
is in a format that's part of the copyrighted work (GCC).  Using that
data is a copyright violation.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
@ 2002-12-08  7:25 Robert Dewar
  0 siblings, 0 replies; 22+ messages in thread
From: Robert Dewar @ 2002-12-08  7:25 UTC (permalink / raw)
  To: espie, kenner; +Cc: gcc

> What we're talking about is:
> - release a gcc that's patched to dump intermediate representation, with
> complete source.
> - relase a binary program that's invoked by this gcc, without source.
> 
> How is this different ?

It is very different for many reasons, but (a) this has been discussed
here before (b) it is not relevant.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
@ 2002-12-08  7:24 Robert Dewar
  0 siblings, 0 replies; 22+ messages in thread
From: Robert Dewar @ 2002-12-08  7:24 UTC (permalink / raw)
  To: Svein.Seldal, espie; +Cc: gcc

It is interesting to note that in the case of GNAT, we do have a facility
for dumping the (very well defined) AST, and utility functions for reading
the tree back in again. This is used by ASIS, and could theoretically be
used by an independent back end.

Whether or not this would violate the GPL if that independent back end
was not GPL'ed and was released, who knows? The situation would require
litigation and there is no point in bothering about it until it happens
(my own viewpoint, from the point of view of an expert on copyright law
but I am not an attorney), is that this would indeed be a copyright
violation (anyone really interested in understanding my point of view can
dig up the trial testimony for Intergraph vs Bentley systems :-)

Anyway, nothing vaguely like this has happened, we don't expect it to happen,
and worrying about it does not keep us awake at night!

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
  2002-12-04 19:22 Richard Kenner
@ 2002-12-08  7:23 ` Marc Espie
  0 siblings, 0 replies; 22+ messages in thread
From: Marc Espie @ 2002-12-08  7:23 UTC (permalink / raw)
  To: kenner; +Cc: gcc

In article <10212050323.AA12005@vlsi1.ultra.nyu.edu> you write:
>    Hmm... gcc is open source... A company like this could ""simply"" alter 
>    gcc to produce complete RTL output and then use their unfree backend 
>    anyways? Given that they release the gcc-patch-source, am I right? Or is 
>    this sceanrio merely academic?
>
>No, doing so would be a clear GPL violation.  If the distributed GCC contained
>a facility to do this dumping, then doing what you propose would *probably*
>be a GPL violation, but but it would be a much weaker case.


How so ?

Front-end/back-ends: separate programs.

You can very well invoke closed source programs from within gcc.
In fact, if you install it on many systems, then your toolchain will
depend upon closed source assembler/linker.

What we're talking about is:
- release a gcc that's patched to dump intermediate representation, with
complete source.
- relase a binary program that's invoked by this gcc, without source.

How is this different ?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
@ 2002-12-05  1:07 Barak Zalstein
  0 siblings, 0 replies; 22+ messages in thread
From: Barak Zalstein @ 2002-12-05  1:07 UTC (permalink / raw)
  To: gcc

>> Hmm... gcc is open source... A company like this could ""simply"" alter 
>> gcc to produce complete RTL output and then use their unfree backend 
>> anyways? Given that they release the gcc-patch-source, am I right? Or is 
>> this sceanrio merely academic?
> In fact nobody knows whether this would be legitimate. It has not been
> litigated, and we would just as soon prefer that things stay that way.

Well if it happened to trees (http://open64.sourceforge.net/) why shouldn't it happen to rtx?
It's only a matter of few global variables.

Barak.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
@ 2002-12-04 21:18 Robert Dewar
  0 siblings, 0 replies; 22+ messages in thread
From: Robert Dewar @ 2002-12-04 21:18 UTC (permalink / raw)
  To: Svein.Seldal, aph; +Cc: gcc, gyana_m

> Hmm... gcc is open source... A company like this could ""simply"" alter 
> gcc to produce complete RTL output and then use their unfree backend 
> anyways? Given that they release the gcc-patch-source, am I right? Or is 
> this sceanrio merely academic?


In fact nobody knows whether this would be legitimate. It has not been
litigated, and we would just as soon prefer that things stay that way.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
@ 2002-12-04 19:22 Richard Kenner
  2002-12-08  7:23 ` Marc Espie
  0 siblings, 1 reply; 22+ messages in thread
From: Richard Kenner @ 2002-12-04 19:22 UTC (permalink / raw)
  To: Svein.Seldal; +Cc: gcc

    Hmm... gcc is open source... A company like this could ""simply"" alter 
    gcc to produce complete RTL output and then use their unfree backend 
    anyways? Given that they release the gcc-patch-source, am I right? Or is 
    this sceanrio merely academic?

No, doing so would be a clear GPL violation.  If the distributed GCC contained
a facility to do this dumping, then doing what you propose would *probably*
be a GPL violation, but but it would be a much weaker case.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
@ 2002-12-04 15:57 Chris Lattner
  0 siblings, 0 replies; 22+ messages in thread
From: Chris Lattner @ 2002-12-04 15:57 UTC (permalink / raw)
  To: Svein E. Seldal; +Cc: gcc

Svein E. Seldal wrote:
> > Andrew Haley wrote:
> > It's deliberate because we don't want someone to be able to use the
> > front end of gcc with an unfree back end.
>
> Hmm... gcc is open source... A company like this could ""simply"" alter
> gcc to produce complete RTL output and then use their unfree backend
> anyways? Given that they release the gcc-patch-source, am I right? Or is
> this sceanrio merely academic?

That is certainly correct.  In fact, if you ask on the list, people will
point out the C backend that is available in the archives, but that was
not applied.  As with many political problems, this one has an easy
solution that will never happen, and the current approach is flawed in
obtaining the ideals that are supposed to be upheld.  :(

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
@ 2002-12-03  7:37 Robert Dewar
  0 siblings, 0 replies; 22+ messages in thread
From: Robert Dewar @ 2002-12-03  7:37 UTC (permalink / raw)
  To: aph, gyana_m; +Cc: gcc

I must say I still don't understand the motivation behind the split
in this particular case. Splitting gcc into two parts has no particular
benefit of its own.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
@ 2002-12-02 21:52 Chris Lattner
  0 siblings, 0 replies; 22+ messages in thread
From: Chris Lattner @ 2002-12-02 21:52 UTC (permalink / raw)
  To: gcc; +Cc: gyanindra mishra


> I am trying to divide the Gcc flow into two parts so that the vast GCC
> code can be splitted. In the front-end,i want to dump the RTL with full
> information and Back-End is to convert RTL to object.

> So I need to dump the RTL into a file. and in backend to get it back
> into the same form.

GCC doesn't provide the capability to do this.  RTL intentionally does not
contain all of the information neccesary to represent the program.  This
unfortunately is due more to political reasons than any technical reason,
so it's very unlikely to change. :(

-Chris

-- 
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: Dumping RTL???
@ 2002-12-02  6:57 Robert Dewar
  0 siblings, 0 replies; 22+ messages in thread
From: Robert Dewar @ 2002-12-02  6:57 UTC (permalink / raw)
  To: gcc, gyana_m

> Hello,
>      I am trying to dump the RTL into a file and in the backend to take this 
> file and generate the assembly. What is the feasibility of my idea ??
> Thanks in Adv..
> Mishra

Can you explain your problem, rather than just ask about a proposed 
solution. Why do you want to do this?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Dumping RTL???
@ 2002-12-02  6:01 gyanindra mishra
  0 siblings, 0 replies; 22+ messages in thread
From: gyanindra mishra @ 2002-12-02  6:01 UTC (permalink / raw)
  To: gcc


Hello,
     I am trying to dump the RTL into a file and in the backend to take this 
file and generate the assembly. What is the feasibility of my idea ??
Thanks in Adv..
Mishra


_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2002-12-09  2:32 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-02 20:39 Dumping RTL??? gyanindra mishra
2002-12-03  3:00 ` Andrew Haley
2002-12-03  4:13   ` Fabio Alemagna
2002-12-03 11:36     ` Joe Buck
2002-12-04 15:13   ` Svein E. Seldal
2002-12-08  7:17     ` Marc Espie
  -- strict thread matches above, loose matches on Subject: below --
2002-12-08 18:55 Robert Dewar
2002-12-08 11:59 Richard Kenner
2002-12-08  8:16 Richard Kenner
2002-12-08 10:36 ` Daniel Berlin
2002-12-08  7:49 Richard Kenner
2002-12-08  7:25 Robert Dewar
2002-12-08  7:24 Robert Dewar
2002-12-05  1:07 Barak Zalstein
2002-12-04 21:18 Robert Dewar
2002-12-04 19:22 Richard Kenner
2002-12-08  7:23 ` Marc Espie
2002-12-04 15:57 Chris Lattner
2002-12-03  7:37 Robert Dewar
2002-12-02 21:52 Chris Lattner
2002-12-02  6:57 Robert Dewar
2002-12-02  6:01 gyanindra mishra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).