Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #62034

Re: Understandability

From James Kuyper <jameskuyper@verizon.net>
Newsgroups comp.lang.c
Subject Re: Understandability
Date 2015-05-14 22:51 -0400
Organization A noiseless patient Spider
Message-ID <mj3mtf$at8$1@dont-email.me> (permalink)
References (13 earlier) <9ae7e6d2-f4ec-49f9-9a8f-276403ac1ef3@googlegroups.com> <miusbt$hio$1@dont-email.me> <4f6b6478-8841-482d-ab39-07bbce61a5ed@googlegroups.com> <mj00fb$i44$1@dont-email.me> <d1836c48-c7bb-4aac-ad37-2fa079968ed5@googlegroups.com>

Show all headers | View raw


On 05/14/2015 01:27 PM, David Kleinecke wrote:
> On Wednesday, May 13, 2015 at 10:10:14 AM UTC-7, James Kuyper wrote:
>> On 05/13/2015 12:31 PM, David Kleinecke wrote:
>>> On Tuesday, May 12, 2015 at 11:54:00 PM UTC-7, David Brown wrote:
>> ...
>>>> If I remember the history of this thread correctly (and perhaps I
>>>> remember /incorrectly/), the key objection was that you wrote "Gnu is
>>>> right to call their work a collection.  It is really a fiction that gcc
>>>> is a free-standing program."  You followed this with a series of
>>>> misconceptions about gcc and the way it works.
>>
>> What followed the "fiction" comment was:
>>>  There are two parts - the front
>>> and back ends. The front end produces a "source program" in an
>>> intermediate language which the back end "assembles" into machine
>>> code. GNU, I believe, uses a Lisplike language called RTL. One way to
>>> make gcc a true program would be to make the back end a subroutine
>>> called at the end of front processing. A pipe might be a better idea.
>>
>> So those sentences presumably contain the misconceptions David was
>> talking about.
>>
>>> I protest once again. I believe I understand what gcc is doing. If you 
>>> feel I have "misconceptions" please tell me what they are. It is possible
>>> I do have misconceptions.
>>
>> Two of the very first responses told you what Keith Thompson and David
>> Browne thought were misconceptions expressed in those sentences:
>>
>> On 05/02/2015 04:11 PM, Keith Thompson wrote:
>>> There are more than two.
>> ...
>>> I don't know a whole lot about gcc's internal workings, but I don't
>>> believe it writes its intermediate representation to a file.  It does
>>> generate an assembly language program, but that's the output of the
>>> "back end".
>>
>> Your response to that message neither acknowledged nor disputed those
>> points, but only discussed other issues.
>>
>> On 05/04/2015 03:15 AM, David Brown wrote:
>>> Three parts - there is also the "middle end".  (And the assembler and
>>> linker come in addition - they are normally from binutils rather than
>> gcc.)
>> ...
>>> Nope.  The "front end" is specific to the source code language, such
>>> as C, C++, Fortran, etc.  It produces an intermediate language
>>> (GIMPLE), which is passed on to the "middle end" where much of the
>>> optimisation work takes place.
>>>
>>> The middle-end is /mostly/ independent of both the back-end target and
>>> the front-end language, but there is a certain amount of cross-talk
>>> between the parts.  (llvm has a similar theoretical structure, but has
>>> much cleaner separation between the parts.).  The output from the
>>> middle-end is another intermediate language (RTL).
>>>
>>> The back-end handles the target-specific register allocation and code
>>> generation.  The result is assembly, not machine code - an external
>>> assembler (usually "gas" from binutils) is called to generate the
>>> machine code.  Then another external program (usually "ln" from
>>> binutils) is called to link the object code and static libraries into
>>> an executable.
>>>
>>> (Things are a little more complicated when using link-time
>>> optimisation, but lets skip that for now.)
>> ...
>>> Pipes /are/ the usual way of passing data and options between the
>>> passes inside gcc.  Intermediary files are only stored if you ask for
>>> them (typically for debugging gcc itself).
>>
>> David's remarks received no response from anybody that I can see.
>>
>> Were either Keith or David wrong about the discrepancies between your
>> description and reality on those issues? None of the subsequent
>> discussion gave me that impression. It just wandered over into a
>> discussion of other issues.
>> -- 
>> James Kuyper
> 
> I didn't see any differences from what I said. Expansions - yes.

You said there were two parts; both Keith and David agreed that there
were three parts. In a sense, that's "merely" an expansion - but it's
also a difference, and in particular, it is a kind of difference that
justifies describing your version as a misconception, if their version
is correct.

You said the output from the front end was in RTL; David says that it's
GIMPLE. If he's correct, that also counts as a misconception on your part.
You said that the output of the back end is machine code. David said
that it's assembly code. If he's right, that also counts as a
misconception on your part.
Both of those two changes imply major differences in what kind of work
the front and back ends do.
You said that using a pipe would be a better idea; in context, that can
only mean "a better idea than the way that gcc currently does it", which
in turn implies that you thought that gcc doesn't use a pipe. Both Keith
and David pointed out that it does use a pipe. If they're correct, that
also counts as a misconception on your part.
I said, repeatedly, "if ... correct", only because I can't confirm any
of those points from personal knowledge - but I have no real reason to
doubt either Keith or David on this matter.

