SourceForge has been redesigned. Learn more.

#1 prefetch instructions moved out of spawn


When a prefetch for a fixed location is encountered, it doesn't have any dependencies, causing it to be scheduled as the first instruction in the region. This can move it beyond the spawn instruction.

Solution: add dependency between the spawn and the prefetch instructions in the block.

Note: An attempt to handle some cases has been implemented, look in gcc-4.0.2/gcc/sched-rgn.c:1650. However, this doesn't work in all cases, it just prevents prefetches to be moved beyond a basic-block boundary. But when there is only one basic block in the region containing the spawn, it can be moved beyond the spawn.

The attached file, when compiled with linear prefetching enabled, exhibits this case.


  • George Caragea

    George Caragea - 2008-07-20

    causes linear prefetch bug

  • George Caragea

    George Caragea - 2008-07-20
    • assigned_to: nobody --> georgecaragea

Log in to post a comment.