From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24517 invoked by alias); 17 Dec 2013 07:26:01 -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 24497 invoked by uid 89); 17 Dec 2013 07:25:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-wi0-f177.google.com Received: from mail-wi0-f177.google.com (HELO mail-wi0-f177.google.com) (209.85.212.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 17 Dec 2013 07:25:58 +0000 Received: by mail-wi0-f177.google.com with SMTP id cc10so3210418wib.4 for ; Mon, 16 Dec 2013 23:25:55 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.180.36.40 with SMTP id n8mr1577816wij.54.1387265155462; Mon, 16 Dec 2013 23:25:55 -0800 (PST) Received: by 10.216.82.68 with HTTP; Mon, 16 Dec 2013 23:25:55 -0800 (PST) In-Reply-To: <52AFF1FD.9010003@cse.iitb.ac.in> References: <1387243963.25856.19.camel@surprise> <52AFF1FD.9010003@cse.iitb.ac.in> Date: Tue, 17 Dec 2013 07:26:00 -0000 Message-ID: Subject: Re: GIMPLE pass - Assignment evaluation From: Sandeep K Chaudhary To: "Uday P. Khedker" Cc: David Malcolm , "gcc-help@gcc.gnu.org" , gcc@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-12/txt/msg00116.txt.bz2 Thank you so much, Prof. Khedkar ! I will go through the slides and other resources that you pointed out. GRC workshops/tutorials are great. These helped me get started with GCC when I knew almost nothing about GCC internals. I will get back with specific queries (if any) after going through these. Thanks and regards, Sandeep. On Tue, Dec 17, 2013 at 1:41 AM, Uday P. Khedker wrote: > 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 >> > > -- Thanks and regards, Sandeep K Chaudhary.