Re: Basic block reordering hampering do-loop conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ayonam Ray <ayonam@xxxxxxxxx> writes:

> My architecture has a hardware loop implementation which works only if
> there are no conditional branches in the loop body.  We have
> implemented the doloop_begin and doloop_end RTLs and also the target
> macro TARGET_INVALID_WITHIN_DOLOOP.
>
> The optimization works correctly except that in some cases the basic
> block reordering pass (and possibly some other passes) reorder the
> blocks in such a manner that the body of the loop no longer remains as
> a single basic block or even successive basic blocks that fall through
> to the next, even though the original code has no branches within the
> loop body.
>
> This makes the final code generation impossible since the doloop
> specific instructions can no longer be generated.
>
> Any suggestions at preventing the basic block reordering happening for
> such loops?  We tried turning off the basic block reorder pass but
> then some other pass appears to still mess it up.

If you don't have any branches in the loop body then I'm not sure why
you get multiple basic blocks.

I don't know of any easy way to prevent the compiler from rearranging
basic blocks.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux