+2015-10-01 Tom de Vries <tom@codesourcery.com>
+
+ * tree-cfg.c (dump_function_to_file): Dump function attributes using
+ __attribute__(()) string. Move dumping of function attributes to before
+ function name.
+
2015-10-01 Lynn Boger <laboger@linux.vnet.ibm.com>
PR target/66870
#include "tree-cfgcleanup.h"
#include "wide-int-print.h"
#include "gimplify.h"
+#include "attribs.h"
/* This file contains functions for building the Control Flow Graph (CFG)
for a function tree. */
&& decl_is_tm_clone (fndecl));
struct function *fun = DECL_STRUCT_FUNCTION (fndecl);
+ if (DECL_ATTRIBUTES (fndecl) != NULL_TREE)
+ {
+ fprintf (file, "__attribute__((");
+
+ bool first = true;
+ tree chain;
+ for (chain = DECL_ATTRIBUTES (fndecl); chain;
+ first = false, chain = TREE_CHAIN (chain))
+ {
+ if (!first)
+ fprintf (file, ", ");
+
+ print_generic_expr (file, get_attribute_name (chain), dump_flags);
+ if (TREE_VALUE (chain) != NULL_TREE)
+ {
+ fprintf (file, " (");
+ print_generic_expr (file, TREE_VALUE (chain), dump_flags);
+ fprintf (file, ")");
+ }
+ }
+
+ fprintf (file, "))\n");
+ }
+
current_function_decl = fndecl;
fprintf (file, "%s %s(", function_name (fun), tmclone ? "[tm-clone] " : "");
}
fprintf (file, ")\n");
- if (DECL_ATTRIBUTES (fndecl) != NULL_TREE)
- {
- fprintf (file, "[ ");
- print_generic_expr (file, DECL_ATTRIBUTES (fndecl), dump_flags);
- fprintf (file, "]\n");
- }
-
if (flags & TDF_VERBOSE)
print_node (file, "", fndecl, 2);