This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, PR44503] Fixes "control flow in the middle of basic block" with -fprefetch-loop-arrays
- From: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- To: "Fang, Changpeng" <Changpeng dot Fang at amd dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "rguenther at suse dot de" <rguenther at suse dot de>, "sebpop at gmail dot com" <sebpop at gmail dot com>
- Date: Tue, 15 Jun 2010 21:27:05 +0200
- Subject: Re: [PATCH, PR44503] Fixes "control flow in the middle of basic block" with -fprefetch-loop-arrays
- References: <D4C76825A6780047854A11E93CDE84D02F773E@SAUSEXMBP01.amd.com>
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