From patchwork Fri May 23 11:32:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 351812 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 0DFD1140086 for ; Fri, 23 May 2014 21:33:30 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; q=dns; s=default; b=Am7HswJnOd5kKbh0 +L/z3u9DqA6sgn65tvdSHUq90JQ/M1uHA4mQBHecdVOPgePPdaQC9xVSHlul7swa Roqz+ZJubkOlmcLeAL2UMGBc+3FP/M7wlXVjamBVQolPiTSIBQBLuYlw4Ahjs/fB hcWpbp0gNCh2AvgDIWQujNYvz08= 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 :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=default; bh=UqR7y6lwczP+QQvzlnV0Ty 7NUuc=; b=s+nnmM89Qs4aUYXuJs/ejQxfHOpAdnvygOZMQYLMpKfZ517n+pNr/Q +V2g2VOqGBBLp6SJf4IKjLEYoWSxbKnnAe+SdI7ALwu3WBycJGQrY4WfEcJArt/e l4Aiib8Uf+eEe6C8Hf1dnqeBrD/xSCg05UfrHPCq1j2rs6NsGXai0= Received: (qmail 3866 invoked by alias); 23 May 2014 11:33:24 -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 3852 invoked by uid 89); 23 May 2014 11:33:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, UPPERCASE_50_75 autolearn=no version=3.3.2 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; Fri, 23 May 2014 11:33:22 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Wnniu-0000rm-Nx from Thomas_Schwinge@mentor.com ; Fri, 23 May 2014 04:33:16 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 23 May 2014 04:33:16 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Fri, 23 May 2014 12:33:15 +0100 From: Thomas Schwinge To: CC: Subject: [COMMITTED 1/2] Just enumerate all GF_OMP_FOR_KIND_* and GF_OMP_TARGET_KIND_*. Date: Fri, 23 May 2014 13:32:50 +0200 Message-ID: <1400844780-26290-1-git-send-email-thomas@codesourcery.com> In-Reply-To: <20140320144512.GK1817@tucnak.redhat.com> References: <20140320144512.GK1817@tucnak.redhat.com> MIME-Version: 1.0 From: tschwinge gcc/ * gimple.h (enum gf_mask): Rewrite "<< 0" shift expressions used for GF_OMP_FOR_KIND_MASK, GF_OMP_FOR_KIND_FOR, GF_OMP_FOR_KIND_DISTRIBUTE, GF_OMP_FOR_KIND_SIMD, GF_OMP_FOR_KIND_CILKSIMD, GF_OMP_TARGET_KIND_MASK, GF_OMP_TARGET_KIND_REGION, GF_OMP_TARGET_KIND_DATA, GF_OMP_TARGET_KIND_UPDATE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210854 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/gimple.h | 18 +++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git gcc/ChangeLog gcc/ChangeLog index d351c0b..fa2f3c3 100644 --- gcc/ChangeLog +++ gcc/ChangeLog @@ -1,5 +1,12 @@ 2014-05-23 Thomas Schwinge + * gimple.h (enum gf_mask): Rewrite "<< 0" shift expressions used + for GF_OMP_FOR_KIND_MASK, GF_OMP_FOR_KIND_FOR, + GF_OMP_FOR_KIND_DISTRIBUTE, GF_OMP_FOR_KIND_SIMD, + GF_OMP_FOR_KIND_CILKSIMD, GF_OMP_TARGET_KIND_MASK, + GF_OMP_TARGET_KIND_REGION, GF_OMP_TARGET_KIND_DATA, + GF_OMP_TARGET_KIND_UPDATE. + * gimplify.c (omp_notice_variable) : Explicitly enumerate the expected region types. diff --git gcc/gimple.h gcc/gimple.h index 9df45de..b1970e5 100644 --- gcc/gimple.h +++ gcc/gimple.h @@ -91,17 +91,17 @@ enum gf_mask { GF_CALL_ALLOCA_FOR_VAR = 1 << 5, GF_CALL_INTERNAL = 1 << 6, GF_OMP_PARALLEL_COMBINED = 1 << 0, - GF_OMP_FOR_KIND_MASK = 3 << 0, - GF_OMP_FOR_KIND_FOR = 0 << 0, - GF_OMP_FOR_KIND_DISTRIBUTE = 1 << 0, - GF_OMP_FOR_KIND_SIMD = 2 << 0, - GF_OMP_FOR_KIND_CILKSIMD = 3 << 0, + GF_OMP_FOR_KIND_MASK = (1 << 2) - 1, + GF_OMP_FOR_KIND_FOR = 0, + GF_OMP_FOR_KIND_DISTRIBUTE = 1, + GF_OMP_FOR_KIND_SIMD = 2, + GF_OMP_FOR_KIND_CILKSIMD = 3, GF_OMP_FOR_COMBINED = 1 << 2, GF_OMP_FOR_COMBINED_INTO = 1 << 3, - GF_OMP_TARGET_KIND_MASK = 3 << 0, - GF_OMP_TARGET_KIND_REGION = 0 << 0, - GF_OMP_TARGET_KIND_DATA = 1 << 0, - GF_OMP_TARGET_KIND_UPDATE = 2 << 0, + GF_OMP_TARGET_KIND_MASK = (1 << 2) - 1, + GF_OMP_TARGET_KIND_REGION = 0, + GF_OMP_TARGET_KIND_DATA = 1, + GF_OMP_TARGET_KIND_UPDATE = 2, /* True on an GIMPLE_OMP_RETURN statement if the return does not require a thread synchronization via some sort of barrier. The exact barrier