Hi, On Wed, Dec 02 2020, Jan Hubicka wrote: >> We create an IPA SRA (which has DECL_IS_MALLOC set to false), but later >> IPA pure const propagates malloc attributes. I think we should not set >> it for a void returning functions. >> >> Patch can bootstrap on x86_64-linux-gnu and survives regression tests. >> >> Ready to be installed? >> Thanks, >> Martin >> >> gcc/ChangeLog: >> >> PR ipa/98075 >> * cgraph.c (cgraph_node::dump): Dump decl_is_malloc flag. >> * ipa-pure-const.c (propagate_malloc): Do not set malloc >> attribute for void functions. > > This is OK, extra credit would be for not collecting state here. I plan > to avoid stremaing useless pure-const summaries (to fight memory > fragmentation at WPA time) so it would be nice to have an easy way to say that > summary is not interesting.
If I understood Martin's description well, it is an IPA-SRA created clone that is a void function, not the original. So it is not known that the information is useless until the WPA stage. Or do I misunderstand the issue? Thanks, Martin