* Bernd Schmidt <bschm...@redhat.com> [2016-11-03 13:01:32 +0100]: > On 09/14/2016 03:00 PM, Andrew Burgess wrote: > > In an attempt to get this patch merged (as I still think that its > > correct) I've investigated, and documented a little more about how I > > think things currently work. I'm sure most people reading this will > > already know this, but hopefully, if my understanding is wrong someone > > can point it out. > > gcc/ChangeLog: > > > > * gcc/bb-reorder.c: Remove 'toplev.h' include. > > (pass_partition_blocks::gate): No longer check > > user_defined_section_attribute, instead check the function decl > > for a section attribute. > > * gcc/c-family/c-common.c (handle_section_attribute): No longer > > set user_defined_section_attribute. > > * gcc/final.c (rest_of_handle_final): Likewise. > > * gcc/toplev.c: Remove definition of user_defined_section_attribute. > > * gcc/toplev.h: Remove declaration of > > user_defined_section_attribute. > > > > gcc/testsuiteChangeLog: > > > > * gcc.dg/tree-prof/section-attr-1.c: New file. > > * gcc.dg/tree-prof/section-attr-2.c: New file. > > * gcc.dg/tree-prof/section-attr-3.c: New file. > > I think the explanation is perfectly reasonable and the patch looks good, > except: > > > +__attribute__((noinline)) > > Add noclone to all of these as well.
Thanks. Considering Jeff said, I'm thinking about it, and you've said yes, and given Jeff's not got back, I'm considering this patch approved (with the fix you suggest). My only remaining concern is the new tests, I've tried to restrict them to targets that I suspect they'll pass on with: /* { dg-final-use { scan-assembler "\.section\[\t \]*\.text\.unlikely\[\\n\\r\]+\[\t \]*\.size\[\t \]*foo\.cold\.0" { target *-*-linux* *-*-gnu* } } } */ but I'm still nervous that I'm going to introduce test failures. Is there any advice / guidance I should follow before I commit, or are folk pretty relaxed so long as I've made a reasonable effort? Thanks, Andrew