This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: importing code in IR (GIMPLE and/or RTL)


--- Andrew Haley <aph@redhat.com> wrote:
> Luchezar Belev writes:
> 
>  > I want to toss an idea that someone might find usefull.
>  > It looks to me that it would be quite interesting if we could
>  > do the inverse of the debugging dumps. The dumps of the GIMPLE
>  > code are very usefull when one is writting a new GIMPLE optimizing
>  > pass because thus he is able to skip all the following passes and
>  > ovserve the direct result of the concrete pass. The inverse would
>  > be to directly feed the given pass with code in GIMPLE repr., skipping
>  > anything before the pass. This way he could much easely analyse
>  > the exact behaviour of the pass without the noise added by any
>  > prior or following passes.
>  > 
>  > The same would probably be usefull for the RTL-based passes as well -
>  > not only to be able to dump the RTL at given point, but also to be
>  > able to import at given point. In such case all prior passes can
>  > just be skipped.
> 
> This idea comes up every once in a while, often enough to be a FAQ.
>
> The problem is that what you are suggesting might allow someone to
> write an unfree front end and feed its output into gcc's back end.
> Although anyone is free to make this modification to their own copy of
> gcc, we won't do it.

I see. That's not a technical issue but some sort of a legal one.
In that case probably a new clause in the gcc license could be added
stating explicitely that any software doing so (feeding IR into the
compiler at some point) will be considered "derived work" for the
purpose of the GPL, and this should eliminate the possibility for
unfree front end, right?
Such patches to the GPL for some other specific cases already axist.
Examples are Bison, where the parsing algorithm implementation
that is copied in the generated parser is explicitely excluded
from the GPL license, and the Linux kernel, where at the front of
the COPYING file in the kernel sources is added note that only
the v2 GPL is applicable for the kernel (and not any newer versions)
which overrides what the GPL itself states.
 
> Another problem is that the gimple dumps don't contain everything.

Well, that's a fixable problem, isn't it?

Lucho.



	
		
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]