aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 3e74c7e..e9af9bf 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -4671,6 +4671,16 @@ opts_for_fn (const_tree fndecl)
return TREE_OPTIMIZATION (fn_opts);
}
+/* Return pointer to target flags of FNDECL. */
+static inline cl_target_option *
+target_opts_for_fn (const_tree fndecl)
+{
+ tree fn_opts = DECL_FUNCTION_SPECIFIC_TARGET (fndecl);
+ if (fn_opts == NULL_TREE)
+ fn_opts = target_option_default_node;
+ return TREE_TARGET_OPTION (fn_opts);
+}
+
/* opt flag for function FNDECL, e.g. opts_for_fn (fndecl, optimize) is
the optimization level of function fndecl. */
#define opt_for_fn(fndecl, opt) (opts_for_fn (fndecl)->x_##opt)