Re: [RFC] noipa attribute (was Re: How to avoid constant propagation into functions?)

2016-12-16 Thread Martin Jambor
Hi, On Fri, Dec 16, 2016 at 02:31:48PM +0100, Jakub Jelinek wrote: > Suggestions how to test that IPA-SRA and IPA-PTA aren't happening? > Anything else we need to cover? > I would use some test from gcc/testsuite/gcc.dg/ipa/ipa-sra-*.c, add the attribute and negate the scan-dump test. Martin

Re: [RFC] noipa attribute (was Re: How to avoid constant propagation into functions?)

2016-12-16 Thread Jakub Jelinek
On Fri, Dec 16, 2016 at 10:47:34AM +0100, Richard Biener wrote: > On Thu, 15 Dec 2016, Florian Weimer wrote: > > > * Jakub Jelinek: > > > > > + if (lookup_attribute ("used", attributes) == NULL) > > > + attributes = tree_cons (get_identifier ("used"), NULL, attributes); > > > > Attribute

Re: [RFC] noipa attribute (was Re: How to avoid constant propagation into functions?)

2016-12-16 Thread Richard Biener
On Thu, 15 Dec 2016, Florian Weimer wrote: > * Jakub Jelinek: > > > + if (lookup_attribute ("used", attributes) == NULL) > > + attributes = tree_cons (get_identifier ("used"), NULL, attributes); > > Attribute “used” seems different to me from the rest. Based on the > documentation, I

Re: [RFC] noipa attribute (was Re: How to avoid constant propagation into functions?)

2016-12-15 Thread Jakub Jelinek
On Thu, Dec 15, 2016 at 10:10:31PM +0100, Jan Hubicka wrote: > > So here is a proof of concept of an attribute that disables inlining, > > cloning, ICF, IPA VRP, IPA bit CCP, IPA RA, pure/const/throw discovery. > > Does it look reasonable? Anything still missing? > > I think you also want to

Re: [RFC] noipa attribute (was Re: How to avoid constant propagation into functions?)

2016-12-15 Thread Florian Weimer
* Alexander Monakov: > 2. Can we gently suggest to readers of documentation that this was > invented for use in the GCC testsuite, and encourage them to seek > proper alternatives, e.g.: > > This attribute is exposed for the purpose of testing the compiler. > In general it should be

Re: [RFC] noipa attribute (was Re: How to avoid constant propagation into functions?)

2016-12-15 Thread Jan Hubicka
> Hi! > > So here is a proof of concept of an attribute that disables inlining, > cloning, ICF, IPA VRP, IPA bit CCP, IPA RA, pure/const/throw discovery. > Does it look reasonable? Anything still missing? I think you also want to disable optimizations we do about local functions (stack

Re: [RFC] noipa attribute (was Re: How to avoid constant propagation into functions?)

2016-12-15 Thread Florian Weimer
* Jakub Jelinek: > On Thu, Dec 15, 2016 at 07:11:09PM +0100, Florian Weimer wrote: >> * Jakub Jelinek: >> >> > + if (lookup_attribute ("used", attributes) == NULL) >> > + attributes = tree_cons (get_identifier ("used"), NULL, attributes); >> >> Attribute “used” seems different to me from

Re: [RFC] noipa attribute (was Re: How to avoid constant propagation into functions?)

2016-12-15 Thread Jakub Jelinek
On Thu, Dec 15, 2016 at 07:11:09PM +0100, Florian Weimer wrote: > * Jakub Jelinek: > > > + if (lookup_attribute ("used", attributes) == NULL) > > + attributes = tree_cons (get_identifier ("used"), NULL, attributes); > > Attribute “used” seems different to me from the rest. Based on the

Re: [RFC] noipa attribute (was Re: How to avoid constant propagation into functions?)

2016-12-15 Thread Florian Weimer
* Jakub Jelinek: > + if (lookup_attribute ("used", attributes) == NULL) > + attributes = tree_cons (get_identifier ("used"), NULL, attributes); Attribute “used” seems different to me from the rest. Based on the documentation, I wouldn't expect it to have any action-at-a-distance

Re: [RFC] noipa attribute (was Re: How to avoid constant propagation into functions?)

2016-12-15 Thread Alexander Monakov
On Thu, 15 Dec 2016, Jakub Jelinek wrote: > So here is a proof of concept of an attribute that disables inlining, > cloning, ICF, IPA VRP, IPA bit CCP, IPA RA, pure/const/throw discovery. > Does it look reasonable? Anything still missing? I'd like to suggest some additions to the extend.texi

[RFC] noipa attribute (was Re: How to avoid constant propagation into functions?)

2016-12-15 Thread Jakub Jelinek
Hi! So here is a proof of concept of an attribute that disables inlining, cloning, ICF, IPA VRP, IPA bit CCP, IPA RA, pure/const/throw discovery. Does it look reasonable? Anything still missing? No testsuite coverage yet, I bet we'd want to check for all those opts and see that they aren't