From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8804 invoked by alias); 23 Mar 2017 10:53:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 8783 invoked by uid 89); 23 Mar 2017 10:53:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1031 X-HELO: smtp.ispras.ru Received: from bran.ispras.ru (HELO smtp.ispras.ru) (83.149.199.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Mar 2017 10:53:39 +0000 Received: from monopod.intra.ispras.ru (monopod.intra.ispras.ru [10.10.3.121]) by smtp.ispras.ru (Postfix) with ESMTP id DFF875FA71; Thu, 23 Mar 2017 13:53:37 +0300 (MSK) Date: Thu, 23 Mar 2017 10:53:00 -0000 From: Alexander Monakov To: Jakub Jelinek cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH 3/5] omp-offload: implement SIMT privatization, part 2 In-Reply-To: <20170323103738.GN11094@tucnak> Message-ID: References: <1490197595-31938-1-git-send-email-amonakov@ispras.ru> <1490197595-31938-4-git-send-email-amonakov@ispras.ru> <20170323103738.GN11094@tucnak> User-Agent: Alpine 2.20.13 (LNX 116 2015-12-14) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SW-Source: 2017-03/txt/msg01214.txt.bz2 On Thu, 23 Mar 2017, Jakub Jelinek wrote: > > + if (vf != 1) > > + continue; > > + unlink_stmt_vdef (stmt); > > This is weird. AFAIK unlink_stmt_vdef just replaces the uses of the vdef > of that stmt with the vuse, but it still keeps the vdef (and vuse) around > on the stmt, typically it is used when you are removing that stmt, but > that is not the case here. So why are you doing it and not say removing the > vdef? Maybe I misunderstand your question, but actually the statement is removed further below, when we break out of the switch: stmt = lhs ? gimple_build_assign (lhs, rhs) : gimple_build_nop (); gsi_replace (&gsi, stmt, false); The same tactic is already in place for cleaning up GOMP_SIMT_ORDERED_PRED. Thus, there's just one place that actually replaces statements; the body of the switch is only responsible for coming up with a suitable rhs and cleaning up vdefs for those statements where we know they would be present. Thanks. Alexander