Re: Finding all CALL_EXPR tree nodes during GENERIC

2017-11-21 Thread Katsunori Kumatani
On Mon, Nov 20, 2017 at 12:32 PM, Richard Biener wrote: > On Sun, Nov 19, 2017 at 9:27 PM, Katsunori Kumatani > wrote: >> Yes, it seems walk_tree does the job, I was probably doing something >> wrong before. Thank you. >> >> I have a question about it. Am I correct in assuming I only have to >> c

Re: Finding all CALL_EXPR tree nodes during GENERIC

2017-11-20 Thread Richard Biener
On Sun, Nov 19, 2017 at 9:27 PM, Katsunori Kumatani wrote: > Yes, it seems walk_tree does the job, I was probably doing something > wrong before. Thank you. > > I have a question about it. Am I correct in assuming I only have to > check the subtrees of nodes that satisfy EXPR_P? So for nodes that

Re: Finding all CALL_EXPR tree nodes during GENERIC

2017-11-19 Thread Katsunori Kumatani
Yes, it seems walk_tree does the job, I was probably doing something wrong before. Thank you. I have a question about it. Am I correct in assuming I only have to check the subtrees of nodes that satisfy EXPR_P? So for nodes that aren't EXPR_P, can I just set *walkSubtrees to 0, or will that miss s

Re: Finding all CALL_EXPR tree nodes during GENERIC

2017-11-18 Thread Richard Biener
On November 18, 2017 5:38:35 PM GMT+01:00, Katsunori Kumatani wrote: >Hello, I'm doing some testing with a gcc plugin (also helped me >understand a lot of how GCC works) but I've hit a roadblock. > >I want to find all of a function body's CALL_EXPR nodes (i.e. what >calls it has) early during GEN

Finding all CALL_EXPR tree nodes during GENERIC

2017-11-18 Thread Katsunori Kumatani
Hello, I'm doing some testing with a gcc plugin (also helped me understand a lot of how GCC works) but I've hit a roadblock. I want to find all of a function body's CALL_EXPR nodes (i.e. what calls it has) early during GENERIC, so I assume the PLUGIN_PRE_GENERICIZE hook is what I should use right?