From patchwork Fri Oct 30 22:16:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 538533 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 51EFA1402D2 for ; Sat, 31 Oct 2015 09:16:28 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=BQjRJmW9; 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 :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=WJC29ZxeiR44BxkLg LCn4ZWZ37A1pchFusOEqxdZ70Pu3pSiCWCmGYNvePdIG5WlmkosMi60CkgUfgRUA bhx1BuOSN5VENjIO9JkdEwhTTEesyIDptawk536Y4kK/ef23mUMQORVNpKVHbOh+ 29pGX5EapuISs8kQOr9u3T4/qI= 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 :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=nVazJaAQgLWXu8ecQ8FTF2N suzs=; b=BQjRJmW9aUrfEszo4y4vaoUZ/B/UOsTYio+2LLKF1Y1rYimUz2beRhe LRu5YcXEAkwIZWROpKvqt8g6JRYsWkwIfwAx5jiWpEv9VTdkmncr8kCBaQWIy7Ln cmUbAeLIGBu7aeh29Snts7FeDEsEh89ULb+q66FcAJOiVO8f94bU= Received: (qmail 41875 invoked by alias); 30 Oct 2015 22:16: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 41864 invoked by uid 89); 30 Oct 2015 22:16:19 -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-pa0-f50.google.com Received: from mail-pa0-f50.google.com (HELO mail-pa0-f50.google.com) (209.85.220.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 30 Oct 2015 22:16:15 +0000 Received: by padhy1 with SMTP id hy1so79693954pad.0 for ; Fri, 30 Oct 2015 15:16:13 -0700 (PDT) X-Received: by 10.66.218.230 with SMTP id pj6mr11439913pac.104.1446243373787; Fri, 30 Oct 2015 15:16:13 -0700 (PDT) Received: from ?IPv6:2600:1010:b062:a177:a2a8:cdff:fe3e:b48? ([2600:1010:b062:a177:a2a8:cdff:fe3e:b48]) by smtp.googlemail.com with ESMTPSA id ea5sm9997502pbc.92.2015.10.30.15.16.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Oct 2015 15:16:13 -0700 (PDT) Subject: Re: cgraph offloading error? To: Jeff Law , Jakub Jelinek , Thomas Schwinge , GCC Patches References: <5633D88E.4080900@acm.org> <5633D8E8.104@redhat.com> <5633DB4A.6080707@acm.org> <5633E108.5050704@redhat.com> From: Nathan Sidwell Message-ID: <5633EC2B.3090405@acm.org> Date: Fri, 30 Oct 2015 15:16:11 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <5633E108.5050704@redhat.com> On 10/30/15 14:28, Jeff Law wrote: > So when we don't use src_reg or dst_mode, we'll get a warning about the unused > variable. I guess this is the first port where HARD_REGNO_NREGS is a constant. Yeah, I noticed that when first lookingat the port, but as it wasn't (apparently) broken ... > Second, MOVE_MAX is 4. That's causing out-of-bounds array access warnings in > various places. > There were a variety of other problems associated with MOVE_MAX being smaller > than a word. If I change MOVE_MAX to 8, then everything is good. Makes sense. Testing attached ... nathan 2015-10-30 Jeff Law Nathan Sidwell * config/nvptx/nvptx.h (HARD_REGNO_NREGS): Avoid warning on unused args. (MOVE_MAX): Set to 8. Index: config/nvptx/nvptx.h =================================================================== --- config/nvptx/nvptx.h (revision 229595) +++ config/nvptx/nvptx.h (working copy) @@ -88,7 +88,7 @@ #define CALL_USED_REGISTERS \ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } -#define HARD_REGNO_NREGS(regno, mode) 1 +#define HARD_REGNO_NREGS(regno, mode) ((void)regno, (void)mode, 1) #define CANNOT_CHANGE_MODE_CLASS(M1, M2, CLS) ((CLS) == RETURN_REG) #define HARD_REGNO_MODE_OK(REG, MODE) nvptx_hard_regno_mode_ok (REG, MODE) @@ -356,7 +356,7 @@ struct GTY(()) machine_function #define FLOAT_STORE_FLAG_VALUE(MODE) REAL_VALUE_ATOF("1.0", (MODE)) #define CASE_VECTOR_MODE SImode -#define MOVE_MAX 4 +#define MOVE_MAX 8 #define MOVE_RATIO(SPEED) 4 #define TRULY_NOOP_TRUNCATION(outprec, inprec) 1 #define FUNCTION_MODE QImode