This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Dumping tree with no opt flag
Wow, that was quick. :)
Diego Novillo wrote:
> On 7/30/07 11:15 AM, Emmanuel Fleury wrote:
>
>> I just would like to know if it would be possible to get the
>> final_cleanup target even though no optimization flag has been given in
>> the command line (for now, I'm just forcing '-O1' to be present if no
>> other optimization flag has been detected in the command line).
>
> No, because the final_cleanup pass is only executed when optimizing.
> For -O0, you need to determine what's the last phase executed and
> request a dump to that phase.
Ok, this is more or less what I though. I guess that nobody want
unoptimized code in his final build, so I think I can go with my hack
(adding -O1 when needed).
> Also, future versions of GCC may not have
> this phase as the final phase, or the dump file name may change, or both.
>
> Dump files are merely debugging aids. We make no guarantees as to their
> content or naming convention.
Hum, I'm coding a tool for static and (symbolic) dynamic analysis of
code, would you recommend me a way to get the most final CFG you get
inside GCC (other than the -fdump-tree-<flags>) ???
It would be very helpful for me to get a GENERIC/GIMPLE CFG (with SSA
and so on) of the source code so that I can analyze all the languages
that go through a gimplifier. :-/
>> A final remark, not really significant, I noticed that since gcc 4.2,
>> the name of the dumped tree files have slightly changed. Indeed before,
>> I was used to <src_file_name>.t<#id>.<type> where in 4.2 it is more like
>> <src_file_name>.<#id>t.<type>.
>
> We amalgamated the dumping mechanism for trees and RTL. The 't' denotes
> a 'tree' dump, 'r' an RTL dump and 'i' an IPA dump.
Damn, you also have inter-procedural analysis dumps !
More I know about GCC, more I love it ! I'll dig this. :)
Actually, I know that these dumps are here, as you said, just for
debugging purpose but why not making them 'permanent' and kind-of
'standardized' (I mean, not changing it too frequently), so that code
analysis tools could plug on GCC ? (I know I'm asking a lot... sorry)
Regards
--
Emmanuel Fleury
The memory management on the PowerPC
can be used to frighten small children.
-- Linus Torvalds