This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Extending jumps after block reordering
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: "Gregory B. Prokopski" <gproko at sable dot mcgill dot ca>
- Cc: gcc at gcc dot gnu dot org, Ian Lance Taylor <iant at google dot com>, Jim Wilson <wilson at specifix dot com>
- Date: Fri, 2 Nov 2007 09:56:07 +0100
- Subject: Re: Extending jumps after block reordering
- References: <20071031163158.GB745@gadek.cs.mcgill.ca>
> Questions:
> * shorten_branches() computes sizes of instructions so I know what the
> distance is between a jump instr and its target label. But how do I know
> what is the maximum distance each kind of branch can safely take?
> bb-reorder.c assumes that its only when cold/hot partitions are crossed
> it has to use indirect jumps, which is not the appropriate test in my case.
You cannot easily, it's buried in the architecture back-ends.
> * do I get it right that shorten_branches() does not really modify
> instructions but it helps to shorten branches by providing more accurate
> insns lengths?
Yes, but this should work automatically. IOW, as Ian said, you shouldn't need
to do anything special. Maybe it's simply a latent bug in the PPC back-end.
--
Eric Botcazou