This is the mail archive of the gcc@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: Fixing jumps reachability after block reordering


"Gregory B. Prokopski" <gadek@debian.org> writes:

> > But you seem to be within a single function, so I don't understand why
> > you have any trouble at all.  Why doesn't the shorten_branches pass
> > work for you?
> 
> I reorder the basic blocks in passes.c, right after compute_alignmnets ().
> I added a call to shorten_branches(NULL_RTX) right after my BB reordering,
> but it didn't change a thing, and I am still getting as errors:
> 
> libsablevm.s: Assembler messages:
> libsablevm.s:56077: Error: operand out of range (91824 not between -32768 and
> 32767)
> libsablevm.s:71896: Error: operand out of range (-38472 not between -32768
> and 32767)
> libsablevm.s:97418: Error: operand out of range (-51652 not between -32768
> and 32767)
> 
> Almost a hundred of these.  I would need a way to debug this problem, which
> means I'd like to detect this problem earlier, say, when I do the block
> reordering.  I thought I could do it with the algorigthm I described above.

shorten_branches should work correctly--you shouldn't need to do
anything special.  My only guess is that there is something wrong with
the way you are reordering the blocks.  For example, perhaps you are
simply reordering the CFG without reordering the insn chain.  Note
that shorten_branches is not (yet) CFG aware.  It simply walks the
insn chain.

Ian


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