-
-/* Forward declare structures for the garbage collector GTY markers. */
-#ifndef GCC_BASIC_BLOCK_H
-struct edge_def;
-typedef struct edge_def *edge;
-struct basic_block_def;
-typedef struct basic_block_def *basic_block;
-#endif
-struct static_var_ann_d;
-
-/* The reasons a variable may escape a function. */
-enum escape_type
-{
- NO_ESCAPE = 0, /* Doesn't escape. */
- ESCAPE_STORED_IN_GLOBAL = 1 << 0,
- ESCAPE_TO_ASM = 1 << 1, /* Passed by address to an assembly
- statement. */
- ESCAPE_TO_CALL = 1 << 2, /* Escapes to a function call. */
- ESCAPE_BAD_CAST = 1 << 3, /* Cast from pointer to integer */
- ESCAPE_TO_RETURN = 1 << 4, /* Returned from function. */
- ESCAPE_TO_PURE_CONST = 1 << 5, /* Escapes to a pure or constant
- function call. */
- ESCAPE_IS_GLOBAL = 1 << 6, /* Is a global variable. */
- ESCAPE_IS_PARM = 1 << 7, /* Is an incoming function argument. */
- ESCAPE_UNKNOWN = 1 << 8 /* We believe it escapes for
- some reason not enumerated
- above. */
-};
-
-/* Memory reference statistics for individual memory symbols,
- collected during alias analysis. */
-struct mem_sym_stats_d GTY(())
-{
- /* Memory symbol. */
- tree var;
-
- /* Nonzero if this entry has been assigned a partition. */
- unsigned int partitioned_p : 1;
-
- /* Nonzero if VAR is a memory partition tag that already contains
- call-clobbered variables in its partition set. */
- unsigned int has_call_clobbered_vars : 1;
-
- /* Number of direct reference sites. A direct reference to VAR is any
- reference of the form 'VAR = ' or ' = VAR'. For GIMPLE reg
- pointers, this is the number of sites where the pointer is
- dereferenced. */
- long num_direct_writes;
- long num_direct_reads;
-
- /* Number of indirect reference sites. An indirect reference to VAR
- is any reference via a pointer that contains VAR in its points-to
- set or, in the case of call-clobbered symbols, a function call. */
- long num_indirect_writes;
- long num_indirect_reads;
-
- /* Execution frequency. This is the sum of the execution
- frequencies of all the statements that reference this object
- weighted by the number of references in each statement. This is
- the main key used to sort the list of symbols to partition.
- Symbols with high execution frequencies are put at the bottom of
- the work list (ie, they are partitioned last).
- Execution frequencies are taken directly from each basic block,
- so compiling with PGO enabled will increase the precision of this
- estimate. */
- long frequency_reads;
- long frequency_writes;
-
- /* Set of memory tags that contain VAR in their alias set. */
- bitmap parent_tags;
-};
-
-typedef struct mem_sym_stats_d *mem_sym_stats_t;
-DEF_VEC_P(mem_sym_stats_t);
-DEF_VEC_ALLOC_P(mem_sym_stats_t, heap);
-
-/* Memory reference statistics collected during alias analysis. */
-struct mem_ref_stats_d GTY(())
-{
- /* Number of statements that make memory references. */
- long num_mem_stmts;
-
- /* Number of statements that make function calls. */
- long num_call_sites;
-
- /* Number of statements that make calls to pure/const functions. */
- long num_pure_const_call_sites;
-
- /* Number of ASM statements. */
- long num_asm_sites;
-
- /* Estimated number of virtual operands needed as computed by
- compute_memory_partitions. */
- long num_vuses;
- long num_vdefs;
-
- /* This maps every symbol used to make "memory" references
- (pointers, arrays, structures, etc) to an instance of struct
- mem_sym_stats_d describing reference statistics for the symbol. */
- struct pointer_map_t * GTY((skip)) mem_sym_stats;
-};