Related articles |
---|
Re: Inlining and global references meissner@osf.org (1991-05-03) |
Re: Inlining and global references pardo@june.cs.washington.edu (1991-05-05) |
Newsgroups: | comp.compilers |
From: | pardo@june.cs.washington.edu (David Keppel) |
Keywords: | architecture, optimize |
Organization: | Computer Science & Engineering, U. of Washington, Seattle |
References: | <1991May2.212633.6893@beaver.cs.washington.edu> <1991May1.035622.25021@daffy.cs.wisc.edu> <9105031839.AA10328@curley.osf.org> |
Date: | Sun, 5 May 91 22:31:13 GMT |
pardo@cs.washington.edu writes:
>>[Accessing globals may be no faster than accessing locals]
In article <9105031839.AA10328@curley.osf.org> meissner@osf.org writes:
>[Locals may be faster: 2-instruction sequence instead of one
> sp-relative instruction.]
John Levine writes:
>[On many CISCs, the stack reference is shorter than absolute.]
The MIPS compilers try to pack global references together so that
global data can be referenced with a single-instruction offset from a
`globals area' pointer that is assigned to a physical register. I
don't have any data about how well the technique works, but the net
result if it does work is that global and local references take the
same space and time. If the instruction set can make N-bit offsets in
a single instruction, then the technique only works for less than 2^N
bytes of data.
Hence my original claim ``may be no faster'' :-)
;-D on ( Byteing the data that feeds you ) Pardo
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.