Re: Generating optimal jump code for control flow instructions

torbenm@pc-003.diku.dk (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
Wed, 24 Jun 2009 10:27:03 +0200

          From comp.compilers

Related articles
Generating optimal jump code for control flow instructions seescreen@gmail.com (SeeScreen) (2009-06-14)
Re: Generating optimal jump code for control flow instructions seescreen@gmail.com (SeeScreen) (2009-06-23)
Re: Generating optimal jump code for control flow instructions torbenm@pc-003.diku.dk (2009-06-24)
| List of all articles for this month |

From: torbenm@pc-003.diku.dk (Torben =?iso-8859-1?Q?=C6gidius?= Mogensen)
Newsgroups: comp.compilers
Date: Wed, 24 Jun 2009 10:27:03 +0200
Organization: Department of Computer Science, University of Copenhagen
References: 09-06-051 09-06-076
Keywords: code, theory
Posted-Date: 25 Jun 2009 07:00:30 EDT

SeeScreen <seescreen@gmail.com> writes:


> On Jun 14, 1:24 pm, SeeScreen <seescr...@gmail.com> wrote:
>> I am estimating that generating an absolute minimal number of
>> instructions, and short-circuiting the compound condtional at the
>> earliest possible point in the execution trace has probably already
>> been accomplished for many years.
>>
>> Is this old hat, or something new?
>
> I have come up with a simple way to generate optimal jump code for all
> basic control flow instructions:


> [Good question. I doubt that it's new, but it may be one of those bits
> of folklore that's never been properly written up. -John]


I expect the paper by Danvy and Damian at
http://en.scientificcommons.org/511287 may be what you want. The
abstract states:


    Starting from an operational specification of a translation from a
    structured to an unstructured imperative language, we point out how a
    compositional and context-insensitive translation gives rise to static
    chains of jumps. Taking an inspiration from the notion of
    continuation, we state a new compositional and context-sensitive
    specification that provably gives rise to no static chains of jumps,
    no redundant labels, and no unused labels. It is defined with one
    inference rule per syntactic construct and operates in linear time and
    space on the size of the source program (indeed it operates in one
    pass).




Torben


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.