Paulo J. Matos wrote on 01/30/07 10:11:
Well, I spent the morning looking at the code and since what I need is
only the flow of gcc up until I have the GIMPLE tree, I could add a
pass after the pass which generates the gimple tree, in that pass I do
what I need with the gimple tree and then call exit(). Would this be a
good idea?
It would probably not be a good idea. Passes are called for each
function in the callgraph. If you stop immediately after your pass, you
will leave all the other functions unprocessed.
What is it that you want to do? If you need dataflow information, you
probably also need to have the GIMPLE code in SSA form.
If yes, then the idea would be to create a pass and add it in passes.c
after the line
NEXT_PASS (pass_lower_cf);
since from what I heard in #gcc, this is where the gimple tree is
created, right?
Well, it depends on what you need. If your pass can work in high GIMPLE
then you can insert it before that. pass_lower_cf lowers control flow
and lexical scopes, but not EH.
Perhaps if you describe a little bit what you are trying to do, we can
give you a better idea.