This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Crossjumping of tablejumps
- From: Richard Henderson <rth at redhat dot com>
- To: Josef Zlomek <zlomj9am at artax dot karlin dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 3 Mar 2003 16:28:40 -0800
- Subject: Re: Crossjumping of tablejumps
- References: <20030303181456.GA12584@artax.karlin.mff.cuni.cz>
On Mon, Mar 03, 2003 at 07:14:56PM +0100, Josef Zlomek wrote:
> this patch adds crossjumping of identical tablejumps. When there are
> two identical jump tables, it replaces the references to one table by
> references to another and then crossjumping deletes common instructions
> as usual resulting in deleting of one jump table. The code size is thus
> smaller.
Not ok.
You've got to do much more work to verify that this is legal on any target
for which (1) the jump table is in the text section and (2) there are
pc-relative references from the tablejump insn to the table.
As a first cut, I might allow this if !JUMP_TABLES_IN_TEXT_SECTION.
What have you tried this on other than x86?
r~