This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Crossjumping of tablejumps


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]