This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Dead and duplicated code in register elimination
- To: Bernd Schmidt <crux at pool dot informatik dot rwth-aachen dot de>
- Subject: Re: Dead and duplicated code in register elimination
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Fri, 30 Oct 1998 00:08:03 -0700
- cc: egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
In message <Pine.GSO.4.02A.9810261336130.29793-100000@colt.informatik.rwth-aa
chen.de>you write:
> I'd like to move the whole register elimination code into a separate file,
> and add some functionality that can be used from flow.c, global.c,
> local-alloc.c as well as any other places that need it. Should I send a
> patch for this?
Exactly what common functionality are you expecting to move? How much code do
you think can be shared?
> * reload1.c (struct elim_table): Delete MAX_OFFSET member.
> (update_eliminable_offsets): Don't compute it.
> (set_initial_elim_offsets): Don't initialize it.
> Break out some code into set_initial_label_offsets so the rest of
> this function can be called from reload_as_needed.
> Assume that INITIAL_FRAME_POINTER_OFFSET is defeined when
> ELIMINABLE_REGS isn't.
> (set_initial_label_offsets): New function, broken out of
> set_initial_elim_offsets.
> (set_offsets_for_label): New function, broken out of set_label_offsets
> and reload_as_needed.
> (reload): Call the two new functions.
> (reload_as_needed): Call set_initial_elim_offsets instead of
> duplicating the code. Likewise for set_offsets_for_label.
Thanks. I've installed this patch.
jeff