From patchwork Thu Mar 27 17:33:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Greenhalgh X-Patchwork-Id: 334437 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 D9DC614009E for ; Fri, 28 Mar 2014 04:38:13 +1100 (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=aozRYzOylvqv2POf cAz7jYLi0zXHUlKhjN1tS62yTimUaUaIIcDgsGxMYb++Vo8IcZ9tkJfxT1RLE4cG t5duOASTkC7mAfPfYFZdFvq+yH8QPdAN1bSN1DkL1LEvOAgbf3x0WO6CCVA6vrph K+RuvrY3MiIejjnr5d1Dorw6aN0= 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=JKUwh+R1bKgGSqi6YbUEVg WvjW8=; b=VTCMfAaL7AhIBhlwG7aLm4fwPuQcwt1CvCm/k3+NnOzA9naSN2E9Qa Q1kj1i+r8DyucOBDACGY4tCdWQFN/y6pq+hTg7Q5JyOSj2y8USzmurtyo3Oas95F SipAtTj5vFKJaGfH8Ay0w4Tx1tpHY7Z2mRBXO8XlMSpwXPwxxJOc4= Received: (qmail 7481 invoked by alias); 27 Mar 2014 17:35:35 -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 7283 invoked by uid 89); 27 Mar 2014 17:35:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 27 Mar 2014 17:35:31 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTED2-0008MF-EW for gcc-patches@gcc.gnu.org; Thu, 27 Mar 2014 13:35:29 -0400 Received: from service87.mimecast.com ([91.220.42.44]:50956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTED2-0008LX-21 for gcc-patches@gcc.gnu.org; Thu, 27 Mar 2014 13:35:20 -0400 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Thu, 27 Mar 2014 17:34:14 +0000 Received: from e106375-lin.cambridge.arm.com ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 27 Mar 2014 17:34:28 +0000 From: James Greenhalgh To: gcc-patches@gcc.gnu.org Cc: richard.earnshaw@arm.com, marcus.shawcroft@arm.com, philipp.tomsich@theobroma-systems.com Subject: [AArch64 costs 18/18] Dump a message if we are unable to cost an insn. Date: Thu, 27 Mar 2014 17:33:42 +0000 Message-Id: <1395941622-22926-19-git-send-email-james.greenhalgh@arm.com> In-Reply-To: <1395941622-22926-1-git-send-email-james.greenhalgh@arm.com> References: <1395941622-22926-1-git-send-email-james.greenhalgh@arm.com> MIME-Version: 1.0 X-MC-Unique: 114032717341403901 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 91.220.42.44 X-IsSubscribed: yes Hi, If we are unable to fully cost an RTX, we should return the default cost and avoid recursing to the operands. This will bias us towards picking "bigger" RTX - which presumably have been added as patterns because somebody expects them to be more efficient. To aid future debugging and development, we also dump our shortcomings. Tested on aarch64-none-elf with no issues. OK for 5.0? Thanks, James --- 2014-03-27 James Greenhalgh * config/aarch64/aarch64.c (aarch64_rtx_costs): Handle the case where we were unable to cost an RTX. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 8ebb3d0..f284641 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -5734,7 +5734,11 @@ cost_plus: /* Fall through. */ default: - break; + if (dump_file && (dump_flags & TDF_DETAILS)) + fprintf (dump_file, + "\nFailed to cost RTX. Assuming default cost.\n"); + + return true; } return false; }