From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32219 invoked by alias); 1 Jun 2011 21:24:13 -0000 Received: (qmail 32210 invoked by uid 22791); 1 Jun 2011 21:24:12 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 01 Jun 2011 21:23:57 +0000 Received: from kpbe19.cbf.corp.google.com (kpbe19.cbf.corp.google.com [172.25.105.83]) by smtp-out.google.com with ESMTP id p51LNt70023516 for ; Wed, 1 Jun 2011 14:23:55 -0700 Received: from yxe42 (yxe42.prod.google.com [10.190.2.42]) by kpbe19.cbf.corp.google.com with ESMTP id p51LMlA1024705 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Wed, 1 Jun 2011 14:23:53 -0700 Received: by yxe42 with SMTP id 42so134652yxe.2 for ; Wed, 01 Jun 2011 14:23:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.151.79.14 with SMTP id g14mr31102ybl.187.1306963433365; Wed, 01 Jun 2011 14:23:53 -0700 (PDT) Received: by 10.151.26.21 with HTTP; Wed, 1 Jun 2011 14:23:53 -0700 (PDT) In-Reply-To: <20110601231202.224188ad.basile@starynkevitch.net> References: <20110601231202.224188ad.basile@starynkevitch.net> Date: Wed, 01 Jun 2011 21:24:00 -0000 Message-ID: Subject: Re: Dump before flag From: Xinliang David Li To: Basile Starynkevitch Cc: GCC Patches Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-IsSubscribed: yes 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 X-SW-Source: 2011-06/txt/msg00108.txt.bz2 On Wed, Jun 1, 2011 at 2:12 PM, Basile Starynkevitch wrote: > On Wed, 1 Jun 2011 13:26:24 -0700 > Xinliang David Li wrote: > >> Hi, this is a simple patch that support dump_before flag. E.g, >> >> -fdump-tree-pre-before >> >> This is useful for diffing the the IR before and after a pass. > > Perhaps you forgot to actually attach the patch? Right -- attached in a follow up email. > >> Gcc dumping needs more cleanups -- such as allowing IR only dump, >> allowing IR dumping for a particular function etc. The exposure of >> 'dumpfile' (instead of a dumping_level () function) makes those change >> a little messy, but can be done. > > I don't understand what you mean by a dumping_level () function. What > should that hypothetical function do? (I'm wrongly guessing it would > return an integer, but IIRC dumpfile is a FILE*) THere are two sources of dump: 1) IR dump performed by pass manager 2) pass specific debugging dump (the verbosity is controlled by -details fl= ag). 2) is the part that is messy and needs cleanup. Every pass just checks if dump_file is null or not and decide to dump the debugging info -- there is no easy way to turn it on and off. Ideally, individual pass should call int debug_dump_level () -- dumps when it returns > 0. With that in place, the dump flag -fdump-xxx-yyy-ir_only can be easily implemented -- it only turns on pass manager dump, but lowers the debug dump level to 0. David > > Regards > > -- > Basile STARYNKEVITCH =A0 =A0 =A0 =A0 http://starynkevitch.net/Basile/ > email: basilestarynkevitchnet mobile: +33 6 8501 2359 > 8, rue de la Faiencerie, 92340 Bourg La Reine, France > *** opinions {are only mine, sont seulement les miennes} *** >