From patchwork Mon Nov 9 17:40:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 541885 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 016A71402C2 for ; Tue, 10 Nov 2015 04:40:13 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=puCapuD0; 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=c/NwBJrZA8Oc0VHUCtyQiCjMh5COn9TVNAaqlJbqlVEmz42nqn kbpwZwrQFN2AvIvQvhGY4jaGuxoDu/Z7LsVLynTYfMIGH6eQeh5lD6YBaVYP7WF7 /gPBX9A4VI5SKzVMITJwIt8LMUzb5G2gpA++qTIUxSKQXciUtwGySzY4E= 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=go3Z7yxsKqdCXkAgHQoz4VO1sDg=; b=puCapuD05MekCiAw1J++ c3Xqx/JvvXmQaY2QEwnr4h75A2b5zUAjJPP6Fs7DFDzOKY2uXhqetkhKfZhwvH/a 5VMt5IK0/aGKE1rWNmwSOtlRqK5jeustsknsP31L5mboCTL8kS7vgdv8g+71li4H UBe+qYOyhzRqeHvxu+goaok= Received: (qmail 118614 invoked by alias); 9 Nov 2015 17:40:06 -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 118557 invoked by uid 89); 9 Nov 2015 17:40:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qk0-f182.google.com Received: from mail-qk0-f182.google.com (HELO mail-qk0-f182.google.com) (209.85.220.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 09 Nov 2015 17:40:03 +0000 Received: by qkcl124 with SMTP id l124so74145716qkc.3 for ; Mon, 09 Nov 2015 09:40:01 -0800 (PST) X-Received: by 10.55.25.31 with SMTP id k31mr31569505qkh.75.1447090801612; Mon, 09 Nov 2015 09:40:01 -0800 (PST) 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 c185sm5303626qka.44.2015.11.09.09.40.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Nov 2015 09:40:01 -0800 (PST) To: GCC Patches From: Nathan Sidwell Subject: [gomp4] remove IFN_GOACC_DIM handling from device_lower Message-ID: <5640DA70.4010001@acm.org> Date: Mon, 9 Nov 2015 12:40:00 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 I've committed this to gomp4, the relevant handling is in gimple-fold now. nathan 2015-11-09 Nathan Sidwell * omp-low.c (oacc_xform_dim): Delete. (execute_oacc_device_lower): Remove IFN_GOACC_DIM_POS, IFN_GOACC_DIM_SIZE handling. Index: omp-low.c =================================================================== --- omp-low.c (revision 230022) +++ omp-low.c (working copy) @@ -18835,38 +18835,6 @@ omp_finish_file (void) } } -/* Transform oacc_dim_size and oacc_dim_pos internal function calls to - constants, where possible. */ - -static bool -oacc_xform_dim (gcall *call, const int dims[], bool is_pos) -{ - tree arg = gimple_call_arg (call, 0); - unsigned axis = (unsigned)TREE_INT_CST_LOW (arg); - int size = dims[axis]; - - if (!size) - /* Dimension size is dynamic. */ - return false; - - if (is_pos) - { - if (size != 1) - /* Size is more than 1, so POS might be non-zero. */ - return false; - size = 0; - } - - /* Replace the internal call with a constant. */ - tree lhs = gimple_call_lhs (call); - gimple *g = gimple_build_assign - (lhs, build_int_cst (integer_type_node, size)); - - gimple_stmt_iterator gsi = gsi_for_stmt (call); - gsi_replace (&gsi, g, false); - return true; -} - /* Find the number of threads (POS = false), or thread number (POS = true) for an OpenACC region partitioned as MASK. Setup code required for the calculation is added to SEQ. */ @@ -19877,15 +19845,6 @@ execute_oacc_device_lower () { default: break; - case IFN_GOACC_DIM_POS: - case IFN_GOACC_DIM_SIZE: - if (gimple_call_lhs (call) == NULL_TREE) - remove = true; - else if (oacc_xform_dim (call, dims, - ifn_code == IFN_GOACC_DIM_POS)) - rescan = true; - break; - case IFN_GOACC_LOOP: oacc_xform_loop (call); rescan = true;