From patchwork Mon Oct 8 22:51:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 980854 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-487170-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="XzDZeIHH"; dkim-atps=neutral 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 42TbFq19TCz9sBk for ; Tue, 9 Oct 2018 09:51:41 +1100 (AEDT) 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:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=AqJhcLQAq0gbZjMY MPcd8oY55bmgWbTXzlIOoWJUUqZT7XUvs6vkW+pLJa10XMcq9MV3oxoVD7MtB1ot xuGitI4bR3obqiLiQxNw7G3pOTYZ8qO1M7dbTmY+ah9I7RY5Arxrwg8foAssM7RG YG6/ArcaQ8DFN9/qlMnjXvXQQKc= 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:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=hwgzE6hlTVpXjmIC7zVHEI M94kg=; b=XzDZeIHHRrh3BZBvHkHm3p3CyGTGL9hiIBa5eqEFntaLE9nGDgwUE5 bePPMvgzfqTqD5ACroN+tJJJ/tNNxk56TMU6g9ZDocOm4r7mIxQsId+tURPfWAqi N24hd+7164G6I2Sg/ep5N1XRRfUqVtoEM29PcgS8qs7Bga0A3m6D8= Received: (qmail 66541 invoked by alias); 8 Oct 2018 22:51:33 -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 66518 invoked by uid 89); 8 Oct 2018 22:51:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Accept, 264863, UD:column, Hx-languages-length:1599 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 08 Oct 2018 22:51:32 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id D9585823BD for ; Tue, 9 Oct 2018 00:51:29 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Kvo2BsdTH0UM for ; Tue, 9 Oct 2018 00:51:29 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id B4F388139A for ; Tue, 9 Oct 2018 00:51:29 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Print column information in RTL dumps Date: Tue, 09 Oct 2018 00:51:29 +0200 Message-ID: <2286405.mCSJHDhb4s@polaris> MIME-Version: 1.0 Now that -gcolum-info is the default, I think that it makes sense to print the column info in the RTL dumps to be able to find out where numbers come from. Tested on x86_64-suse-linux, applied on the mainline. 2018-10-08 Eric Botcazou * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column information. 2018-10-08 Eric Botcazou * gcc.target/i386/vararg-loc.c: Accept a column number. Index: print-rtl.c =================================================================== --- print-rtl.c (revision 264863) +++ print-rtl.c (working copy) @@ -398,7 +398,8 @@ rtx_writer::print_rtx_operand_code_i (co if (INSN_HAS_LOCATION (in_insn)) { expanded_location xloc = insn_location (in_insn); - fprintf (m_outfile, " \"%s\":%i", xloc.file, xloc.line); + fprintf (m_outfile, " \"%s\":%i:%i", xloc.file, xloc.line, + xloc.column); } #endif } Index: testsuite/gcc.target/i386/vararg-loc.c =================================================================== --- testsuite/gcc.target/i386/vararg-loc.c (revision 264863) +++ testsuite/gcc.target/i386/vararg-loc.c (working copy) @@ -23,5 +23,5 @@ f (int a, ...) /* 8. */ } /* { dg-final { scan-rtl-dump-not "vararg-loc\\.c.:\[6789\] " "final" } } */ -/* { dg-final { scan-rtl-dump "vararg-loc\\.c.:18 " "final" } } */ -/* { dg-final { scan-rtl-dump "vararg-loc\\.c.:20 " "final" } } */ +/* { dg-final { scan-rtl-dump "vararg-loc\\.c.:18:\[0-9\]+ " "final" } } */ +/* { dg-final { scan-rtl-dump "vararg-loc\\.c.:20:\[0-9\]+ " "final" } } */