]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/function.h
c++: Handle multiple aggregate overloads [PR95319].
[thirdparty/gcc.git] / gcc / function.h
index c2596bf48d58a4d4b185af7e2bd36d5574da6b33..d55cbddd0b51f78cf272f9f660d5ee0fd006d5d6 100644 (file)
@@ -1,5 +1,5 @@
 /* Structure for saving state for a nested function.
-   Copyright (C) 1989-2019 Free Software Foundation, Inc.
+   Copyright (C) 1989-2020 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -186,12 +186,26 @@ struct GTY(()) function_subsections {
 class GTY(()) frame_space
 {
 public:
-  struct frame_space *next;
+  class frame_space *next;
 
   poly_int64 start;
   poly_int64 length;
 };
 
+/* Describe emitted calls for -fcallgraph-info.  */
+struct GTY(()) callinfo_callee
+{
+  location_t location;
+  tree decl;
+};
+
+/* Describe dynamic allocation for -fcallgraph-info=da.  */
+struct GTY(()) callinfo_dalloc
+{
+  location_t location;
+  char const *name;
+};
+
 class GTY(()) stack_usage
 {
 public:
@@ -210,6 +224,13 @@ public:
   /* Nonzero if the amount of stack space allocated dynamically cannot
      be bounded at compile-time.  */
   unsigned int has_unbounded_dynamic_stack_size : 1;
+
+  /* Functions called within the function, if callgraph is enabled.  */
+  vec<callinfo_callee, va_gc> *callees;
+
+  /* Dynamic allocations encountered within the function, if callgraph
+     da is enabled.  */
+  vec<callinfo_dalloc, va_gc> *dallocs;
 };
 
 #define current_function_static_stack_size (cfun->su->static_stack_size)
@@ -243,7 +264,7 @@ struct GTY(()) function {
   char *pass_startwith;
 
   /* The stack usage of this function.  */
-  struct stack_usage *su;
+  class stack_usage *su;
 
   /* Value histograms attached to particular statements.  */
   htab_t GTY((skip)) value_histograms;
@@ -397,6 +418,12 @@ struct GTY(()) function {
   /* Set when the function was compiled with generation of debug
      (begin stmt, inline entry, ...) markers enabled.  */
   unsigned int debug_nonbind_markers : 1;
+
+  /* Set if this is a coroutine-related function.  */
+  unsigned int coroutine_component : 1;
+
+  /* Set if there are any OMP_TARGET regions in the function.  */
+  unsigned int has_omp_target : 1;
 };
 
 /* Add the decl D to the local_decls list of FUN.  */
@@ -406,6 +433,12 @@ void add_local_decl (struct function *fun, tree d);
 #define FOR_EACH_LOCAL_DECL(FUN, I, D)         \
   FOR_EACH_VEC_SAFE_ELT_REVERSE ((FUN)->local_decls, I, D)
 
+/* Record a final call to CALLEE at LOCATION.  */
+void record_final_call (tree callee, location_t location);
+
+/* Record a dynamic allocation made for DECL_OR_EXP.  */
+void record_dynamic_alloc (tree decl_or_exp);
+
 /* If va_list_[gf]pr_size is set to this, it means we don't know how
    many units need to be saved.  */
 #define VA_LIST_MAX_GPR_SIZE   255