From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24642 invoked by alias); 3 Apr 2003 14:33:08 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 24632 invoked from network); 3 Apr 2003 14:33:07 -0000 Received: from unknown (HELO gauvain.u-strasbg.fr) (130.79.74.5) by sources.redhat.com with SMTP; 3 Apr 2003 14:33:07 -0000 Received: from pop by gauvain.u-strasbg.fr with local (Exim 3.36 #1 (Debian)) id 1915m5-0007mL-00; Thu, 03 Apr 2003 16:33:05 +0200 Date: Thu, 03 Apr 2003 16:33:00 -0000 To: Diego Novillo Cc: Matthieu Moy , "gcc@gcc.gnu.org" Subject: Re: [tree-ssa] Tree browser unstable ? Message-ID: <20030403143305.GA29423@gauvain.u-strasbg.fr> References: <1049376409.2123.30.camel@shadowfax> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1049376409.2123.30.camel@shadowfax> User-Agent: Mutt/1.4i From: =?iso-8859-1?Q?Pop_S=E9bastian?= X-SW-Source: 2003-04/txt/msg00144.txt.bz2 On Thu, Apr 03, 2003 at 08:26:48AM -0500, Diego Novillo wrote: > On Thu, 2003-04-03 at 08:02, Matthieu Moy wrote: > > It is an interesting option, but I find it very unstable. I rather > > often get error messages like this : > > > Not surprising. The tree browser is an experimental feature. You're > essentially using the initial revision of the code. > This could also happen if the function's trees are not available: have a look at the value of current_function_decl: /* The FUNCTION_DECL for the function currently being compiled, or 0 if between functions. */ tree current_function_decl; It is also possible that there are some errors in the browser's code: I didn't tested it on the c++ front-end. The walk_tree is mainly used for registering the information about the parent expressions, but you can use the browser without the "up" commands. Try for example the following patch: Index: tree-browser.c =================================================================== RCS file: /home/pop/cvsroot/gcc-cvs/gcc/gcc/Attic/tree-browser.c,v retrieving revision 1.1.2.2 diff -u -3 -p -c -r1.1.2.2 tree-browser.c *** tree-browser.c 3 Dec 2002 22:54:32 -0000 1.1.2.2 --- tree-browser.c 3 Apr 2003 14:26:38 -0000 *************** TB_parent_eq (p1, p2) *** 873,893 **** static void TB_update_up (node) ! tree node; { - while (node) - { - walk_tree (&node, store_child_info, NULL, NULL); - - /* Walk function's body. */ - if (TREE_CODE (node) == FUNCTION_DECL) - if (DECL_SAVED_TREE (node)) - walk_tree (&DECL_SAVED_TREE (node), store_child_info, NULL, NULL); - - /* Walk rest of the chain. */ - node = TREE_CHAIN (node); - } - fprintf (TB_OUT_FILE, "Up/prev expressions updated.\n"); } /* Parse the input string for determining the command the user asked for. */ --- 873,880 ---- static void TB_update_up (node) ! tree node ATTRIBUTE_UNUSED; { } /* Parse the input string for determining the command the user asked for. */