This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GIMPLE pass - Assignment evaluation
- From: Sandeep K Chaudhary <babbusandy2006 at gmail dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>, gcc at gcc dot gnu dot org
- Date: Tue, 17 Dec 2013 01:24:24 -0500
- Subject: Re: GIMPLE pass - Assignment evaluation
- Authentication-results: sourceware.org; auth=none
- References: <CAEEAEzV9pkYX_fkH2R=gRSJvF6P2CdGmJuMktC31rvgu_jPuYg at mail dot gmail dot com> <1387243963 dot 25856 dot 19 dot camel at surprise>
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