This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to create a "finish" function for a tree opt pass


On 2/29/08 12:16 AM, Haifeng He wrote:
Hi,

I have wrote a tree pass and I would like to create a "finish" function to dump
the analysis results. Since the results contains some global
information, I want to dump them
after the pass has been executed though all the functions of current
file. Is there a good way
that I can do that?

If you want to dump the IL after your pass is done, simply add TODO_dump_funcs to the todo_flags_finish field in the pass declaration.


If you need to dump other information, simply do it just before returning from the entry point function to your pass.


Diego.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]