From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66611 invoked by alias); 20 Oct 2016 14:20:33 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 66541 invoked by uid 89); 20 Oct 2016 14:20:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=Yeah, Hx-languages-length:1627, culpa, reader X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 20 Oct 2016 14:20:31 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1AB83ECFBE for ; Thu, 20 Oct 2016 14:20:30 +0000 (UTC) Received: from vpn-238-138.phx2.redhat.com (vpn-238-138.phx2.redhat.com [10.3.238.138]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9KEKTuU000741; Thu, 20 Oct 2016 10:20:29 -0400 Message-ID: <1476973228.28626.14.camel@redhat.com> Subject: Re: INSN_UIDs again (was Re: [PATCH 15/16] RTL frontend (rtl1), on top of dump reader) From: David Malcolm To: Bernd Schmidt , gcc-patches@gcc.gnu.org Date: Thu, 20 Oct 2016 14:20:00 -0000 In-Reply-To: References: <1475684110-2521-1-git-send-email-dmalcolm@redhat.com> <1475684110-2521-16-git-send-email-dmalcolm@redhat.com> <1476971747.28626.7.camel@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-10/txt/msg01650.txt.bz2 On Thu, 2016-10-20 at 16:11 +0200, Bernd Schmidt wrote: > On 10/20/2016 03:55 PM, David Malcolm wrote: > > Currently the jump insn in question looks like this: > > > > (cjump_insn (set (pc) > > (label_ref 20)) > > (nil)) > > > > With explicit INSN_UIDs it would look like this: > > > > (cjump_insn 13 (set (pc) > > (label_ref 20)) > > (nil)) > > Yeah, that wouldn't be so bad. It would also make it easier to make a > -fdump-rtl-compact flag that changes the debugging dumps to use the > compact format (we'd still need slightly different output for > pseudos). > > Still, I'd like to again encourage a mechanism where we can emit > before/after dumps and have the compiler automatically compare them > when > running the test. That wouldn't run into this particular issue. What kind of comparison would it do? I'd be wary about a purely textual comparison (e.g. "diff") - it would likely lead to fragile test cases, where minor changes to the output format mean that all the test cases need regenerating (mea culpa, I made this mistake in gcc-python-plugin's testsuite). So presumably the comparison would involve loading the "expected-after" version of the function, and doing some kind of function-level comparison on the parsed result. This sounds plausible, but would likely be a significant expansion of the scope of the project, since the existing RTL code is full of singleton global state (e.g. "crtl" aka x_rtl). So I'd prefer to leave this idea as a followup (and to implement the "explicit INSN_UIDs for everything" idea).