This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[GOOGLE] Do not partition the cold/hot sections of a function with "section" attribute


This currently puts split sections together again in the specified
section and breaks DWARF output. This patch disables the partitioning
for such functions.

--

2014-08-06  Yi Yang  <ahyangyi@google.com>

gcc:
    * bb-reorder.c (gate_handle_partition_blocks): Add a check for "section"
attribute.

diff --git gcc/bb-reorder.c gcc/bb-reorder.c
index fa6f62f..09449c6 100644
--- gcc/bb-reorder.c
+++ gcc/bb-reorder.c
@@ -2555,6 +2555,7 @@ gate_handle_partition_blocks (void)
      we are going to omit the reordering.  */
   && optimize_function_for_speed_p (cfun)
   && !DECL_ONE_ONLY (current_function_decl)
+  && !DECL_SECTION_NAME (current_function_decl)
   && !user_defined_section_attribute);
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]