On Mon, Aug 11, 2014 at 1:41 PM, Yi Yang <ahyan...@google.com> wrote: > Replace checking user_defined_section_attribute with directly checking > DECL_SECTION_NAME. The former does not work in the presence of IPA. > > See also: discussion on the same patch in Google branch: > https://gcc.gnu.org/ml/gcc-patches/2014-08/msg00749.html > > -- > > 2014-08-11 Yi Yang <ahyan...@google.com> > > gcc: > * bb-reorder.c (pass_partition_blocks::gate): Replace check. > * c-family/c-common.c (handle_section_attribute): Remove > user_defined_section_attribute > * final.c (rest_of_handle_final): ditto > * toplev.c (user_defined_section_attribute): ditto > * toplev.h (user_defined_section_attribute): ditto > > diff --git gcc/bb-reorder.c gcc/bb-reorder.c > index 96547c2..747831c 100644 > --- gcc/bb-reorder.c > +++ gcc/bb-reorder.c > @@ -95,7 +95,6 @@ > #include "expr.h" > #include "params.h" > #include "diagnostic-core.h" > -#include "toplev.h" /* user_defined_section_attribute */ > #include "tree-pass.h" > #include "df.h" > #include "bb-reorder.h" > @@ -2671,11 +2670,9 @@ pass_partition_blocks::gate (function *fun) > arises. */ > return (flag_reorder_blocks_and_partition > && optimize > - /* See gate_handle_reorder_blocks. We should not partition if > - we are going to omit the reordering. */ > && optimize_function_for_speed_p (fun) > - && !DECL_COMDAT_GROUP (current_function_decl) > - && !user_defined_section_attribute); > + && !DECL_COMDAT_GROUP (current_function_decl);
^^^ Is this extra ';' a typo? > + && !DECL_SECTION_NAME (current_function_decl)); > } > -- H.J.