Re: Identifying Pure and Const Functions

2015-05-29 Thread Pritam Gharat
I had a look at the file ipa-pure-const.c. I have wriiten a Simple IPA Pass which identifies pure and const functions in the program. I have inserted this pass after ipa-pta pass which is executed after ipa-pure-const pass. Also, the option -fipa-pure-const is enabled. I am using DECL_PURE_P(t) and

Re: Identifying Pure and Const Functions

2015-05-29 Thread Marek Polacek
On Fri, May 29, 2015 at 01:16:32PM +0530, Pritam Gharat wrote: > How do we identify whether a function is a pure or a const function? > Is there any flag associated with its cgraph_node or the tree node > (decl of cgraph_node)? You'll want to look into ipa-pure-const.c. Marek