@@ -106,7 +106,6 @@
#include "output.h"
#include "expr.h"
#include "params.h"
-#include "toplev.h" /* user_defined_section_attribute */
#include "tree-pass.h"
#include "cfgrtl.h"
#include "cfganal.h"
@@ -2890,7 +2889,7 @@ pass_partition_blocks::gate (function *fun)
we are going to omit the reordering. */
&& optimize_function_for_speed_p (fun)
&& !DECL_COMDAT_GROUP (current_function_decl)
- && !user_defined_section_attribute);
+ && !lookup_attribute ("section", DECL_ATTRIBUTES (fun->decl)));
}
unsigned
@@ -7619,8 +7619,6 @@ handle_section_attribute (tree *node, tree ARG_UNUSED (name), tree args,
goto fail;
}
- user_defined_section_attribute = true;
-
if (!VAR_OR_FUNCTION_DECL_P (decl))
{
error ("section attribute not allowed for %q+D", *node);
@@ -4454,8 +4454,6 @@ rest_of_handle_final (void)
assemble_end_function (current_function_decl, fnname);
- user_defined_section_attribute = false;
-
/* Free up reg info memory. */
free_reg_info ();
@@ -148,11 +148,6 @@ HOST_WIDE_INT random_seed;
the support provided depends on the backend. */
rtx stack_limit_rtx;
-/* True if the user has tagged the function with the 'section'
- attribute. */
-
-bool user_defined_section_attribute = false;
-
struct target_flag_state default_target_flag_state;
#if SWITCHABLE_TARGET
struct target_flag_state *this_target_flag_state = &default_target_flag_state;
@@ -74,11 +74,6 @@ extern void target_reinit (void);
/* A unique local time stamp, might be zero if none is available. */
extern unsigned local_tick;
-/* True if the user has tagged the function with the 'section'
- attribute. */
-
-extern bool user_defined_section_attribute;
-
/* See toplev.c. */
extern int flag_rerun_cse_after_global_opts;