From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6131 invoked by alias); 15 Oct 2010 12:09:50 -0000 Received: (qmail 6116 invoked by uid 22791); 15 Oct 2010 12:09:49 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,MISSING_MID X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Oct 2010 12:09:43 +0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/46032] openmp inhibits loop vectorization X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 15 Oct 2010 12:09:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-10/txt/msg01279.txt.bz2 Message-ID: <20101015120900.RtMaUV7Givw2Jk-9v1x5Dcuqf2oKOfbimNCiJDuJM3c@z> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46032 --- Comment #4 from Richard Guenther 2010-10-15 12:09:38 UTC --- A few things to consider: __builtin_GOMP_parallel_start (main._omp_fn.0, &.omp_data_o.1, 0); main._omp_fn.0 (&.omp_data_o.1); __builtin_GOMP_parallel_end (); for PTA purposes we can ignore that __builtin_GOMP_parallel_start calls main._omp_fn.0 and I suppose the function pointer doesn't escape through it. We can't assume that .omp_data_o.1 does not escape through __builtin_GOMP_parallel_start though, as __builtin_GOMP_parallel_end needs to be a barrier for optimization for it (and thus needs to be considered reading and writing .omp_data_o.1). As it doesn't take any arguments the only way to ensure that is by making .omp_data_o.1 escape. We could probably arrange for __builtin_GOMP_parallel_end to get &.omp_data_o.1 as argument solely for alias-analysis purposes though. In that case we could use ".xw" for __builtin_GOMP_parallel_start and ".w" for __builtin_GOMP_parallel_end.