From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3527 invoked by alias); 6 Jul 2005 12:47:41 -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 3498 invoked by uid 22791); 6 Jul 2005 12:47:36 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 06 Jul 2005 12:47:36 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j66ClZOi009247; Wed, 6 Jul 2005 08:47:35 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j66ClYV22884; Wed, 6 Jul 2005 08:47:35 -0400 Received: from topo.toronto.redhat.com (vpn50-20.rdu.redhat.com [172.16.50.20]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id j66ClX1M032596; Wed, 6 Jul 2005 08:47:34 -0400 Received: from topo.toronto.redhat.com (localhost.localdomain [127.0.0.1]) by topo.toronto.redhat.com (8.13.4/8.13.4) with ESMTP id j66ClT1w004639; Wed, 6 Jul 2005 08:47:30 -0400 Received: (from dnovillo@localhost) by topo.toronto.redhat.com (8.13.4/8.13.4/Submit) id j66ClT9t004638; Wed, 6 Jul 2005 08:47:29 -0400 Date: Wed, 06 Jul 2005 12:47:00 -0000 From: Diego Novillo To: Michael Tegtmeyer Cc: gcc@gcc.gnu.org Subject: Re: Existing tree functionality? Message-ID: <20050706124729.GA4590@topo.toronto.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-SW-Source: 2005-07/txt/msg00218.txt.bz2 On Wed, Jul 06, 2005 at 08:32:38AM -0400, Michael Tegtmeyer wrote: > Is there existing functionality somewhere to sweep a function and collect > all externally visible variables at the tree level or do I need to roll my > own? I've looked in tree.h and grepped around as much as I could but I > haven't found anything obvious. > Referenced variables are collected by tree-dfa.c:find_referenced_vars. Once collected, you can distinguish locals from globals with is_global_var(). Diego.