This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: register hint usefulness
- To: Anthony Green <green at cygnus dot com>
- Subject: Re: register hint usefulness
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Sun, 23 Apr 2000 08:11:40 +0200
- Cc: Sylvain Pion <Sylvain dot Pion at sophia dot inria dot fr>, gcc at gcc dot gnu dot org
- References: <20000423011742.B17792@zosma.inria.fr> <rlbt31polb.fsf@fencer.cygnus.com>
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
On Sat, Apr 22, 2000 at 06:56:16PM -0700, Anthony Green wrote:
>
> Sylvain wrote:
> > I would like to know how useful "register" is with the current GCC.
> > Can it help the compiler somehow, or is it totally useless these days ?
>
> I believe that it is completely useless in current snapshots. GCC
> used to have two register allocators: the "stupid" one and the
> optimizing one. The stupid allocator obeyed the register keyword.
> Stupid was recently removed from the compiler, however, because it was
> more trouble than it was worth. (Thank you rth!)
Isn't "register" still needed for variables pinned into specific registers?
I remember gcc not putting a variable in specified hard register in certain
cases:
int foo asm("g5");
but doing it always with:
register int foo asm("g5");
so I'd guess it is not totally useless...
Jakub