From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1017 invoked by alias); 7 Jun 2011 21:20:27 -0000 Received: (qmail 1008 invoked by uid 22791); 7 Jun 2011 21:20:26 -0000 X-SWARE-Spam-Status: No, hits=-2.3 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) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jun 2011 21:20:11 +0000 Received: from hpaq2.eem.corp.google.com (hpaq2.eem.corp.google.com [172.25.149.2]) by smtp-out.google.com with ESMTP id p57LKAlv006886 for ; Tue, 7 Jun 2011 14:20:10 -0700 Received: from pxi15 (pxi15.prod.google.com [10.243.27.15]) by hpaq2.eem.corp.google.com with ESMTP id p57LJ8pj005462 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Tue, 7 Jun 2011 14:20:08 -0700 Received: by pxi15 with SMTP id 15so1696990pxi.19 for ; Tue, 07 Jun 2011 14:20:08 -0700 (PDT) Received: by 10.68.15.168 with SMTP id y8mr421943pbc.337.1307481608457; Tue, 07 Jun 2011 14:20:08 -0700 (PDT) Received: from coign.google.com (dhcp-172-19-19-36.mtv.corp.google.com [172.19.19.36]) by mx.google.com with ESMTPS id b8sm566817pbj.94.2011.06.07.14.20.07 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 07 Jun 2011 14:20:07 -0700 (PDT) From: Ian Lance Taylor To: Abdul Wahid Memon Cc: gcc-help@gcc.gnu.org Subject: Re: Need info on GIMPLE References: Date: Tue, 07 Jun 2011 22:54:00 -0000 In-Reply-To: (Abdul Wahid Memon's message of "Tue, 7 Jun 2011 22:15:11 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00182.txt.bz2 Abdul Wahid Memon writes: > Does that mean that I have to traverse the control flow graph in order > to capture labels (if there are any) too. > > Lets suppose if I want to count the number of gimple statements within > the body of the loop, then definitely I need the reference of that > target label for any conditional goto statement. > It really depends on what you mean by labels. Labels that appear in user code should appear as GIMPLE_LABEL statements. Flow control that does not involve user labels is normally represented by the CFG. If you just want to count the number of GIMPLE statements, then you don't have to worry about the CFG, because it does not include GIMPLE statements. So what you need to do depends on what you trying to do. Ian