From patchwork Mon Aug 31 19:58:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 512579 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 16B5E14029D for ; Tue, 1 Sep 2015 05:58:25 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=i8n9RKlX; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=i4coZGekkC9SXdABMyzNdDkxEwShj1e46S9Rxy5qdV6jaOGAK3 usvOmR8cSbm/gs5npqojtb9GtSsBKlPXGMyExRjQNnGcbhnILgOF/hpDUmL118bz vHWDbC9EQu1TWQ1Fq5XZsqbtGbaNPsR2vPghcerlMjFNFkiTcsJo5AVhE= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=DIvjJHQNp9zTzKMlnI5JSfi2U6E=; b=i8n9RKlXkhxGN59VFESA AdIn8Calgfp6y/peI76p4aXl0XcrkEiC62P9+ETpENbgqES0E3wYfxYLABZ06ayN +doLPvOGE8kxLfzOHQzbtHxzYIZiDgSM0qi+UWgu/TPJZDU0eTCdWTpAHXu+LoH3 kB5CqT7+W2xNnu93LiriiTY= Received: (qmail 40028 invoked by alias); 31 Aug 2015 19:58:19 -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 40018 invoked by uid 89); 31 Aug 2015 19:58:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=BAYES_05, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qk0-f180.google.com Received: from mail-qk0-f180.google.com (HELO mail-qk0-f180.google.com) (209.85.220.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 31 Aug 2015 19:58:17 +0000 Received: by qkcj187 with SMTP id j187so14516112qkc.2 for ; Mon, 31 Aug 2015 12:58:16 -0700 (PDT) X-Received: by 10.55.192.26 with SMTP id o26mr12129952qki.89.1441051095828; Mon, 31 Aug 2015 12:58:15 -0700 (PDT) Received: from ?IPv6:2601:181:c000:c497:a2a8:cdff:fe3e:b48? ([2601:181:c000:c497:a2a8:cdff:fe3e:b48]) by smtp.googlemail.com with ESMTPSA id m6sm9443361qkl.23.2015.08.31.12.58.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Aug 2015 12:58:15 -0700 (PDT) To: GCC Patches From: Nathan Sidwell Subject: [gomp4]minor libgomp cleanup Message-ID: <55E4B1D5.607@acm.org> Date: Mon, 31 Aug 2015 15:58:13 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In excising shared_size, I stumbled upon this bit of strangeness. Attaching a new node onto the end of a singly linked list is not complicated ... nathan 2015-08-31 Nathan Sidwell * oacc-parallel.c (GOACC_register_static): Remove superfluous NULL check. Index: libgomp/oacc-parallel.c =================================================================== --- libgomp/oacc-parallel.c (revision 227353) +++ libgomp/oacc-parallel.c (working copy) @@ -673,12 +661,9 @@ GOACC_register_static (void *addr, int s s->size = (size_t) size; s->mask = mask; s->free = false; - s->next = NULL; - - if (oacc_statics) - s->next = oacc_statics; + s->next = oacc_statics; - oacc_statics = s; + oacc_statics = s; } void