Mercurial > hg > CbC > CbC_gcc
diff gcc/gimple.h @ 132:d34655255c78
update gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 10:21:07 +0900 |
parents | 367f9f4f266e 84e7813d76e9 |
children | 351920fa3827 |
line wrap: on
line diff
--- a/gcc/gimple.h Thu Oct 25 08:08:40 2018 +0900 +++ b/gcc/gimple.h Thu Oct 25 10:21:07 2018 +0900 @@ -1,6 +1,6 @@ /* Gimple IR definitions. - Copyright (C) 2007-2017 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. Contributed by Aldy Hernandez <aldyh@redhat.com> This file is part of GCC. @@ -145,7 +145,6 @@ GF_CALL_ALLOCA_FOR_VAR = 1 << 5, GF_CALL_INTERNAL = 1 << 6, GF_CALL_CTRL_ALTERING = 1 << 7, - GF_CALL_WITH_BOUNDS = 1 << 8, GF_CALL_MUST_TAIL_CALL = 1 << 9, GF_CALL_BY_DESCRIPTOR = 1 << 10, GF_CALL_NOCF_CHECK = 1 << 11, @@ -159,13 +158,11 @@ GF_OMP_FOR_KIND_FOR = 0, GF_OMP_FOR_KIND_DISTRIBUTE = 1, GF_OMP_FOR_KIND_TASKLOOP = 2, - GF_OMP_FOR_KIND_CILKFOR = 3, GF_OMP_FOR_KIND_OACC_LOOP = 4, GF_OMP_FOR_KIND_GRID_LOOP = 5, /* Flag for SIMD variants of OMP_FOR kinds. */ GF_OMP_FOR_SIMD = 1 << 3, GF_OMP_FOR_KIND_SIMD = GF_OMP_FOR_SIMD | 0, - GF_OMP_FOR_KIND_CILKSIMD = GF_OMP_FOR_SIMD | 1, GF_OMP_FOR_COMBINED = 1 << 4, GF_OMP_FOR_COMBINED_INTO = 1 << 5, /* The following flag must not be used on GF_OMP_FOR_KIND_GRID_LOOP loop @@ -202,13 +199,13 @@ GF_PREDICT_TAKEN = 1 << 15 }; -/* Currently, there are only two types of gimple debug stmt. Others are - envisioned, for example, to enable the generation of is_stmt notes - in line number information, to mark sequence points, etc. This - subcode is to be used to tell them apart. */ +/* This subcode tells apart different kinds of stmts that are not used + for codegen, but rather to retain debug information. */ enum gimple_debug_subcode { GIMPLE_DEBUG_BIND = 0, - GIMPLE_DEBUG_SOURCE_BIND = 1 + GIMPLE_DEBUG_SOURCE_BIND = 1, + GIMPLE_DEBUG_BEGIN_STMT = 2, + GIMPLE_DEBUG_INLINE_ENTRY = 3 }; /* Masks for selecting a pass local flag (PLF) to work on. These @@ -1459,6 +1456,8 @@ geh_dispatch *gimple_build_eh_dispatch (int); gdebug *gimple_build_debug_bind (tree, tree, gimple * CXX_MEM_STAT_INFO); gdebug *gimple_build_debug_source_bind (tree, tree, gimple * CXX_MEM_STAT_INFO); +gdebug *gimple_build_debug_begin_stmt (tree, location_t CXX_MEM_STAT_INFO); +gdebug *gimple_build_debug_inline_entry (tree, location_t CXX_MEM_STAT_INFO); gomp_critical *gimple_build_omp_critical (gimple_seq, tree, tree); gomp_for *gimple_build_omp_for (gimple_seq, int, tree, size_t, gimple_seq); gomp_parallel *gimple_build_omp_parallel (gimple_seq, tree, tree, tree); @@ -1492,6 +1491,8 @@ int gimple_call_flags (const gimple *); int gimple_call_arg_flags (const gcall *, unsigned); int gimple_call_return_flags (const gcall *); +bool gimple_call_nonnull_result_p (gcall *); +tree gimple_call_nonnull_arg (gcall *); bool gimple_assign_copy_p (gimple *); bool gimple_assign_ssa_name_copy_p (gimple *); bool gimple_assign_unary_nop_p (gimple *); @@ -1800,6 +1801,20 @@ } +/* Return non-artificial location information for statement G. */ + +static inline location_t +gimple_nonartificial_location (const gimple *g) +{ + location_t *ploc = NULL; + + if (tree block = gimple_block (g)) + ploc = block_nonartificial_location (block); + + return ploc ? *ploc : gimple_location (g); +} + + /* Return the file name of the location of STMT. */ static inline const char * @@ -2859,44 +2874,6 @@ return gimple_call_internal_p (gc); } - -/* Return true if call GS is marked as instrumented by - Pointer Bounds Checker. */ - -static inline bool -gimple_call_with_bounds_p (const gcall *gs) -{ - return (gs->subcode & GF_CALL_WITH_BOUNDS) != 0; -} - -static inline bool -gimple_call_with_bounds_p (const gimple *gs) -{ - const gcall *gc = GIMPLE_CHECK2<const gcall *> (gs); - return gimple_call_with_bounds_p (gc); -} - - -/* If INSTRUMENTED_P is true, marm statement GS as instrumented by - Pointer Bounds Checker. */ - -static inline void -gimple_call_set_with_bounds (gcall *gs, bool with_bounds) -{ - if (with_bounds) - gs->subcode |= GF_CALL_WITH_BOUNDS; - else - gs->subcode &= ~GF_CALL_WITH_BOUNDS; -} - -static inline void -gimple_call_set_with_bounds (gimple *gs, bool with_bounds) -{ - gcall *gc = GIMPLE_CHECK2<gcall *> (gs); - gimple_call_set_with_bounds (gc, with_bounds); -} - - /* Return true if call GS is marked as nocf_check. */ static inline bool @@ -4632,6 +4609,22 @@ return gimple_code (gs) == GIMPLE_DEBUG; } + +/* Return the last nondebug statement in GIMPLE sequence S. */ + +static inline gimple * +gimple_seq_last_nondebug_stmt (gimple_seq s) +{ + gimple_seq_node n; + for (n = gimple_seq_last (s); + n && is_gimple_debug (n); + n = n->prev) + if (n->prev == s) + return NULL; + return n; +} + + /* Return true if S is a GIMPLE_DEBUG BIND statement. */ static inline bool @@ -4788,6 +4781,40 @@ gimple_set_op (dbg, 1, value); } +/* Return true if S is a GIMPLE_DEBUG BEGIN_STMT statement. */ + +static inline bool +gimple_debug_begin_stmt_p (const gimple *s) +{ + if (is_gimple_debug (s)) + return s->subcode == GIMPLE_DEBUG_BEGIN_STMT; + + return false; +} + +/* Return true if S is a GIMPLE_DEBUG INLINE_ENTRY statement. */ + +static inline bool +gimple_debug_inline_entry_p (const gimple *s) +{ + if (is_gimple_debug (s)) + return s->subcode == GIMPLE_DEBUG_INLINE_ENTRY; + + return false; +} + +/* Return true if S is a GIMPLE_DEBUG non-binding marker statement. */ + +static inline bool +gimple_debug_nonbind_marker_p (const gimple *s) +{ + if (is_gimple_debug (s)) + return s->subcode == GIMPLE_DEBUG_BEGIN_STMT + || s->subcode == GIMPLE_DEBUG_INLINE_ENTRY; + + return false; +} + /* Return the line number for EXPR, or return -1 if we have no line number information for it. */ static inline int @@ -6202,26 +6229,6 @@ } -/* Return the return bounds for GIMPLE_RETURN GS. */ - -static inline tree -gimple_return_retbnd (const gimple *gs) -{ - GIMPLE_CHECK (gs, GIMPLE_RETURN); - return gimple_op (gs, 1); -} - - -/* Set RETVAL to be the return bounds for GIMPLE_RETURN GS. */ - -static inline void -gimple_return_set_retbnd (gimple *gs, tree retval) -{ - GIMPLE_CHECK (gs, GIMPLE_RETURN); - gimple_set_op (gs, 1, retval); -} - - /* Returns true when the gimple statement STMT is any of the OMP types. */ #define CASE_GIMPLE_OMP \ @@ -6348,11 +6355,18 @@ if (code == GIMPLE_CALL) { const gcall *call_stmt = as_a <const gcall *> (stmt); - if (gimple_call_internal_p (call_stmt) - && gimple_call_internal_fn (call_stmt) == IFN_MASK_STORE) - return TREE_TYPE (gimple_call_arg (call_stmt, 3)); - else - return gimple_call_return_type (call_stmt); + if (gimple_call_internal_p (call_stmt)) + switch (gimple_call_internal_fn (call_stmt)) + { + case IFN_MASK_STORE: + case IFN_SCATTER_STORE: + return TREE_TYPE (gimple_call_arg (call_stmt, 3)); + case IFN_MASK_SCATTER_STORE: + return TREE_TYPE (gimple_call_arg (call_stmt, 4)); + default: + break; + } + return gimple_call_return_type (call_stmt); } else if (code == GIMPLE_ASSIGN) { @@ -6379,8 +6393,8 @@ gimple_alloc_kind_all }; -extern int gimple_alloc_counts[]; -extern int gimple_alloc_sizes[]; +extern uint64_t gimple_alloc_counts[]; +extern uint64_t gimple_alloc_sizes[]; /* Return the allocation kind for a given stmt CODE. */ static inline enum gimple_alloc_kind