If those four misconceptions occurred in the context of a much larger
discussion, they wouldn't matter much. However, those four points
constitute a large fraction, possibly the majority, of the
(mis)information contained in those sentences.

> But
> differences - no. I based my depiction of gcc on the Wikipedia article.
> Maybe I condensed it too much to make people happy.

I don't see how dropping the middle end, converting GIMPLE into RTL,
changing assembly code to machine code, and implying that pipes are not
used, when in fact they are, counts as "condensation".
-- 
James Kuyper

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-01 17:55 -0700
  Re: Understandability Keith Thompson <kst-u@mib.org> - 2015-05-01 19:41 -0700
  Re: Understandability wssimms@gmail.com - 2015-05-01 20:45 -0700
  Re: Understandability Bartc <bc@freeuk.com> - 2015-05-02 10:38 +0100
    Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-02 09:15 -0700
      Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-04 09:26 +0200
        Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-04 12:52 -0700
  Re: Understandability Noob <root@127.0.0.1> - 2015-05-02 14:21 +0200
    Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-02 09:13 -0700
      Re: Understandability Ian Collins <ian-news@hotmail.com> - 2015-05-03 08:07 +1200
      Re: Understandability Keith Thompson <kst-u@mib.org> - 2015-05-02 13:11 -0700
        Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-03 10:50 -0700
          Re: Understandability Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-03 13:26 -0700
            Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-04 12:29 -0700
              Re: Understandability Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-05 05:47 -0700
        Re: Understandability raltbos@xs4all.nl (Richard Bos) - 2015-05-08 21:10 +0000
          Re: Understandability Ian Collins <ian-news@hotmail.com> - 2015-05-09 09:17 +1200
          Re: Understandability Keith Thompson <kst-u@mib.org> - 2015-05-08 14:32 -0700
            Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-09 09:13 -0700
              Re: Understandability Keith Thompson <kst-u@mib.org> - 2015-05-09 16:48 -0700
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-10 11:05 -0700
                Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-11 08:48 +0200
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-11 09:55 -0700
                Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-11 17:52 -0400
                Re: Understandability glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-05-11 22:54 +0000
                Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-12 08:49 +0200
                Re: Understandability Morris Dovey <mrdovey@iedu.com> - 2015-05-12 02:15 -0500
                Re: Understandability Phil Carmody <pc+usenet@asdf.org> - 2015-05-25 03:15 +0300
                Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-25 00:45 -0400
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-25 10:26 -0700
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-11 10:06 -0700
                Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-12 08:59 +0200
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-12 08:37 -0700
                Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-13 08:53 +0200
                Re: Understandability Keith Thompson <kst-u@mib.org> - 2015-05-13 08:16 -0700
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-13 09:49 -0700
                Re: Understandability Keith Thompson <kst-u@mib.org> - 2015-05-13 10:53 -0700
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-14 10:35 -0700
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-13 09:31 -0700
                Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-13 13:10 -0400
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-14 10:27 -0700
                Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-14 22:51 -0400
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-15 10:02 -0700
                Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-15 13:37 -0400
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-16 09:18 -0700
                Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-16 23:56 +0200
                Re: Understandability gazelle@shell.xmission.com (Kenny McCormack) - 2015-05-17 12:45 +0000
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-17 09:16 -0700
                Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-17 12:47 -0400
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-18 10:54 -0700
                Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-18 15:00 -0400
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-19 09:49 -0700
                Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-19 13:10 -0400
                Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-16 19:01 -0400
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-17 09:30 -0700
                Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-17 12:58 -0400
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-18 10:54 -0700
                Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-18 14:56 -0400
                Re: Understandability David Kleinecke <dkleinecke@gmail.com> - 2015-05-19 09:46 -0700
                Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-19 13:16 -0400
                Re: Understandability Richard Heathfield <rjh@cpax.org.uk> - 2015-05-19 18:23 +0100
                Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-19 14:02 -0400
                Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-19 00:11 +0200
                Re: Understandability James Kuyper <jameskuyper@verizon.net> - 2015-05-18 18:28 -0400
                Re: Understandability Keith Thompson <kst-u@mib.org> - 2015-05-15 10:52 -0700
                Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-13 21:53 +0200
          Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-09 16:18 +0200
          Re: Understandability Noob <root@127.0.0.1> - 2015-05-09 18:31 +0200
            Re: Understandability raltbos@xs4all.nl (Richard Bos) - 2015-05-17 10:44 +0000
              Re: Understandability glen herrmannsfeldt <gah@ugcs.caltech.edu> - 2015-05-17 15:53 +0000
      Re: Understandability David Brown <david.brown@hesbynett.no> - 2015-05-04 09:15 +0200
        Re: Understandability Waldek Hebisch <hebisch@math.uni.wroc.pl> - 2015-05-16 00:28 +0000
  Re: Understandability Tim Rentsch <txr@alumni.caltech.edu> - 2015-05-03 10:58 -0700

csiph-web