This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Dead store elimination patch for switch statements
- To: amylaar at cygnus dot co dot uk
- Subject: Re: Dead store elimination patch for switch statements
- From: Geoff Keating <geoffk at ozemail dot com dot au>
- Date: Thu, 28 Oct 1999 09:53:45 +1000
- CC: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com dot amylaar@cygnus.co.uk
- References: <199910271945.UAA23171@phal.cygnus.co.uk>
> Date: Wed, 27 Oct 1999 20:45:31 +0100
> From: Joern Rennecke <amylaar@cygnus.co.uk>
> Cc: gcc-patches@gcc.gnu.org, rth@cygnus.com.amylaar@cygnus.co.uk
> Newsgroups: cygnus.egcs.patches
> X-Newsreader: TIN [version 1.2 PL2]
>
> In article <199910270422.OAA01206@gluttony.geoffk.wattle.id.au> you wrote:
>
> : The real fix is to treat switch tables in the same way as other
> : constants, for instance CONST_DOUBLE, and have them explicitly inside
> : the jump instruction and emitted to the constant pool in the usual
> : way.
>
> Some architectures don't allow the ADDR_(DIFF_)VEC to be placed arbitrarily.
I'm not sure what you mean by 'arbitrarily', but almost all
architectures require some special placement for eg. CONST values, as
in
(add (reg r3) (const 7))
you can't just throw the 'const 7' in .rodata :-).
On MIPS, a similar thing is true of 'const_double', they get output
into section .lit8 which is special.
--
Geoffrey Keating <geoffk@cygnus.com>