From patchwork Wed Sep 26 18:28:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cesar Philippidis X-Patchwork-Id: 975326 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-486498-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="oAX0Dk01"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42L6056rsFz9s2P for ; Thu, 27 Sep 2018 04:28:52 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; q=dns; s= default; b=KS5JPnkk/qOBXd4rdUt+goLRvaxb7VUMCbZLmQ4gSdSCjLbK2kK5K el2y/XTl+QDLT8EHripYI9p/69Wpde7AKRLrys+b5y5wFAd37bLIIsWf4gIbhlII MnBxcXiOzo3/XuWeIPfdnLR+ESoriOtHJlYetVdFVHYVS2xhJ+XtLc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:message-id:date:mime-version:content-type; s= default; bh=vXyAJxPWKnlmZB5deSo3WELoops=; b=oAX0Dk01td6Gi5ev1ua5 mzYwsny37pTROW6Uo+jvNg61KXLvUPkMRw2Dy9g7Cd8AJdCDYgl1Kykz/9jq2l/P Vmr82hqWkW241pZPyI100ZIzv+M1+0ENcPPhzRIJgpb3le5xyH6M4F7CuWsZ/sW1 IzvCJILvzfHZvX4AX/hxak4= Received: (qmail 106745 invoked by alias); 26 Sep 2018 18:28:45 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 106447 invoked by uid 89); 26 Sep 2018 18:28:45 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:0700 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Sep 2018 18:28:43 +0000 Received: from svr-orw-mbx-04.mgc.mentorg.com ([147.34.90.204]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1g5EYD-00001c-Ty from Cesar_Philippidis@mentor.com for gcc-patches@gcc.gnu.org; Wed, 26 Sep 2018 11:28:41 -0700 Received: from [127.0.0.1] (147.34.91.1) by SVR-ORW-MBX-04.mgc.mentorg.com (147.34.90.204) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Wed, 26 Sep 2018 11:28:39 -0700 From: Cesar Philippidis Subject: [patch, openacc] Don't gimplify in ssa mode if seen_error in oacc_xform_loop To: "gcc-patches@gcc.gnu.org" , Thomas Schwinge Message-ID: <338501dd-e89c-b2ac-8d84-58773b72e485@codesourcery.com> Date: Wed, 26 Sep 2018 11:28:39 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Again, this is another old gomp4 patch without a corresponding test case. I'm not familiar enough with the parloops kernels implementation to know if this patch is important. However, I'm somewhat inclined to drop patches from OG8 that don't impact correctness in the test suite. What do you want to do with this patch Thomas? I bootstrapped and regtested it for x86_64 Linux with nvptx offloading. Cesar [OpenACC] Don't gimplify in ssa mode if seen_error in oacc_xform_loop 2018-XX-YY Tom de Vries Cesar Philippidis gcc/ PR tree-optimization/68977 * omp-offload.c (oacc_xform_loop): Handle seen_error () == true. (cherry picked from gomp-4_0-branch r232343 and r232344) --- diff --git a/gcc/omp-offload.c b/gcc/omp-offload.c index 3582dda3d1a..dae284fe890 100644 --- a/gcc/omp-offload.c +++ b/gcc/omp-offload.c @@ -335,7 +335,12 @@ oacc_xform_loop (gcall *call) -> chunks=ceil (range/(chunksize*threads*step)) striding=false,chunking=false -> chunk_size=ceil(range/(threads*step)),chunks=1 */ - push_gimplify_context (true); + + /* If seen_error (), we may introduce an uninitialized var due to + gimplification bailing out. If we gimplify in ssa mode, that will cause an + ICE. If we gimplify in non-ssa mode, then ssa updating will turn it into a + default definition, and we avoid the ICE. */ + push_gimplify_context (!seen_error ()); switch (code) { -- 2.17.1