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: [PATCH, PR44503] Fixes "control flow in the middle of basic block" with -fprefetch-loop-arrays


Hi,

> Attached is the patch to fix bug 44503: "control flow in the middle of basic block" with -fprefetch-loop-arrays.
> 
> The problem is that a non-local label (for setjmp) exists in the function. When we insert a _builtin_prefetch
> call, this prefetch is considered potentially changing the control flow. We think this is, in general, a loop 
> construction problem. When the current function has non local labels, there are no natural loops in the 
> function. 

this does not make much sense to me; why should there be no natural loops?  Edges in CFG (conservatively)
correctly describe the control flow, so the loops may be detected as usual.  The correct fix is to
ensure that is_ctrl_altering_stmt does not return true for_builtin_prefetch,

Zdenek


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