From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29148 invoked by alias); 17 Dec 2013 06:41:29 -0000 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 Received: (qmail 29128 invoked by uid 89); 17 Dec 2013 06:41:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: smtp1.iitb.ac.in Received: from smtp1.iitb.ac.in (HELO smtp1.iitb.ac.in) (103.21.127.13) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Dec 2013 06:41:27 +0000 Received: from ldns1.iitb.ac.in (ldns1.iitb.ac.in [10.200.12.1]) by smtp1.iitb.ac.in (Postfix) with SMTP id AF2A5B9 for ; Tue, 17 Dec 2013 12:11:23 +0530 (IST) Received: (qmail 11109 invoked by uid 510); 17 Dec 2013 12:11:23 +0530 X-Qmail-Scanner-Diagnostics: from 10.200.1.25 by ldns1 (envelope-from , uid 501) with qmail-scanner-2.11 spamassassin: 3.3.2. mhr: 1.0. {clamdscan: 0.98-exp-debug/18245} Clear:RC:1(10.200.1.25):SA:0(1.5/4.0):. Processed in 3.476177 secs; 17 Dec 2013 12:11:23 +0530 X-Envelope-From: uday@cse.iitb.ac.in X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received: from unknown (HELO ldns1.iitb.ac.in) (10.200.1.25) by ldns1.iitb.ac.in with SMTP; 17 Dec 2013 12:11:20 +0530 Received: from jeeves.cse.iitb.ac.in (jeeves.cse.iitb.ac.in [10.105.1.1]) by ldns1.iitb.ac.in (Postfix) with ESMTP id C282636005A; Tue, 17 Dec 2013 12:11:19 +0530 (IST) Received: by jeeves.cse.iitb.ac.in (Postfix, from userid 51934) id B6C9C8C1A10; Tue, 17 Dec 2013 12:11:19 +0530 (IST) Received: from [10.105.5.53] (uday-pc.cse.iitb.ac.in [10.105.5.53]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: uday) by jeeves.cse.iitb.ac.in (Postfix) with ESMTPSA id C4F9E8C1A08; Tue, 17 Dec 2013 12:11:17 +0530 (IST) Message-ID: <52AFF1FD.9010003@cse.iitb.ac.in> Date: Tue, 17 Dec 2013 06:41:00 -0000 From: "Uday P. Khedker" User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Sandeep K Chaudhary , David Malcolm CC: "gcc-help@gcc.gnu.org" , gcc@gcc.gnu.org Subject: Re: GIMPLE pass - Assignment evaluation References: <1387243963.25856.19.camel@surprise> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-12/txt/msg00115.txt.bz2 You may also want to go through the slides at http://www.cse.iitb.ac.in/grc/gcc-workshop-13/index.php?page=slides. In particular, http://www.cse.iitb.ac.in/grc/gcc-workshop-13/downloads/slides/Day1/gccw13-gimple-manipulation.pdf and http://www.cse.iitb.ac.in/grc/gcc-workshop-13/downloads/slides/Day2/gccw13-code-view.pdf may be of help. Unfortunately there is some problem with playing the videos of the lectures (http://www.cse.iitb.ac.in/grc/gcc-workshop-12/index.php?page=videos) but we are working on that. Uday Khedker. Sandeep K Chaudhary wrote, On Tuesday 17 December 2013 11:54 AM: > Thank you so much for the reply, David ! > > I am not sure where exactly my pass gets invoked. I will try to find it. > But the pass get invoked somewhere in the GIMPLE stage as shown in the > GCC architecture[1]. > How is it that one can dictate where the pass can be invoked? Can you > please provide some pointers/links about this? > > But looking at the GCC architecture[1], I can see that the > optimization passes come into picture only after GIMPLE and SSA stage. > I dumped the IR and other related files using -fdump-tree-all with > optimization flag -O1, and saw that the assignments have not been > evaluated for test.c.004t.gimple as well as test.c.018t.ssa. > > Also, in test.c.025t.forwprop1 and test.c.029t.copyprop1, they totally > get rid of everything in the assignments i.e. they only have the final > evaluation of the variables which is not what I want as I need > evaluation for individual statements. > > [2] provides a nice diagrammatic understanding of the relative > invocations of GCC opt passes. It is quite helpful for understanding > the relative positions of the passes. > > Thanks and regards, > Sandeep. > > [1] http://en.wikibooks.org/wiki/GNU_C_Compiler_Internals/GNU_C_Compiler_Architecture > [2] https://gcc-python-plugin.readthedocs.org/en/latest/tables-of-passes.html >