Re: Block reording.

Edward.Rosten@gmail.com
10 Mar 2007 21:34:31 -0500

          From comp.compilers

Related articles
Block reording. Edward.Rosten@gmail.com (2007-03-08)
Re: Block reording. Edward.Rosten@gmail.com (2007-03-10)
| List of all articles for this month |

From: Edward.Rosten@gmail.com
Newsgroups: comp.compilers
Date: 10 Mar 2007 21:34:31 -0500
Organization: Compilers Central
References: 07-03-034
Keywords: analysis
Posted-Date: 10 Mar 2007 21:34:31 EST

On Mar 8, 5:52 pm, Edward.Ros...@gmail.com wrote:


> The code is simple to generate if I only use long distance jumps for
> je, since then every block is the same size and every jump is more
> or less equal in cost. However, a jump to an arbitrary point is 6
> bytes of machine code, where as a jump to a nearby point can be sone
> in only 2 bytes. Naturally, I'd rather use as many short jumps as
> possible, but this requires some strategy to reorder the blocks and
> switching from a 6 byte jump to a 2 byte has the potential to affect
> the distances of a large number of the other jumps. And the
> shrinking of the code size may allow other short jumps to be used,
> etc...


Just to clarify, I have a simple scheme scans through the blocks,
inserting short jumps if possible (noting that the switch to a short
jump may make it possible). This process is repeated until it can't
continue.


-Ed



Post a followup to this message

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