summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-16 14:57:31 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-16 14:57:31 +0000
commit2eb0fcbc8f9d73d8061a4634e4e3c9169fc862d8 (patch)
treee3c925485ff05d36a78d40f48b59e76613d43d3b /gcc
parent1eee3533bb00b55a872111a6e95a3902d835ac4d (diff)
downloadgcc-2eb0fcbc8f9d73d8061a4634e4e3c9169fc862d8.tar.gz
2016-04-16 Basile Starynkevitch <basile@starynkevitch.net>
{{manually merging with even more of GCC 6, using its trunk svn rev 230195; apparently, some changes have been lost in some previous svn merges...}} git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@235060 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog26
-rw-r--r--gcc/bb-reorder.c4
-rw-r--r--gcc/c-family/c-ada-spec.h4
-rw-r--r--gcc/c-family/c-common.c4
-rw-r--r--gcc/c-family/c-common.h9
-rw-r--r--gcc/c-family/c-format.c16
-rw-r--r--gcc/c-family/c-format.h28
-rw-r--r--gcc/c-family/c-objc.h4
-rw-r--r--gcc/c-family/c-omp.c6
-rw-r--r--gcc/c-family/c-ppoutput.c4
-rw-r--r--gcc/c-family/c-pragma.c20
-rw-r--r--gcc/c-family/c-pragma.h11
-rw-r--r--gcc/c/c-aux-info.c3
-rw-r--r--gcc/c/c-parser.c16
-rw-r--r--gcc/c/c-tree.h4
-rw-r--r--gcc/cfgloop.h2
-rw-r--r--gcc/collect2.c8
-rw-r--r--gcc/combine.c4
-rw-r--r--gcc/config/aarch64/aarch64.md2
-rw-r--r--gcc/config/alpha/alpha-protos.h2
-rw-r--r--gcc/config/alpha/alpha.c37
-rw-r--r--gcc/config/alpha/alpha.h31
-rw-r--r--gcc/config/rs6000/xilinx.opt4
-rw-r--r--gcc/config/rx/predicates.md2
-rw-r--r--gcc/config/rx/rx.c2
-rw-r--r--gcc/cp/call.c16
-rw-r--r--gcc/cp/class.c12
-rw-r--r--gcc/cp/constexpr.c24
-rw-r--r--gcc/cp/cp-tree.h101
-rw-r--r--gcc/cp/decl.c12
-rw-r--r--gcc/cp/decl2.c5
-rw-r--r--gcc/cp/except.c4
-rw-r--r--gcc/cp/mangle.c25
-rw-r--r--gcc/cp/method.c6
-rw-r--r--gcc/cp/name-lookup.h20
-rw-r--r--gcc/cp/parser.c33
-rw-r--r--gcc/cp/parser.h36
-rw-r--r--gcc/cp/pt.c51
-rw-r--r--gcc/cp/rtti.c8
-rw-r--r--gcc/cp/semantics.c4
-rw-r--r--gcc/cp/tree.c16
-rw-r--r--gcc/cp/typeck.c7
-rw-r--r--gcc/cp/typeck2.c7
-rw-r--r--gcc/doc/gccint.texi4
-rw-r--r--gcc/doc/invoke.texi5
-rw-r--r--gcc/dse.c4
-rw-r--r--gcc/dwarf2cfi.c20
-rw-r--r--gcc/dwarf2out.c6
-rw-r--r--gcc/fold-const.c1
-rw-r--r--gcc/fortran/dependency.c5
-rw-r--r--gcc/fortran/dependency.h5
-rw-r--r--gcc/fortran/gfortran.h161
-rw-r--r--gcc/fortran/io.c5
-rw-r--r--gcc/fortran/module.c10
-rw-r--r--gcc/fortran/parse.h5
-rw-r--r--gcc/fortran/resolve.c15
-rw-r--r--gcc/fortran/trans-types.h4
-rw-r--r--gcc/fortran/trans.h10
-rw-r--r--gcc/gcse-common.h4
-rw-r--r--gcc/gdbinit.in14
-rw-r--r--gcc/genopinit.c8
-rw-r--r--gcc/ggc-page.c8
-rw-r--r--gcc/graphite-isl-ast-to-gimple.c73
-rw-r--r--gcc/loop-iv.c127
-rw-r--r--gcc/lto/lto.h4
-rw-r--r--gcc/machmode.h4
-rw-r--r--gcc/mcf.c24
-rw-r--r--gcc/modulo-sched.c4
-rw-r--r--gcc/objc/objc-act.h10
-rw-r--r--gcc/objc/objc-next-runtime-abi-02.c16
-rw-r--r--gcc/objc/objc-runtime-hooks.h4
-rw-r--r--gcc/omp-low.c4
-rw-r--r--gcc/optabs-query.h9
-rw-r--r--gcc/optabs-tree.c3
-rw-r--r--gcc/optabs.c49
-rw-r--r--gcc/optabs.def1
-rw-r--r--gcc/params.def24
-rw-r--r--gcc/passes.c6
-rw-r--r--gcc/read-rtl.c6
-rw-r--r--gcc/sched-rgn.c15
-rw-r--r--gcc/sese.c44
-rw-r--r--gcc/sese.h5
-rw-r--r--gcc/signop.h4
-rw-r--r--gcc/testsuite/g++.dg/compat/compat.exp1
-rw-r--r--gcc/testsuite/g++.dg/compat/struct-layout-1.exp1
-rw-r--r--gcc/testsuite/gcc.dg/graphite/scop-23.c40
-rw-r--r--gcc/testsuite/gcc.dg/pr42631.c5
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fp16/set_zero_1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/pr47312.c4
-rw-r--r--gcc/testsuite/lib/asan-dg.exp1
-rw-r--r--gcc/testsuite/lib/atomic-dg.exp1
-rw-r--r--gcc/testsuite/lib/cilk-plus-dg.exp1
-rw-r--r--gcc/testsuite/lib/clearcap.exp1
-rw-r--r--gcc/testsuite/lib/mpx-dg.exp1
-rw-r--r--gcc/testsuite/lib/target-supports.exp24
-rw-r--r--gcc/testsuite/lib/tsan-dg.exp1
-rw-r--r--gcc/testsuite/lib/ubsan-dg.exp1
-rw-r--r--gcc/toplev.c7
-rw-r--r--gcc/toplev.h1
-rw-r--r--gcc/tree-call-cdce.c4
-rw-r--r--gcc/tree-dfa.c3
-rw-r--r--gcc/tree-diagnostic.c4
-rw-r--r--gcc/tree-inline.h4
-rw-r--r--gcc/tree-scalar-evolution.c4
-rw-r--r--gcc/tree-ssa-address.c4
-rw-r--r--gcc/tree-ssa-dom.c180
-rw-r--r--gcc/tree-ssa-loop-niter.c4
-rw-r--r--gcc/tree-ssa-loop.h2
-rw-r--r--gcc/tree-ssa-pre.c4
-rw-r--r--gcc/tree-ssa-reassoc.c4
-rw-r--r--gcc/tree-ssa-sccvn.h2
-rw-r--r--gcc/tree-ssa-structalias.c2
-rw-r--r--gcc/tree-ssa-uninit.c4
-rw-r--r--gcc/tree-ssa.h3
-rw-r--r--gcc/tree-vect-loop-manip.c4
-rw-r--r--gcc/tree-vect-patterns.c30
-rw-r--r--gcc/tree-vect-slp.c22
-rw-r--r--gcc/tree-vect-stmts.c93
-rw-r--r--gcc/tree-vectorizer.h4
-rw-r--r--gcc/tree-vrp.c4
-rw-r--r--gcc/var-tracking.c28
-rw-r--r--gcc/web.c6
122 files changed, 762 insertions, 1138 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 28d1c81818f..efbd38f272f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -53,7 +53,6 @@
2015-11-11 Nathan Sidwell <nathan@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
- gcc/
* gcc/gimplify.c (enum omp_region_type): Add ORT_ACC,
ORT_ACC_DATA, ORT_ACC_PARALLEL, ORT_ACC_KERNELS. Adjust ORT_NONE.
(gimple_add_tmp_var): Add ORT_ACC checks.
@@ -98,7 +97,7 @@
2015-11-11 Simon Dardis <simon.dardis@imgtec.com>
* config/mips/mips.c (mips_breakable_sequence_p): New function.
- (mips_break_sequence): New function.
+ (mips_break_sequence): New function.
(mips_reorg_process_insns): Use them. Use compact branches in selected
situations.
@@ -1100,7 +1099,7 @@
2015-11-09 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/68182
- * gcc/bb-reorder.c (reorder_basic_blocks_simple): Treat a conditional
+ * bb-reorder.c (reorder_basic_blocks_simple): Treat a conditional
branch with only one successor just like unconditional branches.
2015-11-08 Jeff Law <law@redhat.com>
@@ -2045,6 +2044,22 @@
2015-11-04 Aditya Kumar <aditya.k7@samsung.com>
Sebastian Pop <s.pop@samsung.com>
+ * graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_ast_expr_id):
+ Remove use of parameter_rename_map.
+ (copy_def): Remove.
+ (copy_internal_parameters): Remove.
+ (graphite_regenerate_ast_isl): Remove call to copy_internal_parameters.
+ * sese.c (new_sese_info): Do not initialize parameter_rename_map.
+ (free_sese_info): Do not free parameter_rename_map.
+ (set_rename): Do not use parameter_rename_map.
+ (rename_uses): Update call to set_rename.
+ (graphite_copy_stmts_from_block): Do not use parameter_rename_map.
+ * sese.h (parameter_rename_map_t): Remove.
+ (struct sese_info_t): Remove field parameter_rename_map.
+
+2015-11-04 Aditya Kumar <aditya.k7@samsung.com>
+ Sebastian Pop <s.pop@samsung.com>
+
* graphite-isl-ast-to-gimple.c: Include tree-cfg.h.
(translate_isl_ast_node_user): Add more dumps: call print_loops_bb.
* graphite-scop-detection.c (dot_all_scops_1): Moved out of
@@ -29680,6 +29695,11 @@
2015-04-15 Jeff Law <law@redhat.com>
+ PR tree-optimization/47679
+ * tree-ssa-dom.c (build_and_record_new_cond): Moved to avoid
+ need for forward declaration in upcoming changes.
+ (record_conditions, record_edge_info): Likewise.
+
PR rtl-optimization/42522
* cse.c (fold_rtx): Try to simplify a ZERO_EXTRACT or
SIGN_EXTRACT as a whole object rather than simplifying
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index d0b3bb8d33b..950b1a1089d 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -142,7 +142,7 @@ typedef fibonacci_heap <long, basic_block_def> bb_heap_t;
typedef fibonacci_node <long, basic_block_def> bb_heap_node_t;
/* Structure to hold needed information for each basic block. */
-typedef struct bbro_basic_block_data_def
+struct bbro_basic_block_data
{
/* Which trace is the bb start of (-1 means it is not a start of any). */
int start_of_trace;
@@ -161,7 +161,7 @@ typedef struct bbro_basic_block_data_def
/* Which heap node is BB in (if any)? */
bb_heap_node_t *node;
-} bbro_basic_block_data;
+};
/* The current size of the following dynamic array. */
static int array_size;
diff --git a/gcc/c-family/c-ada-spec.h b/gcc/c-family/c-ada-spec.h
index 08d268573c7..8eed0e27b17 100644
--- a/gcc/c-family/c-ada-spec.h
+++ b/gcc/c-family/c-ada-spec.h
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3. If not see
/* In c-ada-spec.c */
-typedef enum {
+enum cpp_operation {
HAS_DEPENDENT_TEMPLATE_ARGS,
IS_ABSTRACT,
IS_CONSTRUCTOR,
@@ -33,7 +33,7 @@ typedef enum {
IS_MOVE_CONSTRUCTOR,
IS_TEMPLATE,
IS_TRIVIAL
-} cpp_operation;
+};
extern location_t decl_sloc (const_tree, bool);
extern void collect_ada_nodes (tree, const char *);
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 9cf37ebfcd5..6e2ce0a736c 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -6341,11 +6341,11 @@ build_va_arg (location_t loc, tree expr, tree type)
/* Linked list of disabled built-in functions. */
-typedef struct disabled_builtin
+struct disabled_builtin
{
const char *name;
struct disabled_builtin *next;
-} disabled_builtin;
+};
static disabled_builtin *disabled_builtins = NULL;
static bool builtin_function_disabled_p (const char *);
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index d7fcf387588..bad8d05e620 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -478,14 +478,13 @@ struct GTY(()) sorted_fields_type {
These may be shadowed, and may be referenced from nested functions. */
#define C_DECLARED_LABEL_FLAG(label) TREE_LANG_FLAG_1 (label)
-typedef enum c_language_kind
+enum c_language_kind
{
clk_c = 0, /* C90, C94, C99 or C11 */
clk_objc = 1, /* clk_c with ObjC features. */
clk_cxx = 2, /* ANSI/ISO C++ */
clk_objcxx = 3 /* clk_cxx with ObjC features. */
-}
-c_language_kind;
+};
/* To test for a specific language use c_language, defined by each
front end. For "ObjC features" or "not C++" use the macros. */
@@ -495,7 +494,7 @@ extern c_language_kind c_language;
#define c_dialect_objc() ((c_language & clk_objc) != 0)
/* The various name of operator that appears in error messages. */
-typedef enum ref_operator {
+enum ref_operator {
/* NULL */
RO_NULL,
/* array indexing */
@@ -508,7 +507,7 @@ typedef enum ref_operator {
RO_IMPLICIT_CONVERSION,
/* ->* */
RO_ARROW_STAR
-} ref_operator;
+};
/* Information about a statement tree. */
diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c
index 57df51f2f5a..6e372655cd8 100644
--- a/gcc/c-family/c-format.c
+++ b/gcc/c-family/c-format.c
@@ -42,12 +42,12 @@ enum format_type { printf_format_type, asm_fprintf_format_type,
gcc_objc_string_format_type,
format_type_error = -1};
-typedef struct function_format_info
+struct function_format_info
{
int format_type; /* type of format (printf, scanf, etc.) */
unsigned HOST_WIDE_INT format_num; /* number of format argument */
unsigned HOST_WIDE_INT first_arg_num; /* number of first arg (zero for varargs) */
-} function_format_info;
+};
static bool decode_format_attr (tree, function_format_info *, int);
static int decode_format_type (const char *);
@@ -421,7 +421,7 @@ static const char *kind_descriptions[] = {
/* Structure describing details of a type expected in format checking,
and the type to check against it. */
-typedef struct format_wanted_type
+struct format_wanted_type
{
/* The type wanted. */
tree wanted_type;
@@ -456,7 +456,7 @@ typedef struct format_wanted_type
unsigned int offset_loc;
/* The next type to check for this format conversion, or NULL if none. */
struct format_wanted_type *next;
-} format_wanted_type;
+};
/* Convenience macro for format_length_info meaning unused. */
#define NO_FMT NULL, FMT_LEN_none, STD_C89
@@ -961,7 +961,7 @@ static int n_format_types = ARRAY_SIZE (format_types_orig);
/* Structure detailing the results of checking a format function call
where the format expression may be a conditional expression with
many leaves resulting from nested conditional expressions. */
-typedef struct
+struct format_check_results
{
/* Number of leaves of the format argument that could not be checked
as they were not string literals. */
@@ -986,14 +986,14 @@ typedef struct
int number_other;
/* Location of the format string. */
location_t format_string_loc;
-} format_check_results;
+};
-typedef struct
+struct format_check_context
{
format_check_results *res;
function_format_info *info;
tree params;
-} format_check_context;
+};
/* Return the format name (as specified in the original table) for the format
type indicated by format_num. */
diff --git a/gcc/c-family/c-format.h b/gcc/c-family/c-format.h
index 956b23cba3f..c458791359a 100644
--- a/gcc/c-family/c-format.h
+++ b/gcc/c-family/c-format.h
@@ -84,7 +84,7 @@ enum
/* Structure describing a length modifier supported in format checking, and
possibly a doubled version such as "hh". */
-typedef struct
+struct format_length_info
{
/* Name of the single-character length modifier. If prefixed by
a zero character, it describes a multi character length
@@ -102,12 +102,12 @@ typedef struct
/* If this flag is set, just scalar width identity is checked, and
not the type identity itself. */
int scalar_identity_flag;
-} format_length_info;
+};
/* Structure describing the combination of a conversion specifier
(or a set of specifiers which act identically) and a length modifier. */
-typedef struct
+struct format_type_detail
{
/* The standard version this combination of length and type appeared in.
This is only relevant if greater than those for length and type
@@ -118,7 +118,7 @@ typedef struct
const char *name;
/* The type itself. */
tree *type;
-} format_type_detail;
+};
/* Macros to fill out tables of these. */
@@ -129,7 +129,7 @@ typedef struct
/* Structure describing a format conversion specifier (or a set of specifiers
which act identically), and the length modifiers used with it. */
-typedef struct format_char_info
+struct format_char_info
{
const char *format_chars;
int pointer_count;
@@ -158,11 +158,11 @@ typedef struct format_char_info
arguments, only POINTER_COUNT, TYPES, and the "c", "R", and "W" flags
in FLAGS2 are used. */
const struct format_char_info *chain;
-} format_char_info;
+};
/* Structure describing a flag accepted by some kind of format. */
-typedef struct
+struct format_flag_spec
{
/* The flag character in question (0 for end of array). */
int flag_char;
@@ -186,12 +186,12 @@ typedef struct
const char *long_name;
/* The standard version in which it appeared. */
enum format_std_version std;
-} format_flag_spec;
+};
/* Structure describing a combination of flags that is bad for some kind
of format. */
-typedef struct
+struct format_flag_pair
{
/* The first flag character in question (0 for end of array). */
int flag_char1;
@@ -204,11 +204,11 @@ typedef struct
a nonzero character from flags2 if it only applies in some
circumstances (e.g. 'i' for printf formats ignoring 0 with precision). */
int predicate;
-} format_flag_pair;
+};
/* Structure describing a particular kind of format processed by GCC. */
-typedef struct
+struct format_kind_info
{
/* The name of this kind of format, for use in diagnostics. Also
the name of the attribute (without preceding and following __). */
@@ -251,7 +251,7 @@ typedef struct
/* Pointer to type of argument expected if '*' is used for a precision,
or NULL if '*' not used for precisions. */
tree *precision_type;
-} format_kind_info;
+};
#define T_I &integer_type_node
#define T89_I { STD_C89, NULL, T_I }
@@ -317,12 +317,12 @@ typedef struct
interpreted as "gnu_printf" or "ms_printf" on a particular system.
TARGET_OVERRIDES_FORMAT_ATTRIBUTES is used to specify target-specific
defaults. */
-typedef struct
+struct target_ovr_attr
{
/* The name of the to be copied format attribute. */
const char *named_attr_src;
/* The name of the to be overridden format attribute. */
const char *named_attr_dst;
-} target_ovr_attr;
+};
#endif /* GCC_C_FORMAT_H */
diff --git a/gcc/c-family/c-objc.h b/gcc/c-family/c-objc.h
index 656b6dee305..e9ec8f894a8 100644
--- a/gcc/c-family/c-objc.h
+++ b/gcc/c-family/c-objc.h
@@ -21,12 +21,12 @@ along with GCC; see the file COPYING3. If not see
#define GCC_C_COMMON_OBJC_H
/* ObjC ivar visibility types. */
-typedef enum objc_ivar_visibility_kind {
+enum GTY(()) objc_ivar_visibility_kind {
OBJC_IVAR_VIS_PROTECTED = 0,
OBJC_IVAR_VIS_PUBLIC = 1,
OBJC_IVAR_VIS_PRIVATE = 2,
OBJC_IVAR_VIS_PACKAGE = 3
-} objc_ivar_visibility_kind;
+};
/* Objective-C / Objective-C++ entry points. */
diff --git a/gcc/c-family/c-omp.c b/gcc/c-family/c-omp.c
index 85dacc3870e..e3d41a61b55 100644
--- a/gcc/c-family/c-omp.c
+++ b/gcc/c-family/c-omp.c
@@ -1328,7 +1328,10 @@ c_omp_split_clauses (location_t loc, enum tree_code code,
OMP_CLAUSE_CHAIN (clauses) = cclauses[s];
cclauses[s] = clauses;
}
-#ifdef ENABLE_CHECKING
+
+ if (!flag_checking)
+ return;
+
if ((mask & (OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_MAP)) == 0)
gcc_assert (cclauses[C_OMP_CLAUSE_SPLIT_TARGET] == NULL_TREE);
if ((mask & (OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_NUM_TEAMS)) == 0)
@@ -1343,7 +1346,6 @@ c_omp_split_clauses (location_t loc, enum tree_code code,
gcc_assert (cclauses[C_OMP_CLAUSE_SPLIT_FOR] == NULL_TREE);
if (code != OMP_SIMD)
gcc_assert (cclauses[C_OMP_CLAUSE_SPLIT_SIMD] == NULL_TREE);
-#endif
}
diff --git a/gcc/c-family/c-ppoutput.c b/gcc/c-family/c-ppoutput.c
index 4f9d878751b..9fe4aa9df0e 100644
--- a/gcc/c-family/c-ppoutput.c
+++ b/gcc/c-family/c-ppoutput.c
@@ -40,13 +40,13 @@ static struct
/* Defined and undefined macros being queued for output with -dU at
the next newline. */
-typedef struct macro_queue
+struct macro_queue
{
struct macro_queue *next; /* Next macro in the list. */
char *macro; /* The name of the macro if not
defined, the full definition if
defined. */
-} macro_queue;
+};
static macro_queue *define_queue, *undef_queue;
/* General output routines. */
diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c
index 62755990376..f86ed384422 100644
--- a/gcc/c-family/c-pragma.c
+++ b/gcc/c-family/c-pragma.c
@@ -38,11 +38,11 @@ along with GCC; see the file COPYING3. If not see
#define GCC_BAD2(gmsgid, arg) \
do { warning (OPT_Wpragmas, gmsgid, arg); return; } while (0)
-typedef struct GTY(()) align_stack {
+struct GTY(()) align_stack {
int alignment;
tree id;
struct align_stack * prev;
-} align_stack;
+};
static GTY(()) struct align_stack * alignment_stack;
@@ -226,11 +226,11 @@ handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy))
}
}
-typedef struct GTY(()) pending_weak_d
+struct GTY(()) pending_weak
{
tree name;
tree value;
-} pending_weak;
+};
static GTY(()) vec<pending_weak, va_gc> *pending_weaks;
@@ -461,10 +461,10 @@ handle_pragma_scalar_storage_order (cpp_reader *ARG_UNUSED(dummy))
if it appears afterward, we have no way of knowing whether a modified
DECL_ASSEMBLER_NAME is due to #pragma extern_prefix.) */
-typedef struct GTY(()) pending_redefinition_d {
+struct GTY(()) pending_redefinition {
tree oldname;
tree newname;
-} pending_redefinition;
+};
static GTY(()) vec<pending_redefinition, va_gc> *pending_redefine_extname;
@@ -963,13 +963,13 @@ handle_pragma_optimize (cpp_reader *ARG_UNUSED(dummy))
/* Stack of the #pragma GCC options created with #pragma GCC push_option. Save
both the binary representation of the options and the TREE_LIST of
strings that will be added to the function's attribute list. */
-typedef struct GTY(()) opt_stack {
+struct GTY(()) opt_stack {
struct opt_stack *prev;
tree target_binary;
tree target_strings;
tree optimize_binary;
tree optimize_strings;
-} opt_stack;
+};
static GTY(()) struct opt_stack * options_stack;
@@ -1234,11 +1234,11 @@ handle_pragma_float_const_decimal64 (cpp_reader *ARG_UNUSED (dummy))
static vec<internal_pragma_handler> registered_pragmas;
-typedef struct
+struct pragma_ns_name
{
const char *space;
const char *name;
-} pragma_ns_name;
+};
static vec<pragma_ns_name> registered_pp_pragmas;
diff --git a/gcc/c-family/c-pragma.h b/gcc/c-family/c-pragma.h
index a36e49abeae..afeceff1edb 100644
--- a/gcc/c-family/c-pragma.h
+++ b/gcc/c-family/c-pragma.h
@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3. If not see
/* Pragma identifiers built in to the front end parsers. Identifiers
for ancillary handlers will follow these. */
-typedef enum pragma_kind {
+enum pragma_kind {
PRAGMA_NONE = 0,
PRAGMA_OACC_ATOMIC,
@@ -75,12 +75,12 @@ typedef enum pragma_kind {
PRAGMA_IVDEP,
PRAGMA_FIRST_EXTERNAL
-} pragma_kind;
+};
/* All clauses defined by OpenACC 2.0, and OpenMP 2.5, 3.0, 3.1, 4.0 and 4.5.
Used internally by both C and C++ parsers. */
-typedef enum pragma_omp_clause {
+enum pragma_omp_clause {
PRAGMA_OMP_CLAUSE_NONE = 0,
PRAGMA_OMP_CLAUSE_ALIGNED,
@@ -177,7 +177,7 @@ typedef enum pragma_omp_clause {
PRAGMA_OACC_CLAUSE_IF = PRAGMA_OMP_CLAUSE_IF,
PRAGMA_OACC_CLAUSE_PRIVATE = PRAGMA_OMP_CLAUSE_PRIVATE,
PRAGMA_OACC_CLAUSE_REDUCTION = PRAGMA_OMP_CLAUSE_REDUCTION
-} pragma_omp_clause;
+};
extern struct cpp_reader* parse_in;
@@ -201,7 +201,7 @@ union gen_pragma_handler {
pragma_handler_2arg handler_2arg;
};
/* Internally used to keep the data of the handler. */
-struct internal_pragma_handler_d {
+struct internal_pragma_handler {
union gen_pragma_handler handler;
/* Permits to know if handler is a pragma_handler_1arg (extra_data is false)
or a pragma_handler_2arg (extra_data is true). */
@@ -209,7 +209,6 @@ struct internal_pragma_handler_d {
/* A data field which can be used when extra_data is true. */
void * data;
};
-typedef struct internal_pragma_handler_d internal_pragma_handler;
extern void c_register_pragma (const char *space, const char *name,
pragma_handler_1arg handler);
diff --git a/gcc/c/c-aux-info.c b/gcc/c/c-aux-info.c
index 2770e5de1cc..79d98518561 100644
--- a/gcc/c/c-aux-info.c
+++ b/gcc/c/c-aux-info.c
@@ -26,12 +26,11 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "c-tree.h"
-enum formals_style_enum {
+enum formals_style {
ansi,
k_and_r_names,
k_and_r_decls
};
-typedef enum formals_style_enum formals_style;
static const char *data_type;
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 4a2ffaad473..2484b920fad 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -133,7 +133,7 @@ c_parse_init (void)
lexer code, if desired. */
/* More information about the type of a CPP_NAME token. */
-typedef enum c_id_kind {
+enum c_id_kind {
/* An ordinary identifier. */
C_ID_ID,
/* An identifier declared as a typedef name. */
@@ -144,11 +144,11 @@ typedef enum c_id_kind {
C_ID_ADDRSPACE,
/* Not an identifier. */
C_ID_NONE
-} c_id_kind;
+};
/* A single C token after string literal concatenation and conversion
of preprocessing tokens to tokens. */
-typedef struct GTY (()) c_token {
+struct GTY (()) c_token {
/* The kind of token. */
ENUM_BITFIELD (cpp_ttype) type : 8;
/* If this token is a CPP_NAME, this value indicates whether also
@@ -164,12 +164,12 @@ typedef struct GTY (()) c_token {
location_t location;
/* The value associated with this token, if any. */
tree value;
-} c_token;
+};
/* A parser structure recording information about the state and
context of parsing. Includes lexer information with up to two
tokens of look-ahead; more are not needed for C. */
-typedef struct GTY(()) c_parser {
+struct GTY(()) c_parser {
/* The look-ahead tokens. */
c_token * GTY((skip)) tokens;
/* Buffer for look-ahead tokens. */
@@ -216,7 +216,7 @@ typedef struct GTY(()) c_parser {
/* Buffer to hold all the tokens from parsing the vector attribute for the
SIMD-enabled functions (formerly known as elemental functions). */
vec <c_token, va_gc> *cilk_simd_fn_tokens;
-} c_parser;
+};
/* The actual parser and external interface. ??? Does this need to be
@@ -1120,7 +1120,7 @@ restore_extension_diagnostics (int flags)
}
/* Possibly kinds of declarator to parse. */
-typedef enum c_dtr_syn {
+enum c_dtr_syn {
/* A normal declarator with an identifier. */
C_DTR_NORMAL,
/* An abstract declarator (maybe empty). */
@@ -1136,7 +1136,7 @@ typedef enum c_dtr_syn {
the same applies with attributes inside the parentheses before
"T". */
C_DTR_PARM
-} c_dtr_syn;
+};
/* The binary operation precedence levels, where 0 is a dummy lowest level
used for the bottom of the stack. */
diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h
index fcf1fb45bdf..04991f7261c 100644
--- a/gcc/c/c-tree.h
+++ b/gcc/c/c-tree.h
@@ -355,12 +355,12 @@ enum c_declarator_kind {
cdk_attrs
};
-typedef struct c_arg_tag_d {
+struct c_arg_tag {
/* The argument name. */
tree id;
/* The type of the argument. */
tree type;
-} c_arg_tag;
+};
/* Information about the parameters in a function declarator. */
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index abfec8e9a08..6af68939eda 100644
--- a/gcc/cfgloop.h
+++ b/gcc/cfgloop.h
@@ -275,7 +275,7 @@ extern bool flow_loop_nested_p (const struct loop *, const struct loop *);
extern bool flow_bb_inside_loop_p (const struct loop *, const_basic_block);
extern struct loop * find_common_loop (struct loop *, struct loop *);
struct loop *superloop_at_depth (struct loop *, unsigned);
-struct eni_weights_d;
+struct eni_weights;
extern int num_loop_insns (const struct loop *);
extern int average_num_loop_insns (const struct loop *);
extern unsigned get_loop_level (const struct loop *);
diff --git a/gcc/collect2.c b/gcc/collect2.c
index 9a45391ff89..20c253326f8 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -282,7 +282,7 @@ static struct lto_object_list lto_objects;
/* Special kinds of symbols that a name may denote. */
-typedef enum {
+enum symkind {
SYM_REGULAR = 0, /* nothing special */
SYM_CTOR = 1, /* constructor */
@@ -292,7 +292,7 @@ typedef enum {
SYM_DWEH = 5, /* DWARF exception handling table */
SYM_AIXI = 6,
SYM_AIXD = 7
-} symkind;
+};
const char tool_name[] = "collect2";
@@ -333,13 +333,13 @@ static void process_args (int *argcp, char **argv);
/* Enumerations describing which pass this is for scanning the
program file ... */
-typedef enum {
+enum scanpass {
PASS_FIRST, /* without constructors */
PASS_OBJ, /* individual objects */
PASS_LIB, /* looking for shared libraries */
PASS_SECOND, /* with constructors linked in */
PASS_LTOINFO /* looking for objects with LTO info */
-} scanpass;
+};
/* ... and which kinds of symbols are to be considered. */
diff --git a/gcc/combine.c b/gcc/combine.c
index a3acb1a0d89..c3db2e0adf6 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -144,7 +144,7 @@ static rtx i2mod_old_rhs;
static rtx i2mod_new_rhs;
-typedef struct reg_stat_struct {
+struct reg_stat_type {
/* Record last point of death of (hard or pseudo) register n. */
rtx_insn *last_death;
@@ -251,7 +251,7 @@ typedef struct reg_stat_struct {
value. */
ENUM_BITFIELD(machine_mode) truncated_to_mode : 8;
-} reg_stat_type;
+};
static vec<reg_stat_type> reg_stat;
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 731c8f29464..1586256dd34 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -1127,7 +1127,7 @@
[(set (match_operand:HF 0 "nonimmediate_operand" "=w, ?r,w,w,m,r,m ,r")
(match_operand:HF 1 "general_operand" "?rY, w,w,m,w,m,rY,r"))]
"TARGET_FLOAT && (register_operand (operands[0], HFmode)
- || register_operand (operands[1], HFmode))"
+ || aarch64_reg_or_fp_zero (operands[1], HFmode))"
"@
mov\\t%0.h[0], %w1
umov\\t%w0, %1.h[0]
diff --git a/gcc/config/alpha/alpha-protos.h b/gcc/config/alpha/alpha-protos.h
index 25a91da55d3..7d4579167e8 100644
--- a/gcc/config/alpha/alpha-protos.h
+++ b/gcc/config/alpha/alpha-protos.h
@@ -65,8 +65,6 @@ extern void alpha_expand_builtin_revert_vms_condition_handler (rtx);
extern rtx alpha_return_addr (int, rtx);
extern rtx alpha_gp_save_rtx (void);
-extern void print_operand (FILE *, rtx, int);
-extern void print_operand_address (FILE *, rtx);
extern void alpha_initialize_trampoline (rtx, rtx, rtx, int, int, int);
extern rtx alpha_va_arg (tree, tree);
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index f2ad9d07cb3..4e284dca382 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -5041,10 +5041,20 @@ get_round_mode_suffix (void)
gcc_unreachable ();
}
-/* Print an operand. Recognize special options, documented below. */
+/* Implement TARGET_PRINT_OPERAND_PUNCT_VALID_P. */
-void
-print_operand (FILE *file, rtx x, int code)
+static bool
+alpha_print_operand_punct_valid_p (unsigned char code)
+{
+ return (code == '/' || code == ',' || code == '-' || code == '~'
+ || code == '#' || code == '*' || code == '&');
+}
+
+/* Implement TARGET_PRINT_OPERAND. The alpha-specific
+ operand codes are documented below. */
+
+static void
+alpha_print_operand (FILE *file, rtx x, int code)
{
int i;
@@ -5064,6 +5074,8 @@ print_operand (FILE *file, rtx x, int code)
break;
case '/':
+ /* Generates the instruction suffix. The TRAP_SUFFIX and ROUND_SUFFIX
+ attributes are examined to determine what is appropriate. */
{
const char *trap = get_trap_mode_suffix ();
const char *round = get_round_mode_suffix ();
@@ -5074,12 +5086,14 @@ print_operand (FILE *file, rtx x, int code)
}
case ',':
- /* Generates single precision instruction suffix. */
+ /* Generates single precision suffix for floating point
+ instructions (s for IEEE, f for VAX). */
fputc ((TARGET_FLOAT_VAX ? 'f' : 's'), file);
break;
case '-':
- /* Generates double precision instruction suffix. */
+ /* Generates double precision suffix for floating point
+ instructions (t for IEEE, g for VAX). */
fputc ((TARGET_FLOAT_VAX ? 'g' : 't'), file);
break;
@@ -5350,8 +5364,10 @@ print_operand (FILE *file, rtx x, int code)
}
}
-void
-print_operand_address (FILE *file, rtx addr)
+/* Implement TARGET_PRINT_OPERAND_ADDRESS. */
+
+static void
+alpha_print_operand_address (FILE *file, machine_mode /*mode*/, rtx addr)
{
int basereg = 31;
HOST_WIDE_INT offset = 0;
@@ -9877,6 +9893,13 @@ alpha_atomic_assign_expand_fenv (tree *hold, tree *clear, tree *update)
#define TARGET_STDARG_OPTIMIZE_HOOK alpha_stdarg_optimize_hook
#endif
+#undef TARGET_PRINT_OPERAND
+#define TARGET_PRINT_OPERAND alpha_print_operand
+#undef TARGET_PRINT_OPERAND_ADDRESS
+#define TARGET_PRINT_OPERAND_ADDRESS alpha_print_operand_address
+#undef TARGET_PRINT_OPERAND_PUNCT_VALID_P
+#define TARGET_PRINT_OPERAND_PUNCT_VALID_P alpha_print_operand_punct_valid_p
+
/* Use 16-bits anchor. */
#undef TARGET_MIN_ANCHOR_OFFSET
#define TARGET_MIN_ANCHOR_OFFSET -0x7fff - 1
diff --git a/gcc/config/alpha/alpha.h b/gcc/config/alpha/alpha.h
index 97f5680a8c2..52581552fea 100644
--- a/gcc/config/alpha/alpha.h
+++ b/gcc/config/alpha/alpha.h
@@ -1005,37 +1005,6 @@ do { \
#define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \
fprintf (FILE, "\t.gprel32 $L%d\n", (VALUE))
-
-/* Print operand X (an rtx) in assembler syntax to file FILE.
- CODE is a letter or dot (`z' in `%z0') or 0 if no letter was specified.
- For `%' followed by punctuation, CODE is the punctuation and X is null. */
-
-#define PRINT_OPERAND(FILE, X, CODE) print_operand (FILE, X, CODE)
-
-/* Determine which codes are valid without a following integer. These must
- not be alphabetic.
-
- ~ Generates the name of the current function.
-
- / Generates the instruction suffix. The TRAP_SUFFIX and ROUND_SUFFIX
- attributes are examined to determine what is appropriate.
-
- , Generates single precision suffix for floating point
- instructions (s for IEEE, f for VAX)
-
- - Generates double precision suffix for floating point
- instructions (t for IEEE, g for VAX)
- */
-
-#define PRINT_OPERAND_PUNCT_VALID_P(CODE) \
- ((CODE) == '/' || (CODE) == ',' || (CODE) == '-' || (CODE) == '~' \
- || (CODE) == '#' || (CODE) == '*' || (CODE) == '&')
-
-/* Print a memory address as an operand to reference that memory location. */
-
-#define PRINT_OPERAND_ADDRESS(FILE, ADDR) \
- print_operand_address((FILE), (ADDR))
-
/* If we use NM, pass -g to it so it only lists globals. */
#define NM_FLAGS "-pg"
diff --git a/gcc/config/rs6000/xilinx.opt b/gcc/config/rs6000/xilinx.opt
index 95a19dbd835..c8d939ebb9a 100644
--- a/gcc/config/rs6000/xilinx.opt
+++ b/gcc/config/rs6000/xilinx.opt
@@ -24,9 +24,9 @@
; Please try to keep this file in ASCII collating order.
mno-clearbss
-Driver RejectNegative
+Target RejectNegative
mppcperflib
-Driver RejectNegative
+Target RejectNegative
; This comment is to ensure we retain the blank line above.
diff --git a/gcc/config/rx/predicates.md b/gcc/config/rx/predicates.md
index 9bd7c15990c..967a3abbec6 100644
--- a/gcc/config/rx/predicates.md
+++ b/gcc/config/rx/predicates.md
@@ -294,7 +294,7 @@
)
(define_predicate "rx_zs_comparison_operator"
- (match_code "eq,ne")
+ (match_code "eq,ne,lt,ge")
)
;; GT and LE omitted due to operand swap required.
diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c
index bd0c0f4ba29..c2c95917907 100644
--- a/gcc/config/rx/rx.c
+++ b/gcc/config/rx/rx.c
@@ -3119,7 +3119,7 @@ flags_from_code (enum rtx_code code)
{
case LT:
case GE:
- return CC_FLAG_S | CC_FLAG_O;
+ return CC_FLAG_S;
case GT:
case LE:
return CC_FLAG_S | CC_FLAG_O | CC_FLAG_Z;
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index f53e5eda19e..a860e461ddd 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -42,7 +42,7 @@ along with GCC; see the file COPYING3. If not see
/* The various kinds of conversion. */
-typedef enum conversion_kind {
+enum conversion_kind {
ck_identity,
ck_lvalue,
ck_tsafe,
@@ -57,12 +57,12 @@ typedef enum conversion_kind {
ck_list,
ck_aggr,
ck_rvalue
-} conversion_kind;
+};
/* The rank of the conversion. Order of the enumerals matters; better
conversions should come earlier in the list. */
-typedef enum conversion_rank {
+enum conversion_rank {
cr_identity,
cr_exact,
cr_promotion,
@@ -71,13 +71,12 @@ typedef enum conversion_rank {
cr_user,
cr_ellipsis,
cr_bad
-} conversion_rank;
+};
/* An implicit conversion sequence, in the sense of [over.best.ics].
The first conversion to be performed is at the end of the chain.
That conversion is always a cr_identity conversion. */
-typedef struct conversion conversion;
struct conversion {
/* The kind of conversion represented by this step. */
conversion_kind kind;
@@ -399,9 +398,8 @@ build_call_a (tree function, int n, tree *argarray)
/* New overloading code. */
-typedef struct z_candidate z_candidate;
+struct z_candidate;
-typedef struct candidate_warning candidate_warning;
struct candidate_warning {
z_candidate *loser;
candidate_warning *next;
@@ -724,8 +722,6 @@ alloc_conversion (conversion_kind kind)
return c;
}
-#ifdef ENABLE_CHECKING
-
/* Make sure that all memory on the conversion obstack has been
freed. */
@@ -737,8 +733,6 @@ validate_conversion_obstack (void)
== obstack_base (&conversion_obstack)));
}
-#endif /* ENABLE_CHECKING */
-
/* Dynamically allocate an array of N conversions. */
static conversion **
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 99ac86c3a1e..866e342145d 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -64,7 +64,7 @@ typedef struct class_stack_node {
size_t hidden;
}* class_stack_node_t;
-typedef struct vtbl_init_data_s
+struct vtbl_init_data
{
/* The base for which we're building initializers. */
tree binfo;
@@ -93,7 +93,7 @@ typedef struct vtbl_init_data_s
/* True when adding vcall offset entries to the vtable. False when
merely computing the indices. */
bool generate_vcall_entries;
-} vtbl_init_data;
+};
/* The type of a function passed to walk_subobject_offsets. */
typedef int (*subobject_offset_fn) (tree, tree, splay_tree);
@@ -2370,7 +2370,7 @@ base_derived_from (tree derived, tree base)
return false;
}
-typedef struct find_final_overrider_data_s {
+struct find_final_overrider_data {
/* The function for which we are trying to find a final overrider. */
tree fn;
/* The base class in which the function was declared. */
@@ -2379,7 +2379,7 @@ typedef struct find_final_overrider_data_s {
tree candidates;
/* Path to most derived. */
vec<tree> path;
-} find_final_overrider_data;
+};
/* Add the overrider along the current path to FFOD->CANDIDATES.
Returns true if an overrider was found; false otherwise. */
@@ -8591,7 +8591,7 @@ binfo_ctor_vtable (tree binfo)
}
/* Data for secondary VTT initialization. */
-typedef struct secondary_vptr_vtt_init_data_s
+struct secondary_vptr_vtt_init_data
{
/* Is this the primary VTT? */
bool top_level_p;
@@ -8604,7 +8604,7 @@ typedef struct secondary_vptr_vtt_init_data_s
/* The type being constructed by this secondary VTT. */
tree type_being_constructed;
-} secondary_vptr_vtt_init_data;
+};
/* Recursively build the VTT-initializer for BINFO (which is in the
hierarchy dominated by T). INITS points to the end of the initializer
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c
index 5fab4648410..159c4b308f4 100644
--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -3854,13 +3854,11 @@ maybe_constant_value (tree t, tree decl)
}
r = cxx_eval_outermost_constant_expr (t, true, true, decl);
-#ifdef ENABLE_CHECKING
- gcc_assert (r == t
- || CONVERT_EXPR_P (t)
- || TREE_CODE (t) == VIEW_CONVERT_EXPR
- || (TREE_CONSTANT (t) && !TREE_CONSTANT (r))
- || !cp_tree_equal (r, t));
-#endif
+ gcc_checking_assert (r == t
+ || CONVERT_EXPR_P (t)
+ || TREE_CODE (t) == VIEW_CONVERT_EXPR
+ || (TREE_CONSTANT (t) && !TREE_CONSTANT (r))
+ || !cp_tree_equal (r, t));
return r;
}
@@ -3904,14 +3902,12 @@ fold_non_dependent_expr (tree t)
}
tree r = cxx_eval_outermost_constant_expr (t, true, true, NULL_TREE);
-#ifdef ENABLE_CHECKING
/* cp_tree_equal looks through NOPs, so allow them. */
- gcc_assert (r == t
- || CONVERT_EXPR_P (t)
- || TREE_CODE (t) == VIEW_CONVERT_EXPR
- || (TREE_CONSTANT (t) && !TREE_CONSTANT (r))
- || !cp_tree_equal (r, t));
-#endif
+ gcc_checking_assert (r == t
+ || CONVERT_EXPR_P (t)
+ || TREE_CODE (t) == VIEW_CONVERT_EXPR
+ || (TREE_CONSTANT (t) && !TREE_CONSTANT (r))
+ || !cp_tree_equal (r, t));
return r;
}
else if (TREE_OVERFLOW_P (t))
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index c578262677d..828f2682fab 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -285,14 +285,13 @@ identifier_p (tree t)
#define LANG_IDENTIFIER_CAST(NODE) \
((struct lang_identifier*)IDENTIFIER_NODE_CHECK (NODE))
-struct GTY(()) template_parm_index_s {
+struct GTY(()) template_parm_index {
struct tree_common common;
int index;
int level;
int orig_level;
tree decl;
};
-typedef struct template_parm_index_s template_parm_index;
struct GTY(()) ptrmem_cst {
struct tree_common common;
@@ -419,7 +418,7 @@ struct GTY(()) tree_baselink {
/* The different kinds of ids that we encounter. */
-typedef enum cp_id_kind
+enum cp_id_kind
{
/* Not an id at all. */
CP_ID_KIND_NONE,
@@ -431,12 +430,12 @@ typedef enum cp_id_kind
CP_ID_KIND_TEMPLATE_ID,
/* A qualified-id. */
CP_ID_KIND_QUALIFIED
-} cp_id_kind;
+};
/* The various kinds of C++0x warnings we encounter. */
-typedef enum cpp0x_warn_str
+enum cpp0x_warn_str
{
/* extended initializer lists */
CPP0X_INITIALIZER_LISTS,
@@ -468,11 +467,11 @@ typedef enum cpp0x_warn_str
CPP0X_ATTRIBUTES,
/* ref-qualified member functions */
CPP0X_REF_QUALIFIER
-} cpp0x_warn_str;
+};
/* The various kinds of operation used by composite_pointer_type. */
-typedef enum composite_pointer_operation
+enum composite_pointer_operation
{
/* comparison */
CPO_COMPARISON,
@@ -480,27 +479,27 @@ typedef enum composite_pointer_operation
CPO_CONVERSION,
/* conditional expression */
CPO_CONDITIONAL_EXPR
-} composite_pointer_operation;
+};
/* Possible cases of expression list used by build_x_compound_expr_from_list. */
-typedef enum expr_list_kind {
+enum expr_list_kind {
ELK_INIT, /* initializer */
ELK_MEM_INIT, /* member initializer */
ELK_FUNC_CAST /* functional cast */
-} expr_list_kind;
+};
/* Possible cases of implicit bad rhs conversions. */
-typedef enum impl_conv_rhs {
+enum impl_conv_rhs {
ICR_DEFAULT_ARGUMENT, /* default argument */
ICR_CONVERTING, /* converting */
ICR_INIT, /* initialization */
ICR_ARGPASS, /* argument passing */
ICR_RETURN, /* return */
ICR_ASSIGN /* assignment */
-} impl_conv_rhs;
+};
/* Possible cases of implicit or explicit bad conversions to void. */
-typedef enum impl_conv_void {
+enum impl_conv_void {
ICV_CAST, /* (explicit) conversion to void */
ICV_SECOND_OF_COND, /* second operand of conditional expression */
ICV_THIRD_OF_COND, /* third operand of conditional expression */
@@ -508,11 +507,11 @@ typedef enum impl_conv_void {
ICV_LEFT_OF_COMMA, /* left operand of comma operator */
ICV_STATEMENT, /* statement */
ICV_THIRD_IN_FOR /* for increment expression */
-} impl_conv_void;
+};
/* Possible invalid uses of an abstract class that might not have a
specific associated declaration. */
-typedef enum abstract_class_use {
+enum GTY(()) abstract_class_use {
ACU_UNKNOWN, /* unknown or decl provided */
ACU_CAST, /* cast to abstract class */
ACU_NEW, /* new-expression of abstract class */
@@ -521,7 +520,7 @@ typedef enum abstract_class_use {
ACU_ARRAY, /* array of abstract class */
ACU_RETURN, /* return type of abstract class */
ACU_PARM /* parameter type of abstract class */
-} abstract_class_use;
+};
/* Macros for access to language-specific slots in an identifier. */
@@ -644,7 +643,7 @@ struct GTY (()) tree_argument_pack_select {
/* The different kinds of traits that we encounter. */
-typedef enum cp_trait_kind
+enum cp_trait_kind
{
CPTK_BASES,
CPTK_DIRECT_BASES,
@@ -673,7 +672,7 @@ typedef enum cp_trait_kind
CPTK_IS_TRIVIALLY_COPYABLE,
CPTK_IS_UNION,
CPTK_UNDERLYING_TYPE
-} cp_trait_kind;
+};
/* The types that we are processing. */
#define TRAIT_EXPR_TYPE1(NODE) \
@@ -993,7 +992,7 @@ union GTY((desc ("cp_tree_node_structure (&%h)"),
chain_next ("(union lang_tree_node *) c_tree_chain_next (&%h.generic)"))) lang_tree_node {
union tree_node GTY ((tag ("TS_CP_GENERIC"),
desc ("tree_node_structure (&%h)"))) generic;
- struct template_parm_index_s GTY ((tag ("TS_CP_TPI"))) tpi;
+ struct template_parm_index GTY ((tag ("TS_CP_TPI"))) tpi;
struct ptrmem_cst GTY ((tag ("TS_CP_PTRMEM"))) ptrmem;
struct tree_overload GTY ((tag ("TS_CP_OVERLOAD"))) overload;
struct tree_baselink GTY ((tag ("TS_CP_BASELINK"))) baselink;
@@ -1586,10 +1585,10 @@ enum languages { lang_c, lang_cplusplus, lang_java };
#define CLASSTYPE_VISIBILITY_SPECIFIED(TYPE) \
DECL_VISIBILITY_SPECIFIED (TYPE_MAIN_DECL (TYPE))
-typedef struct GTY (()) tree_pair_s {
+struct GTY (()) tree_pair_s {
tree purpose;
tree value;
-} tree_pair_s;
+};
typedef tree_pair_s *tree_pair_p;
/* This is a few header flags for 'struct lang_type'. Actually,
@@ -3011,7 +3010,7 @@ extern void decl_shadowed_for_var_insert (tree, tree);
property. */
#define SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT(NODE, INT_VALUE) \
NON_DEFAULT_TEMPLATE_ARGS_COUNT(NODE) = build_int_cst (NULL_TREE, INT_VALUE)
-#ifdef ENABLE_CHECKING
+#if CHECKING_P
#define GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT(NODE) \
int_cst_value (NON_DEFAULT_TEMPLATE_ARGS_COUNT (NODE))
#else
@@ -3367,11 +3366,11 @@ extern void decl_shadowed_for_var_insert (tree, tree);
/* Abstract iterators for AGGR_INIT_EXPRs. */
/* Structure containing iterator state. */
-typedef struct aggr_init_expr_arg_iterator_d {
+struct aggr_init_expr_arg_iterator {
tree t; /* the aggr_init_expr */
int n; /* argument count */
int i; /* next argument index */
-} aggr_init_expr_arg_iterator;
+};
/* Initialize the abstract argument list iterator object ITER with the
arguments from AGGR_INIT_EXPR node EXP. */
@@ -4547,7 +4546,7 @@ enum cp_lvalue_kind_flags {
typedef int cp_lvalue_kind;
/* Various kinds of template specialization, instantiation, etc. */
-typedef enum tmpl_spec_kind {
+enum tmpl_spec_kind {
tsk_none, /* Not a template at all. */
tsk_invalid_member_spec, /* An explicit member template
specialization, but the enclosing
@@ -4562,22 +4561,22 @@ typedef enum tmpl_spec_kind {
tsk_template, /* A template declaration. */
tsk_expl_spec, /* An explicit specialization. */
tsk_expl_inst /* An explicit instantiation. */
-} tmpl_spec_kind;
+};
/* The various kinds of access. BINFO_ACCESS depends on these being
two bit quantities. The numerical values are important; they are
used to initialize RTTI data structures, so changing them changes
the ABI. */
-typedef enum access_kind {
+enum access_kind {
ak_none = 0, /* Inaccessible. */
ak_public = 1, /* Accessible, as a `public' thing. */
ak_protected = 2, /* Accessible, as a `protected' thing. */
ak_private = 3 /* Accessible, as a `private' thing. */
-} access_kind;
+};
/* The various kinds of special functions. If you add to this list,
you should update special_function_p as well. */
-typedef enum special_function_kind {
+enum special_function_kind {
sfk_none = 0, /* Not a special function. This enumeral
must have value zero; see
special_function_p. */
@@ -4594,7 +4593,7 @@ typedef enum special_function_kind {
destroyed. */
sfk_conversion, /* A conversion operator. */
sfk_inheriting_constructor /* An inheriting constructor */
-} special_function_kind;
+};
/* The various kinds of linkage. From [basic.link],
@@ -4613,18 +4612,18 @@ typedef enum special_function_kind {
-- When a name has no linkage, the entity it denotes cannot be
referred to by names from other scopes. */
-typedef enum linkage_kind {
+enum linkage_kind {
lk_none, /* No linkage. */
lk_internal, /* Internal linkage. */
lk_external /* External linkage. */
-} linkage_kind;
+};
-typedef enum duration_kind {
+enum duration_kind {
dk_static,
dk_thread,
dk_auto,
dk_dynamic
-} duration_kind;
+};
/* Bitmask flags to control type substitution. */
enum tsubst_flags {
@@ -4670,15 +4669,15 @@ enum base_access_flags {
typedef int base_access;
/* The various kinds of access check during parsing. */
-typedef enum deferring_kind {
+enum deferring_kind {
dk_no_deferred = 0, /* Check access immediately */
dk_deferred = 1, /* Deferred check */
dk_no_check = 2 /* No access check */
-} deferring_kind;
+};
/* The kind of base we can find, looking in a class hierarchy.
Values <0 indicate we failed. */
-typedef enum base_kind {
+enum base_kind {
bk_inaccessible = -3, /* The base is inaccessible */
bk_ambig = -2, /* The base is ambiguous */
bk_not_base = -1, /* It is not a base */
@@ -4687,7 +4686,7 @@ typedef enum base_kind {
bk_via_virtual = 2 /* It is a proper base, but via a virtual
path. This might not be the canonical
binfo. */
-} base_kind;
+};
/* Node for "pointer to (virtual) function".
This may be distinct from ptr_type_node so gdb can distinguish them. */
@@ -4729,11 +4728,11 @@ struct cp_unevaluated
fn_type_unification. Their meanings are described with the
documentation for fn_type_unification. */
-typedef enum unification_kind_t {
+enum unification_kind_t {
DEDUCE_CALL,
DEDUCE_CONV,
DEDUCE_EXACT
-} unification_kind_t;
+};
// An RAII class used to create a new pointer map for local
// specializations. When the stack goes out of scope, the
@@ -5166,7 +5165,7 @@ enum cp_ref_qualifier {
/* A storage class. */
-typedef enum cp_storage_class {
+enum cp_storage_class {
/* sc_none must be zero so that zeroing a cp_decl_specifier_seq
sets the storage_class field to sc_none. */
sc_none = 0,
@@ -5175,13 +5174,13 @@ typedef enum cp_storage_class {
sc_static,
sc_extern,
sc_mutable
-} cp_storage_class;
+};
/* An individual decl-specifier. This is used to index the array of
locations for the declspecs in struct cp_decl_specifier_seq
below. */
-typedef enum cp_decl_spec {
+enum cp_decl_spec {
ds_first,
ds_signed = ds_first,
ds_unsigned,
@@ -5207,11 +5206,11 @@ typedef enum cp_decl_spec {
ds_long_long,
ds_concept,
ds_last /* This enumerator must always be the last one. */
-} cp_decl_spec;
+};
/* A decl-specifier-seq. */
-typedef struct cp_decl_specifier_seq {
+struct cp_decl_specifier_seq {
/* An array of locations for the declaration sepecifiers, indexed by
enum cp_decl_spec_word. */
source_location locations[ds_last];
@@ -5255,11 +5254,11 @@ typedef struct cp_decl_specifier_seq {
BOOL_BITFIELD gnu_thread_keyword_p : 1;
/* True iff the type is a decltype. */
BOOL_BITFIELD decltype_p : 1;
-} cp_decl_specifier_seq;
+};
/* The various kinds of declarators. */
-typedef enum cp_declarator_kind {
+enum cp_declarator_kind {
cdk_id,
cdk_function,
cdk_array,
@@ -5267,7 +5266,7 @@ typedef enum cp_declarator_kind {
cdk_reference,
cdk_ptrmem,
cdk_error
-} cp_declarator_kind;
+};
/* A declarator. */
@@ -5518,9 +5517,7 @@ extern tree build_cxx_call (tree, int, tree *,
tsubst_flags_t);
extern bool is_std_init_list (tree);
extern bool is_list_ctor (tree);
-#ifdef ENABLE_CHECKING
extern void validate_conversion_obstack (void);
-#endif /* ENABLE_CHECKING */
extern void mark_versions_used (tree);
extern tree get_function_version_dispatcher (tree);
@@ -6149,7 +6146,7 @@ extern int shared_member_p (tree);
/* The representation of a deferred access check. */
-typedef struct GTY(()) deferred_access_check {
+struct GTY(()) deferred_access_check {
/* The base class in which the declaration is referenced. */
tree binfo;
/* The declaration whose access must be checked. */
@@ -6158,7 +6155,7 @@ typedef struct GTY(()) deferred_access_check {
tree diag_decl;
/* The location of this access. */
location_t loc;
-} deferred_access_check;
+};
/* in semantics.c */
extern void push_deferring_access_checks (deferring_kind);
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 6abde2aa077..76cc1d176e5 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -242,10 +242,10 @@ enum deprecated_states deprecated_state = DEPRECATED_NORMAL;
/* A list of VAR_DECLs whose type was incomplete at the time the
variable was declared. */
-typedef struct GTY(()) incomplete_var_d {
+struct GTY(()) incomplete_var {
tree decl;
tree incomplete_type;
-} incomplete_var;
+};
static GTY(()) vec<incomplete_var, va_gc> *incomplete_vars;
@@ -3843,7 +3843,7 @@ record_unknown_type (tree type, const char* name)
/* A string for which we should create an IDENTIFIER_NODE at
startup. */
-typedef struct predefined_identifier
+struct predefined_identifier
{
/* The name of the identifier. */
const char *const name;
@@ -3851,7 +3851,7 @@ typedef struct predefined_identifier
tree *const node;
/* Nonzero if this is the name of a constructor or destructor. */
const int ctor_or_dtor_p;
-} predefined_identifier;
+};
/* Create all the predefined identifiers. */
@@ -5385,11 +5385,11 @@ check_for_uninitialized_const_var (tree decl)
/* Structure holding the current initializer being processed by reshape_init.
CUR is a pointer to the current element being processed, END is a pointer
after the last element present in the initializer. */
-typedef struct reshape_iterator_t
+struct reshape_iter
{
constructor_elt *cur;
constructor_elt *end;
-} reshape_iter;
+};
static tree reshape_init_r (tree, reshape_iter *, bool, tsubst_flags_t);
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 4c13c246c08..149f8a1c049 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -4914,9 +4914,8 @@ cxx_post_compilation_parsing_cleanups (void)
input_location = locus_at_end_of_parsing;
-#ifdef ENABLE_CHECKING
- validate_conversion_obstack ();
-#endif /* ENABLE_CHECKING */
+ if (flag_checking)
+ validate_conversion_obstack ();
timevar_stop (TV_PHASE_LATE_PARSING_CLEANUPS);
}
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 1288cbb0125..9b2450d026f 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -1180,10 +1180,10 @@ check_noexcept_r (tree *tp, int * /*walk_subtrees*/, void * /*data*/)
/* If a function that causes a noexcept-expression to be false isn't
defined yet, remember it and check it for TREE_NOTHROW again at EOF. */
-typedef struct GTY(()) pending_noexcept {
+struct GTY(()) pending_noexcept {
tree fn;
location_t loc;
-} pending_noexcept;
+};
static GTY(()) vec<pending_noexcept, va_gc> *pending_noexcept_checks;
/* FN is a FUNCTION_DECL that caused a noexcept-expr to be false. Warn if
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index 70f97d7ed31..6f8bf68d951 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -92,7 +92,7 @@ along with GCC; see the file COPYING3. If not see
(abi_version_crosses (N) || abi_compat_version_crosses (N))
/* Things we only need one of. This module is not reentrant. */
-typedef struct GTY(()) globals {
+struct GTY(()) globals {
/* An array of the current substitution candidates, in the order
we've seen them. */
vec<tree, va_gc> *substitutions;
@@ -106,7 +106,7 @@ typedef struct GTY(()) globals {
/* True if the mangling will be different in a future version of the
ABI. */
bool need_abi_warning;
-} globals;
+};
static GTY (()) globals G;
@@ -392,20 +392,19 @@ add_substitution (tree node)
get_tree_code_name (TREE_CODE (node)), (void *) node);
node = c;
-#if ENABLE_CHECKING
/* Make sure NODE isn't already a candidate. */
- {
- int i;
- tree candidate;
+ if (flag_checking)
+ {
+ int i;
+ tree candidate;
- FOR_EACH_VEC_SAFE_ELT (G.substitutions, i, candidate)
- {
- gcc_assert (!(DECL_P (node) && node == candidate));
- gcc_assert (!(TYPE_P (node) && TYPE_P (candidate)
+ FOR_EACH_VEC_SAFE_ELT (G.substitutions, i, candidate)
+ {
+ gcc_assert (!(DECL_P (node) && node == candidate));
+ gcc_assert (!(TYPE_P (node) && TYPE_P (candidate)
&& same_type_p (node, candidate)));
- }
- }
-#endif /* ENABLE_CHECKING */
+ }
+ }
/* Put the decl onto the varray of substitution candidates. */
vec_safe_push (G.substitutions, node);
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index e72120ec380..533ae0eae2d 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -48,8 +48,6 @@ enum mangling_flags
mf_use_underscores_around_value = 2
};
-typedef enum mangling_flags mangling_flags;
-
static void do_build_copy_assign (tree);
static void do_build_copy_constructor (tree);
static tree make_alias_for_thunk (tree);
@@ -1643,10 +1641,8 @@ maybe_explain_implicit_delete (tree decl)
"deleted because its exception-specification does not "
"match the implicit exception-specification %qX",
decl, raises);
-#ifdef ENABLE_CHECKING
- else
+ else if (flag_checking)
gcc_unreachable ();
-#endif
pop_scope (scope);
}
diff --git a/gcc/cp/name-lookup.h b/gcc/cp/name-lookup.h
index fe8a3e82de7..d430edb73b7 100644
--- a/gcc/cp/name-lookup.h
+++ b/gcc/cp/name-lookup.h
@@ -77,13 +77,13 @@ struct GTY(()) cxx_binding {
/* Datatype used to temporarily save C++ bindings (for implicit
instantiations purposes and like). Implemented in decl.c. */
-typedef struct GTY(()) cxx_saved_binding {
+struct GTY(()) cxx_saved_binding {
/* The name of the current binding. */
tree identifier;
/* The binding we're saving. */
cxx_binding *binding;
tree real_type_value;
-} cxx_saved_binding;
+};
extern tree identifier_type_value (tree);
@@ -95,7 +95,7 @@ extern tree constructor_name (tree);
extern bool constructor_name_p (tree, tree);
/* The kinds of scopes we recognize. */
-typedef enum scope_kind {
+enum scope_kind {
sk_block = 0, /* An ordinary block scope. This enumerator must
have the value zero because "cp_binding_level"
is initialized by using "memset" to set the
@@ -123,10 +123,10 @@ typedef enum scope_kind {
"template <>", this scope is always empty. */
sk_transaction, /* A synchronized or atomic statement. */
sk_omp /* An OpenMP structured block. */
-} scope_kind;
+};
/* The scope where the class/struct/union/enum tag applies. */
-typedef enum tag_scope {
+enum tag_scope {
ts_current = 0, /* Current scope only. This is for the
class-key identifier;
case mentioned in [basic.lookup.elab]/2,
@@ -140,21 +140,21 @@ typedef enum tag_scope {
according to [namespace.memdef]/3
and [class.friend]/9. */
ts_lambda = 3 /* Declaring a lambda closure. */
-} tag_scope;
+};
-typedef struct GTY(()) cp_class_binding {
+struct GTY(()) cp_class_binding {
cxx_binding *base;
/* The bound name. */
tree identifier;
-} cp_class_binding;
+};
-typedef struct GTY(()) cp_label_binding {
+struct GTY(()) cp_label_binding {
/* The bound LABEL_DECL. */
tree label;
/* The previous IDENTIFIER_LABEL_VALUE. */
tree prev_value;
-} cp_label_binding;
+};
/* For each binding contour we allocate a binding_level structure
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 365a476fcc3..a87675eb1b7 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -52,7 +52,7 @@ static cp_token eof_token =
};
/* The various kinds of non integral constant we encounter. */
-typedef enum non_integral_constant {
+enum non_integral_constant {
NIC_NONE,
/* floating-point literal */
NIC_FLOAT,
@@ -108,10 +108,10 @@ typedef enum non_integral_constant {
NIC_CONSTRUCTOR,
/* a transaction expression */
NIC_TRANSACTION
-} non_integral_constant;
+};
/* The various kinds of errors about name-lookup failing. */
-typedef enum name_lookup_error {
+enum name_lookup_error {
/* NULL */
NLE_NULL,
/* is not a type */
@@ -120,10 +120,10 @@ typedef enum name_lookup_error {
NLE_CXX98,
/* is not a class, namespace, or enumeration */
NLE_NOT_CXX98
-} name_lookup_error;
+};
/* The various kinds of required token */
-typedef enum required_token {
+enum required_token {
RT_NONE,
RT_SEMICOLON, /* ';' */
RT_OPEN_PAREN, /* '(' */
@@ -176,7 +176,7 @@ typedef enum required_token {
RT_TRANSACTION_ATOMIC, /* __transaction_atomic */
RT_TRANSACTION_RELAXED, /* __transaction_relaxed */
RT_TRANSACTION_CANCEL /* __transaction_cancel */
-} required_token;
+};
/* Prototypes. */
@@ -1737,7 +1737,7 @@ typedef int cp_parser_flags;
/* The different kinds of declarators we want to parse. */
-typedef enum cp_parser_declarator_kind
+enum cp_parser_declarator_kind
{
/* We want an abstract declarator. */
CP_PARSER_DECLARATOR_ABSTRACT,
@@ -1745,7 +1745,7 @@ typedef enum cp_parser_declarator_kind
CP_PARSER_DECLARATOR_NAMED,
/* We don't mind, but the name must be an unqualified-id. */
CP_PARSER_DECLARATOR_EITHER
-} cp_parser_declarator_kind;
+};
/* The precedence values used to parse binary expressions. The minimum value
of PREC must be 1, because zero is reserved to quickly discriminate
@@ -1771,7 +1771,7 @@ enum cp_parser_prec
/* A mapping from a token type to a corresponding tree node type, with a
precedence value. */
-typedef struct cp_parser_binary_operations_map_node
+struct cp_parser_binary_operations_map_node
{
/* The token type. */
enum cpp_ttype token_type;
@@ -1779,9 +1779,9 @@ typedef struct cp_parser_binary_operations_map_node
enum tree_code tree_type;
/* The precedence of this operator. */
enum cp_parser_prec prec;
-} cp_parser_binary_operations_map_node;
+};
-typedef struct cp_parser_expression_stack_entry
+struct cp_parser_expression_stack_entry
{
/* Left hand side of the binary operation we are currently
parsing. */
@@ -1795,7 +1795,7 @@ typedef struct cp_parser_expression_stack_entry
enum cp_parser_prec prec;
/* Location of the binary operation we are parsing. */
location_t loc;
-} cp_parser_expression_stack_entry;
+};
/* The stack for storing partial expressions. We only need NUM_PREC_VALUES
entries because precedence levels on the stack are monotonically
@@ -9263,11 +9263,11 @@ cp_parser_trait_expr (cp_parser* parser, enum rid keyword)
use the count for function and namespace scopes as well. */
static GTY(()) tree lambda_scope;
static GTY(()) int lambda_count;
-typedef struct GTY(()) tree_int
+struct GTY(()) tree_int
{
tree t;
int i;
-} tree_int;
+};
static GTY(()) vec<tree_int, va_gc> *lambda_scope_stack;
static void
@@ -14866,9 +14866,8 @@ cp_parser_template_argument_list (cp_parser* parser)
parser->non_integral_constant_expression_p = saved_non_ice_p;
parser->integral_constant_expression_p = saved_ice_p;
parser->in_template_argument_list_p = saved_in_template_argument_list_p;
-#ifdef ENABLE_CHECKING
- SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (vec, TREE_VEC_LENGTH (vec));
-#endif
+ if (CHECKING_P)
+ SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (vec, TREE_VEC_LENGTH (vec));
return vec;
}
diff --git a/gcc/cp/parser.h b/gcc/cp/parser.h
index 25e1772402d..022d03787a8 100644
--- a/gcc/cp/parser.h
+++ b/gcc/cp/parser.h
@@ -39,7 +39,7 @@ struct GTY(()) tree_check {
/* A C++ token. */
-typedef struct GTY (()) cp_token {
+struct GTY (()) cp_token {
/* The kind of token. */
ENUM_BITFIELD (cpp_ttype) type : 8;
/* If this token is a keyword, this value indicates which keyword.
@@ -68,7 +68,7 @@ typedef struct GTY (()) cp_token {
/* Use for all other tokens. */
tree GTY((tag ("0"))) value;
} GTY((desc ("(%1.type == CPP_TEMPLATE_ID) || (%1.type == CPP_NESTED_NAME_SPECIFIER)"))) u;
-} cp_token;
+};
/* We use a stack of token pointer for saving token sets. */
@@ -79,7 +79,7 @@ typedef struct cp_token *cp_token_position;
it to the parser. Tokens are never added to the cp_lexer after
it is created. */
-typedef struct GTY (()) cp_lexer {
+struct GTY (()) cp_lexer {
/* The memory allocated for the buffer. NULL if this lexer does not
own the token buffer. */
vec<cp_token, va_gc> *buffer;
@@ -107,7 +107,7 @@ typedef struct GTY (()) cp_lexer {
/* True if we're in the context of parsing a pragma, and should not
increment past the end-of-line marker. */
bool in_pragma;
-} cp_lexer;
+};
/* cp_token_cache is a range of tokens. There is no need to represent
@@ -116,17 +116,17 @@ typedef struct GTY (()) cp_lexer {
a cp_token_cache, since everything in here is referenced through
a lexer. */
-typedef struct GTY(()) cp_token_cache {
+struct GTY(()) cp_token_cache {
/* The beginning of the token range. */
cp_token * GTY((skip)) first;
/* Points immediately after the last token in the range. */
cp_token * GTY ((skip)) last;
-} cp_token_cache;
+};
typedef cp_token_cache *cp_token_cache_ptr;
-struct cp_token_ident_d
+struct cp_token_ident
{
unsigned int ident_len;
const char *ident_str;
@@ -136,22 +136,20 @@ struct cp_token_ident_d
const char *after_str;
};
-typedef struct cp_token_ident_d cp_token_ident;
-
/* An entry in a queue of function arguments that require post-processing. */
-typedef struct GTY(()) cp_default_arg_entry_d {
+struct GTY(()) cp_default_arg_entry {
/* The current_class_type when we parsed this arg. */
tree class_type;
/* The function decl itself. */
tree decl;
-} cp_default_arg_entry;
+};
/* An entry in a stack for member functions defined within their classes. */
-typedef struct GTY(()) cp_unparsed_functions_entry_d {
+struct GTY(()) cp_unparsed_functions_entry {
/* Functions with default arguments that require post-processing.
Functions appear in this list in declaration order. */
vec<cp_default_arg_entry, va_gc> *funs_with_default_args;
@@ -167,12 +165,12 @@ typedef struct GTY(()) cp_unparsed_functions_entry_d {
/* Nested classes go in this vector, so that we can do some final
processing after parsing any NSDMIs. */
vec<tree, va_gc> *classes;
-} cp_unparsed_functions_entry;
+};
/* The status of a tentative parse. */
-typedef enum cp_parser_status_kind
+enum cp_parser_status_kind
{
/* No errors have occurred. */
CP_PARSER_STATUS_KIND_NO_ERROR,
@@ -181,11 +179,11 @@ typedef enum cp_parser_status_kind
/* We are committed to this tentative parse, whether or not an error
has occurred. */
CP_PARSER_STATUS_KIND_COMMITTED
-} cp_parser_status_kind;
+};
/* Context that is saved and restored when parsing tentatively. */
-typedef struct GTY (()) cp_parser_context {
+struct GTY (()) cp_parser_context {
/* If this is a tentative parsing context, the status of the
tentative parse. */
enum cp_parser_status_kind status;
@@ -197,7 +195,7 @@ typedef struct GTY (()) cp_parser_context {
/* The next parsing context in the stack. */
struct cp_parser_context *next;
-} cp_parser_context;
+};
/* Control structure for #pragma omp declare simd parsing. */
@@ -210,7 +208,7 @@ struct cp_omp_declare_simd_data {
/* The cp_parser structure represents the C++ parser. */
-typedef struct GTY(()) cp_parser {
+struct GTY(()) cp_parser {
/* The lexer from which we are obtaining tokens. */
cp_lexer *lexer;
@@ -409,7 +407,7 @@ typedef struct GTY(()) cp_parser {
context e.g., because they could never be deduced. */
int prevent_constrained_type_specifiers;
-} cp_parser;
+};
/* In parser.c */
extern void debug (cp_token &ref);
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 9a5a6a3d59c..053a4ef2883 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -1115,9 +1115,8 @@ optimize_specialization_lookup_p (tree tmpl)
gone through coerce_template_parms by now. */
static void
-check_unstripped_args (tree args ATTRIBUTE_UNUSED)
+verify_unstripped_args (tree args)
{
-#ifdef ENABLE_CHECKING
++processing_template_decl;
if (!any_dependent_template_arguments_p (args))
{
@@ -1137,7 +1136,6 @@ check_unstripped_args (tree args ATTRIBUTE_UNUSED)
}
}
--processing_template_decl;
-#endif
}
/* Retrieve the specialization (in the sense of [temp.spec] - a
@@ -1173,7 +1171,8 @@ retrieve_specialization (tree tmpl, tree args, hashval_t hash)
? TMPL_PARMS_DEPTH (DECL_TEMPLATE_PARMS (tmpl))
: template_class_depth (DECL_CONTEXT (tmpl))));
- check_unstripped_args (args);
+ if (flag_checking)
+ verify_unstripped_args (args);
if (optimize_specialization_lookup_p (tmpl))
{
@@ -4194,10 +4193,9 @@ template_parm_to_arg (tree t)
/* Turn this argument into a TYPE_ARGUMENT_PACK
with a single element, which expands T. */
tree vec = make_tree_vec (1);
-#ifdef ENABLE_CHECKING
- SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT
- (vec, TREE_VEC_LENGTH (vec));
-#endif
+ if (CHECKING_P)
+ SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (vec, TREE_VEC_LENGTH (vec));
+
TREE_VEC_ELT (vec, 0) = make_pack_expansion (t);
t = cxx_make_type (TYPE_ARGUMENT_PACK);
@@ -4214,10 +4212,9 @@ template_parm_to_arg (tree t)
with a single element, which expands T. */
tree vec = make_tree_vec (1);
tree type = TREE_TYPE (TEMPLATE_PARM_DECL (t));
-#ifdef ENABLE_CHECKING
- SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT
- (vec, TREE_VEC_LENGTH (vec));
-#endif
+ if (CHECKING_P)
+ SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (vec, TREE_VEC_LENGTH (vec));
+
t = convert_from_reference (t);
TREE_VEC_ELT (vec, 0) = make_pack_expansion (t);
@@ -4258,9 +4255,8 @@ template_parms_to_args (tree parms)
for (i = TREE_VEC_LENGTH (a) - 1; i >= 0; --i)
TREE_VEC_ELT (a, i) = template_parm_to_arg (TREE_VEC_ELT (a, i));
-#ifdef ENABLE_CHECKING
- SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (a, TREE_VEC_LENGTH (a));
-#endif
+ if (CHECKING_P)
+ SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (a, TREE_VEC_LENGTH (a));
if (length > 1)
TREE_VEC_ELT (args, --l) = a;
@@ -7379,10 +7375,9 @@ coerce_template_parameter_pack (tree parms,
}
SET_ARGUMENT_PACK_ARGS (argument_pack, packed_args);
-#ifdef ENABLE_CHECKING
- SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (packed_args,
- TREE_VEC_LENGTH (packed_args));
-#endif
+ if (CHECKING_P)
+ SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (packed_args,
+ TREE_VEC_LENGTH (packed_args));
return argument_pack;
}
@@ -7689,11 +7684,9 @@ coerce_template_parms (tree parms,
if (lost)
return error_mark_node;
-#ifdef ENABLE_CHECKING
- if (!NON_DEFAULT_TEMPLATE_ARGS_COUNT (new_inner_args))
+ if (CHECKING_P && !NON_DEFAULT_TEMPLATE_ARGS_COUNT (new_inner_args))
SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (new_inner_args,
TREE_VEC_LENGTH (new_inner_args));
-#endif
return new_inner_args;
}
@@ -14273,8 +14266,9 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
return tsubst_binary_right_fold (t, args, complain, in_decl);
default:
- /* We shouldn't get here, but keep going if !ENABLE_CHECKING. */
- gcc_checking_assert (false);
+ /* We shouldn't get here, but keep going if !flag_checking. */
+ if (flag_checking)
+ gcc_unreachable ();
return t;
}
}
@@ -18293,10 +18287,9 @@ type_unification_real (tree tparms,
if (saw_undeduced++ == 1)
goto again;
}
-#ifdef ENABLE_CHECKING
- if (!NON_DEFAULT_TEMPLATE_ARGS_COUNT (targs))
+
+ if (CHECKING_P && !NON_DEFAULT_TEMPLATE_ARGS_COUNT (targs))
SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (targs, TREE_VEC_LENGTH (targs));
-#endif
return unify_success (explain_p);
}
@@ -23344,12 +23337,10 @@ build_non_dependent_expr (tree expr)
{
tree inner_expr;
-#ifdef ENABLE_CHECKING
/* Try to get a constant value for all non-dependent expressions in
order to expose bugs in *_dependent_expression_p and constexpr. */
- if (cxx_dialect >= cxx11)
+ if (flag_checking && cxx_dialect >= cxx11)
fold_non_dependent_expr (expr);
-#endif
/* Preserve OVERLOADs; the functions must be available to resolve
types. */
diff --git a/gcc/cp/rtti.c b/gcc/cp/rtti.c
index 36886acbb88..b397b55b78c 100644
--- a/gcc/cp/rtti.c
+++ b/gcc/cp/rtti.c
@@ -59,7 +59,7 @@ along with GCC; see the file COPYING3. If not see
translation, when we are emitting the type info objects. */
/* Auxiliary data we hold for each type_info derived object we need. */
-typedef struct GTY (()) tinfo_s {
+struct GTY (()) tinfo_s {
tree type; /* The RECORD_TYPE for this type_info object */
tree vtable; /* The VAR_DECL of the vtable. Only filled at end of
@@ -67,10 +67,10 @@ typedef struct GTY (()) tinfo_s {
tree name; /* IDENTIFIER_NODE for the ABI specified name of
the type_info derived type. */
-} tinfo_s;
+};
-typedef enum tinfo_kind
+enum tinfo_kind
{
TK_TYPE_INFO_TYPE, /* abi::__type_info_pseudo */
TK_BASE_TYPE, /* abi::__base_class_type_info */
@@ -84,7 +84,7 @@ typedef enum tinfo_kind
TK_SI_CLASS_TYPE, /* abi::__si_class_type_info */
TK_FIXED /* end of fixed descriptors. */
/* ... abi::__vmi_type_info<I> */
-} tinfo_kind;
+};
/* Helper macro to get maximum scalar-width of pointer or of the 'long'-type.
This of interest for llp64 targets. */
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 42aad262213..db37e85e141 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -109,7 +109,7 @@ static bool omp_private_member_ignore_next;
In case of parsing error, we simply call `pop_deferring_access_checks'
without `perform_deferred_access_checks'. */
-typedef struct GTY(()) deferred_access {
+struct GTY(()) deferred_access {
/* A vector representing name-lookups for which we have deferred
checking access controls. We cannot check the accessibility of
names used in a decl-specifier-seq until we know what is being
@@ -128,7 +128,7 @@ typedef struct GTY(()) deferred_access {
/* The current mode of access checks. */
enum deferring_kind deferring_access_checks_kind;
-} deferred_access;
+};
/* Data for deferred access checking. */
static GTY(()) vec<deferred_access, va_gc> *deferred_access_stack;
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 3c7a0b30c2c..bd5caf735bc 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -316,15 +316,13 @@ build_target_expr (tree decl, tree value, tsubst_flags_t complain)
tree t;
tree type = TREE_TYPE (decl);
-#ifdef ENABLE_CHECKING
- gcc_assert (VOID_TYPE_P (TREE_TYPE (value))
- || TREE_TYPE (decl) == TREE_TYPE (value)
- /* On ARM ctors return 'this'. */
- || (TYPE_PTR_P (TREE_TYPE (value))
- && TREE_CODE (value) == CALL_EXPR)
- || useless_type_conversion_p (TREE_TYPE (decl),
- TREE_TYPE (value)));
-#endif
+ gcc_checking_assert (VOID_TYPE_P (TREE_TYPE (value))
+ || TREE_TYPE (decl) == TREE_TYPE (value)
+ /* On ARM ctors return 'this'. */
+ || (TYPE_PTR_P (TREE_TYPE (value))
+ && TREE_CODE (value) == CALL_EXPR)
+ || useless_type_conversion_p (TREE_TYPE (decl),
+ TREE_TYPE (value)));
t = cxx_maybe_build_cleanup (decl, complain);
if (t == error_mark_node)
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index e402e44e5c5..90c95fb2977 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -1415,8 +1415,7 @@ comptypes (tree t1, tree t2, int strict)
perform a deep check. */
return structural_comptypes (t1, t2, strict);
-#ifdef ENABLE_CHECKING
- if (USE_CANONICAL_TYPES)
+ if (flag_checking && USE_CANONICAL_TYPES)
{
bool result = structural_comptypes (t1, t2, strict);
@@ -1437,10 +1436,8 @@ comptypes (tree t1, tree t2, int strict)
return result;
}
-#else
- if (USE_CANONICAL_TYPES)
+ if (!flag_checking && USE_CANONICAL_TYPES)
return TYPE_CANONICAL (t1) == TYPE_CANONICAL (t2);
-#endif
else
return structural_comptypes (t1, t2, strict);
}
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index e595c0237d0..cfc76c456d0 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -140,7 +140,7 @@ struct GTY((chain_next ("%h.next"), for_user)) pending_abstract_type {
tree type;
/* Kind of use in an unnamed declarator. */
- abstract_class_use use;
+ enum abstract_class_use use;
/* Position of the declaration. This is only needed for IDENTIFIER_NODEs,
because DECLs already carry locus information. */
@@ -1071,11 +1071,11 @@ digest_init_r (tree type, tree init, bool nested, int flags,
|| TREE_CODE (type) == UNION_TYPE
|| TREE_CODE (type) == COMPLEX_TYPE);
-#ifdef ENABLE_CHECKING
/* "If T is a class type and the initializer list has a single
element of type cv U, where U is T or a class derived from T,
the object is initialized from that element." */
- if (cxx_dialect >= cxx11
+ if (flag_checking
+ && cxx_dialect >= cxx11
&& BRACE_ENCLOSED_INITIALIZER_P (init)
&& CONSTRUCTOR_NELTS (init) == 1
&& ((CLASS_TYPE_P (type) && !CLASSTYPE_NON_AGGREGATE (type))
@@ -1086,7 +1086,6 @@ digest_init_r (tree type, tree init, bool nested, int flags,
/* We should have fixed this in reshape_init. */
gcc_unreachable ();
}
-#endif
if (BRACE_ENCLOSED_INITIALIZER_P (init)
&& !TYPE_NON_AGGREGATE_CLASS (type))
diff --git a/gcc/doc/gccint.texi b/gcc/doc/gccint.texi
index b351265732f..d6913e694ab 100644
--- a/gcc/doc/gccint.texi
+++ b/gcc/doc/gccint.texi
@@ -112,8 +112,6 @@ Additional tutorial information is linked to from
* Tree SSA:: Analysis and optimization of GIMPLE
* RTL:: Machine-dependent low-level intermediate representation.
* Control Flow:: Maintaining and manipulating the control flow graph.
-* MELT:: the Middle End Lisp Translator.
-* MELT Programming Reference:: the MELT Programming Reference (generated).
* Loop Analysis and Representation:: Analysis and representation of loops
* Machine Desc:: How to write machine description instruction patterns.
* Target Macros:: How to write the machine description C macros and functions.
@@ -149,8 +147,6 @@ Additional tutorial information is linked to from
@include generic.texi
@include gimple.texi
@include tree-ssa.texi
-@include melt.texi
-@include meltgendoc.texi
@include rtl.texi
@include cfg.texi
@include loop.texi
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 1c2fa5826dc..fb908b3a2bc 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -2577,10 +2577,6 @@ option exists only for testing, and should not be used by end-users;
it results in inferior code and has no benefits. This option may
be removed in a future release of G++.
-@item -fmelt*
-@opindex fmelt*
-Every option of the form @code{-fmelt*} is specific to MELT.
-
@item -nostdinc++
@opindex nostdinc++
Do not search for header files in the standard directories specific to
@@ -6760,7 +6756,6 @@ Dump after jump bypassing and control flow optimizations.
@opindex fdump-rtl-combine
Dump after the RTL instruction combination pass.
-
@item -fdump-rtl-compgotos
@opindex fdump-rtl-compgotos
Dump after duplicating the computed gotos.
diff --git a/gcc/dse.c b/gcc/dse.c
index 85bc0ac472a..35eef719ec3 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -786,12 +786,12 @@ free_store_info (insn_info_t insn_info)
insn_info->store_rec = NULL;
}
-typedef struct
+struct note_add_store_info
{
rtx_insn *first, *current;
regset fixed_regs_live;
bool failure;
-} note_add_store_info;
+};
/* Callback for emit_inc_dec_insn_before via note_stores.
Check if a register is clobbered which is live afterwards. */
diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c
index e379d5a592c..38c85267bba 100644
--- a/gcc/dwarf2cfi.c
+++ b/gcc/dwarf2cfi.c
@@ -55,7 +55,7 @@ along with GCC; see the file COPYING3. If not see
#define MAX_ARTIFICIAL_LABEL_BYTES 30
/* A collected description of an entire row of the abstract CFI table. */
-typedef struct GTY(()) dw_cfi_row_struct
+struct GTY(()) dw_cfi_row
{
/* The expression that computes the CFA, expressed in two different ways.
The CFA member for the simple cases, and the full CFI expression for
@@ -65,13 +65,13 @@ typedef struct GTY(()) dw_cfi_row_struct
/* The expressions for any register column that is saved. */
cfi_vec reg_save;
-} dw_cfi_row;
+};
/* The caller's ORIG_REG is saved in SAVED_IN_REG. */
-typedef struct GTY(()) reg_saved_in_data_struct {
+struct GTY(()) reg_saved_in_data {
rtx orig_reg;
rtx saved_in_reg;
-} reg_saved_in_data;
+};
/* Since we no longer have a proper CFG, we're going to create a facsimile
@@ -91,7 +91,7 @@ typedef struct GTY(()) reg_saved_in_data_struct {
All save points are present in the TRACE_INDEX hash, mapping the insn
starting a trace to the dw_trace_info describing the trace. */
-typedef struct
+struct dw_trace_info
{
/* The insn that begins the trace. */
rtx_insn *head;
@@ -144,7 +144,7 @@ typedef struct
/* True if we've seen different values incoming to beg_true_args_size. */
bool args_size_undefined;
-} dw_trace_info;
+};
/* Hashtable helpers. */
@@ -204,11 +204,11 @@ static dw_cfa_location *cur_cfa;
of the prologue or (b) the register is clobbered. This clusters
register saves so that there are fewer pc advances. */
-typedef struct {
+struct queued_reg_save {
rtx reg;
rtx saved_reg;
HOST_WIDE_INT cfa_offset;
-} queued_reg_save;
+};
static vec<queued_reg_save> queued_reg_saves;
@@ -245,7 +245,7 @@ init_return_column_size (machine_mode mode, rtx mem, unsigned int c)
init_one_dwarf_reg_size to communicate on what has been done by the
latter. */
-typedef struct
+struct init_one_dwarf_reg_state
{
/* Whether the dwarf return column was initialized. */
bool wrote_return_column;
@@ -254,7 +254,7 @@ typedef struct
was given REGNO to process already. */
bool processed_regno [FIRST_PSEUDO_REGISTER];
-} init_one_dwarf_reg_state;
+};
/* Helper for expand_builtin_init_dwarf_reg_sizes. Generate code to
initialize the dwarf register size table entry corresponding to register
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index c6673b12b92..f1847500910 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -433,10 +433,8 @@ stripattributes (const char *s)
for collect2 the first time around. */
static void
-switch_to_eh_frame_section (bool back)
+switch_to_eh_frame_section (bool back ATTRIBUTE_UNUSED)
{
- tree label;
-
if (eh_frame_section == 0)
{
int flags;
@@ -480,7 +478,7 @@ switch_to_eh_frame_section (bool back)
collect2. */
if (!back)
{
- label = get_file_function_name ("F");
+ tree label = get_file_function_name ("F");
ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE));
targetm.asm_out.globalize_label (asm_out_file,
IDENTIFIER_POINTER (label));
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index eb76117ca1a..8dc849c3606 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -5565,6 +5565,7 @@ fold_truth_andor_1 (location_t loc, enum tree_code code, tree truth_type,
|| (rcode != EQ_EXPR && rcode != NE_EXPR))
return 0;
+ ll_reversep = lr_reversep = rl_reversep = rr_reversep = 0;
volatilep = 0;
ll_inner = decode_field_reference (loc, ll_arg,
&ll_bitsize, &ll_bitpos, &ll_mode,
diff --git a/gcc/fortran/dependency.c b/gcc/fortran/dependency.c
index 8b07f59586a..ca37c1a216e 100644
--- a/gcc/fortran/dependency.c
+++ b/gcc/fortran/dependency.c
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3. If not see
enum range {LHS, RHS, MID};
/* Dependency types. These must be in reverse order of priority. */
-typedef enum
+enum gfc_dependency
{
GFC_DEP_ERROR,
GFC_DEP_EQUAL, /* Identical Ranges. */
@@ -44,8 +44,7 @@ typedef enum
GFC_DEP_BACKWARD, /* e.g. a(2:4) = a(1:3). */
GFC_DEP_OVERLAP, /* May overlap in some other way. */
GFC_DEP_NODEP /* Distinct ranges. */
-}
-gfc_dependency;
+};
/* Macros */
#define IS_ARRAY_EXPLICIT(as) ((as->type == AS_EXPLICIT ? 1 : 0))
diff --git a/gcc/fortran/dependency.h b/gcc/fortran/dependency.h
index 48d9e6f17dc..08792edc254 100644
--- a/gcc/fortran/dependency.h
+++ b/gcc/fortran/dependency.h
@@ -19,14 +19,13 @@ along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
/****************************** Enums *********************************/
-typedef enum
+enum gfc_dep_check
{
NOT_ELEMENTAL, /* Not elemental case: normal dependency check. */
ELEM_CHECK_VARIABLE, /* Test whether variables overlap. */
ELEM_DONT_CHECK_VARIABLE /* Test whether variables overlap only if used
in an expression. */
-}
-gfc_dep_check;
+};
/*********************** Functions prototypes **************************/
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index 581770da5d7..e13b4d48afa 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -102,70 +102,61 @@ mstring;
/* Used when matching and resolving data I/O transfer statements. */
-typedef enum
-{ M_READ, M_WRITE, M_PRINT, M_INQUIRE }
-io_kind;
+enum io_kind
+{ M_READ, M_WRITE, M_PRINT, M_INQUIRE };
/* These are flags for identifying whether we are reading a character literal
between quotes or normal source code. */
-typedef enum
-{ NONSTRING = 0, INSTRING_WARN, INSTRING_NOWARN }
-gfc_instring;
+enum gfc_instring
+{ NONSTRING = 0, INSTRING_WARN, INSTRING_NOWARN };
/* This is returned by gfc_notification_std to know if, given the flags
that were given (-std=, -pedantic) we should issue an error, a warning
or nothing. */
-typedef enum
-{ SILENT, WARNING, ERROR }
-notification;
+enum notification
+{ SILENT, WARNING, ERROR };
/* Matchers return one of these three values. The difference between
MATCH_NO and MATCH_ERROR is that MATCH_ERROR means that a match was
successful, but that something non-syntactic is wrong and an error
has already been issued. */
-typedef enum
-{ MATCH_NO = 1, MATCH_YES, MATCH_ERROR }
-match;
+enum match
+{ MATCH_NO = 1, MATCH_YES, MATCH_ERROR };
/* Used for different Fortran source forms in places like scanner.c. */
-typedef enum
-{ FORM_FREE, FORM_FIXED, FORM_UNKNOWN }
-gfc_source_form;
+enum gfc_source_form
+{ FORM_FREE, FORM_FIXED, FORM_UNKNOWN };
/* Expression node types. */
-typedef enum
+enum expr_t
{ EXPR_OP = 1, EXPR_FUNCTION, EXPR_CONSTANT, EXPR_VARIABLE,
EXPR_SUBSTRING, EXPR_STRUCTURE, EXPR_ARRAY, EXPR_NULL, EXPR_COMPCALL, EXPR_PPC
-}
-expr_t;
+};
/* Array types. */
-typedef enum
+enum array_type
{ AS_EXPLICIT = 1, AS_ASSUMED_SHAPE, AS_DEFERRED,
AS_ASSUMED_SIZE, AS_IMPLIED_SHAPE, AS_ASSUMED_RANK,
AS_UNKNOWN
-}
-array_type;
+};
-typedef enum
-{ AR_FULL = 1, AR_ELEMENT, AR_SECTION, AR_UNKNOWN }
-ar_type;
+enum ar_type
+{ AR_FULL = 1, AR_ELEMENT, AR_SECTION, AR_UNKNOWN };
/* Statement label types. ST_LABEL_DO_TARGET is used for obsolescent warnings
related to shared DO terminations and DO targets which are neither END DO
nor CONTINUE; otherwise it is identical to ST_LABEL_TARGET. */
-typedef enum
+enum gfc_sl_type
{ ST_LABEL_UNKNOWN = 1, ST_LABEL_TARGET, ST_LABEL_DO_TARGET,
ST_LABEL_BAD_TARGET, ST_LABEL_FORMAT
-}
-gfc_sl_type;
+};
/* Intrinsic operators. */
-typedef enum
+enum gfc_intrinsic_op
{ GFC_INTRINSIC_BEGIN = 0,
INTRINSIC_NONE = -1, INTRINSIC_UPLUS = GFC_INTRINSIC_BEGIN,
INTRINSIC_UMINUS, INTRINSIC_PLUS, INTRINSIC_MINUS, INTRINSIC_TIMES,
@@ -179,22 +170,20 @@ typedef enum
INTRINSIC_LT_OS, INTRINSIC_LE_OS,
INTRINSIC_NOT, INTRINSIC_USER, INTRINSIC_ASSIGN,
INTRINSIC_PARENTHESES, GFC_INTRINSIC_END /* Sentinel */
-}
-gfc_intrinsic_op;
+};
/* This macro is the number of intrinsic operators that exist.
Assumptions are made about the numbering of the interface_op enums. */
#define GFC_INTRINSIC_OPS GFC_INTRINSIC_END
/* Arithmetic results. */
-typedef enum
+enum arith
{ ARITH_OK = 1, ARITH_OVERFLOW, ARITH_UNDERFLOW, ARITH_NAN,
ARITH_DIV0, ARITH_INCOMMENSURATE, ARITH_ASYMMETRIC, ARITH_PROHIBIT
-}
-arith;
+};
/* Statements. */
-typedef enum
+enum gfc_statement
{
ST_ARITHMETIC_IF, ST_ALLOCATE, ST_ATTR_DECL, ST_ASSOCIATE,
ST_BACKSPACE, ST_BLOCK, ST_BLOCK_DATA,
@@ -253,62 +242,54 @@ typedef enum
ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
ST_PROCEDURE, ST_GENERIC, ST_CRITICAL, ST_END_CRITICAL,
ST_GET_FCN_CHARACTERISTICS, ST_LOCK, ST_UNLOCK, ST_NONE
-}
-gfc_statement;
+};
/* Types of interfaces that we can have. Assignment interfaces are
considered to be intrinsic operators. */
-typedef enum
+enum interface_type
{
INTERFACE_NAMELESS = 1, INTERFACE_GENERIC,
INTERFACE_INTRINSIC_OP, INTERFACE_USER_OP, INTERFACE_ABSTRACT
-}
-interface_type;
+};
/* Symbol flavors: these are all mutually exclusive.
10 elements = 4 bits. */
-typedef enum sym_flavor
+enum sym_flavor
{
FL_UNKNOWN = 0, FL_PROGRAM, FL_BLOCK_DATA, FL_MODULE, FL_VARIABLE,
FL_PARAMETER, FL_LABEL, FL_PROCEDURE, FL_DERIVED, FL_NAMELIST,
FL_VOID
-}
-sym_flavor;
+};
/* Procedure types. 7 elements = 3 bits. */
-typedef enum procedure_type
+enum procedure_type
{ PROC_UNKNOWN, PROC_MODULE, PROC_INTERNAL, PROC_DUMMY,
PROC_INTRINSIC, PROC_ST_FUNCTION, PROC_EXTERNAL
-}
-procedure_type;
+};
/* Intent types. */
-typedef enum sym_intent
+enum sym_intent
{ INTENT_UNKNOWN = 0, INTENT_IN, INTENT_OUT, INTENT_INOUT
-}
-sym_intent;
+};
/* Access types. */
-typedef enum gfc_access
+enum gfc_access
{ ACCESS_UNKNOWN = 0, ACCESS_PUBLIC, ACCESS_PRIVATE
-}
-gfc_access;
+};
/* Flags to keep track of where an interface came from.
3 elements = 2 bits. */
-typedef enum ifsrc
+enum ifsrc
{ IFSRC_UNKNOWN = 0, /* Interface unknown, only return type may be known. */
IFSRC_DECL, /* FUNCTION or SUBROUTINE declaration. */
IFSRC_IFBODY /* INTERFACE statement or PROCEDURE statement
with explicit interface. */
-}
-ifsrc;
+};
/* Whether a SAVE attribute was set explicitly or implicitly. */
-typedef enum save_state
+enum save_state
{ SAVE_NONE = 0, SAVE_EXPLICIT, SAVE_IMPLICIT
-}
-save_state;
+};
/* Strings for all symbol attributes. We use these for dumping the
parse tree, in error messages, and also when reading and writing
@@ -603,38 +584,33 @@ enum gfc_isym_id
GFC_ISYM_YN,
GFC_ISYM_YN2
};
-typedef enum gfc_isym_id gfc_isym_id;
-typedef enum
+enum init_local_logical
{
GFC_INIT_LOGICAL_OFF = 0,
GFC_INIT_LOGICAL_FALSE,
GFC_INIT_LOGICAL_TRUE
-}
-init_local_logical;
+};
-typedef enum
+enum init_local_character
{
GFC_INIT_CHARACTER_OFF = 0,
GFC_INIT_CHARACTER_ON
-}
-init_local_character;
+};
-typedef enum
+enum init_local_integer
{
GFC_INIT_INTEGER_OFF = 0,
GFC_INIT_INTEGER_ON
-}
-init_local_integer;
+};
-typedef enum
+enum gfc_reverse
{
GFC_ENABLE_REVERSE,
GFC_FORWARD_SET,
GFC_REVERSE_SET,
GFC_INHIBIT_REVERSE
-}
-gfc_reverse;
+};
/************************* Structures *****************************/
@@ -646,13 +622,12 @@ gfc_reverse;
#define NAMED_FUNCTION(a,b,c,d) a,
#define NAMED_SUBROUTINE(a,b,c,d) a,
#define NAMED_DERIVED_TYPE(a,b,c,d) a,
-typedef enum
+enum iso_fortran_env_symbol
{
ISOFORTRANENV_INVALID = -1,
#include "iso-fortran-env.def"
ISOFORTRANENV_LAST, ISOFORTRANENV_NUMBER = ISOFORTRANENV_LAST
-}
-iso_fortran_env_symbol;
+};
#undef NAMED_INTCST
#undef NAMED_KINDARRAY
#undef NAMED_FUNCTION
@@ -668,14 +643,13 @@ iso_fortran_env_symbol;
#define DERIVED_TYPE(a,b,c) a,
#define NAMED_FUNCTION(a,b,c,d) a,
#define NAMED_SUBROUTINE(a,b,c,d) a,
-typedef enum
+enum iso_c_binding_symbol
{
ISOCBINDING_INVALID = -1,
#include "iso-c-binding.def"
ISOCBINDING_LAST,
ISOCBINDING_NUMBER = ISOCBINDING_LAST
-}
-iso_c_binding_symbol;
+};
#undef NAMED_INTCST
#undef NAMED_REALCST
#undef NAMED_CMPXCST
@@ -686,12 +660,11 @@ iso_c_binding_symbol;
#undef NAMED_FUNCTION
#undef NAMED_SUBROUTINE
-typedef enum
+enum intmod_id
{
INTMOD_NONE = 0, INTMOD_ISO_FORTRAN_ENV, INTMOD_ISO_C_BINDING,
INTMOD_IEEE_FEATURES, INTMOD_IEEE_EXCEPTIONS, INTMOD_IEEE_ARITHMETIC
-}
-intmod_id;
+};
typedef struct
{
@@ -1096,7 +1069,7 @@ gfc_expr_list;
#define gfc_get_expr_list() XCNEW (gfc_expr_list)
-typedef enum
+enum gfc_omp_reduction_op
{
OMP_REDUCTION_NONE = -1,
OMP_REDUCTION_PLUS = INTRINSIC_PLUS,
@@ -1112,18 +1085,16 @@ typedef enum
OMP_REDUCTION_IOR,
OMP_REDUCTION_IEOR,
OMP_REDUCTION_USER
-}
-gfc_omp_reduction_op;
+};
-typedef enum
+enum gfc_omp_depend_op
{
OMP_DEPEND_IN,
OMP_DEPEND_OUT,
OMP_DEPEND_INOUT
-}
-gfc_omp_depend_op;
+};
-typedef enum
+enum gfc_omp_map_op
{
OMP_MAP_ALLOC,
OMP_MAP_TO,
@@ -1136,8 +1107,7 @@ typedef enum
OMP_MAP_FORCE_TOFROM,
OMP_MAP_FORCE_PRESENT,
OMP_MAP_FORCE_DEVICEPTR
-}
-gfc_omp_map_op;
+};
/* For use in OpenMP clauses in case we need extra information
(aligned clause alignment, linear clause step, etc.). */
@@ -1804,9 +1774,8 @@ gfc_array_ref;
resolution. The array_ref component may be present and comes
before the component component. */
-typedef enum
- { REF_ARRAY, REF_COMPONENT, REF_SUBSTRING }
-ref_type;
+enum ref_type
+ { REF_ARRAY, REF_COMPONENT, REF_SUBSTRING };
typedef struct gfc_ref
{
@@ -2337,7 +2306,7 @@ gfc_association_list;
/* Executable statements that fill gfc_code structures. */
-typedef enum
+enum gfc_exec_op
{
EXEC_NOP = 1, EXEC_END_NESTED_BLOCK, EXEC_END_BLOCK, EXEC_ASSIGN,
EXEC_LABEL_ASSIGN, EXEC_POINTER_ASSIGN, EXEC_CRITICAL, EXEC_ERROR_STOP,
@@ -2374,10 +2343,9 @@ typedef enum
EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD,
EXEC_OMP_TARGET_UPDATE
-}
-gfc_exec_op;
+};
-typedef enum
+enum gfc_omp_atomic_op
{
GFC_OMP_ATOMIC_UPDATE = 0,
GFC_OMP_ATOMIC_READ = 1,
@@ -2386,8 +2354,7 @@ typedef enum
GFC_OMP_ATOMIC_MASK = 3,
GFC_OMP_ATOMIC_SEQ_CST = 4,
GFC_OMP_ATOMIC_SWAP = 8
-}
-gfc_omp_atomic_op;
+};
typedef struct gfc_code
{
diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c
index c51c3c4fbb7..dbd02b35e54 100644
--- a/gcc/fortran/io.c
+++ b/gcc/fortran/io.c
@@ -106,7 +106,7 @@ static gfc_dt *current_dt;
/**************** Fortran 95 FORMAT parser *****************/
/* FORMAT tokens returned by format_lex(). */
-typedef enum
+enum format_token
{
FMT_NONE, FMT_UNKNOWN, FMT_SIGNED_INT, FMT_ZERO, FMT_POSINT, FMT_PERIOD,
FMT_COMMA, FMT_COLON, FMT_SLASH, FMT_DOLLAR, FMT_LPAREN,
@@ -114,8 +114,7 @@ typedef enum
FMT_E, FMT_EN, FMT_ES, FMT_G, FMT_L, FMT_A, FMT_D, FMT_H, FMT_END,
FMT_ERROR, FMT_DC, FMT_DP, FMT_T, FMT_TR, FMT_TL, FMT_STAR, FMT_RC,
FMT_RD, FMT_RN, FMT_RP, FMT_RU, FMT_RZ
-}
-format_token;
+};
/* Local variables for checking format strings. The saved_token is
used to back up by a single format token during the parsing
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index 8c8f31537e1..54777f74af3 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -1121,11 +1121,10 @@ gzopen_intrinsic_module (const char* name)
}
-typedef enum
+enum atom_type
{
ATOM_NAME, ATOM_LPAREN, ATOM_RPAREN, ATOM_INTEGER, ATOM_STRING
-}
-atom_type;
+};
static atom_type last_atom;
@@ -1975,7 +1974,7 @@ mio_internal_string (char *string)
}
-typedef enum
+enum ab_attribute
{ AB_ALLOCATABLE, AB_DIMENSION, AB_EXTERNAL, AB_INTRINSIC, AB_OPTIONAL,
AB_POINTER, AB_TARGET, AB_DUMMY, AB_RESULT, AB_DATA,
AB_IN_NAMELIST, AB_IN_COMMON, AB_FUNCTION, AB_SUBROUTINE, AB_SEQUENCE,
@@ -1988,8 +1987,7 @@ typedef enum
AB_COARRAY_COMP, AB_VTYPE, AB_VTAB, AB_CONTIGUOUS, AB_CLASS_POINTER,
AB_IMPLICIT_PURE, AB_ARTIFICIAL, AB_UNLIMITED_POLY, AB_OMP_DECLARE_TARGET,
AB_ARRAY_OUTER_DEPENDENCY, AB_MODULE_PROCEDURE
-}
-ab_attribute;
+};
static const mstring attr_bits[] =
{
diff --git a/gcc/fortran/parse.h b/gcc/fortran/parse.h
index dcac98aac69..bcd714d3bd2 100644
--- a/gcc/fortran/parse.h
+++ b/gcc/fortran/parse.h
@@ -23,15 +23,14 @@ along with GCC; see the file COPYING3. If not see
#define GFC_PARSE_H
/* Enum for what the compiler is currently doing. */
-typedef enum
+enum gfc_compile_state
{
COMP_NONE, COMP_PROGRAM, COMP_MODULE, COMP_SUBMODULE, COMP_SUBROUTINE,
COMP_FUNCTION, COMP_BLOCK_DATA, COMP_INTERFACE, COMP_DERIVED,
COMP_DERIVED_CONTAINS, COMP_BLOCK, COMP_ASSOCIATE, COMP_IF,
COMP_DO, COMP_SELECT, COMP_FORALL, COMP_WHERE, COMP_CONTAINS, COMP_ENUM,
COMP_SELECT_TYPE, COMP_OMP_STRUCTURED_BLOCK, COMP_CRITICAL, COMP_DO_CONCURRENT
-}
-gfc_compile_state;
+};
/* Stack element for the current compilation state. These structures
are allocated as automatic variables. */
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 5c9c4f9a6ad..bf2837c5b72 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -32,11 +32,10 @@ along with GCC; see the file COPYING3. If not see
/* Types used in equivalence statements. */
-typedef enum seq_type
+enum seq_type
{
SEQ_NONDEFAULT, SEQ_NUMERIC, SEQ_CHARACTER, SEQ_MIXED
-}
-seq_type;
+};
/* Stack to keep track of the nesting of blocks as we move through the
code. See resolve_branch() and gfc_resolve_code(). */
@@ -1443,9 +1442,8 @@ specific_sym (gfc_symbol *sym)
/* Figure out if the procedure is specific, generic or unknown. */
-typedef enum
-{ PTYPE_GENERIC = 1, PTYPE_SPECIFIC, PTYPE_UNKNOWN }
-proc_type;
+enum proc_type
+{ PTYPE_GENERIC = 1, PTYPE_SPECIFIC, PTYPE_UNKNOWN };
static proc_type
procedure_kind (gfc_symbol *sym)
@@ -3855,9 +3853,8 @@ bad_op:
/************** Array resolution subroutines **************/
-typedef enum
-{ CMP_LT, CMP_EQ, CMP_GT, CMP_UNKNOWN }
-compare_result;
+enum compare_result
+{ CMP_LT, CMP_EQ, CMP_GT, CMP_UNKNOWN };
/* Compare two integer expressions. */
diff --git a/gcc/fortran/trans-types.h b/gcc/fortran/trans-types.h
index a08c912bd34..c1ea5542bf6 100644
--- a/gcc/fortran/trans-types.h
+++ b/gcc/fortran/trans-types.h
@@ -44,12 +44,12 @@ extern GTY(()) tree gfc_charlen_type_node;
and __float128. */
extern bool gfc_real16_is_float128;
-typedef enum {
+enum gfc_packed {
PACKED_NO = 0,
PACKED_PARTIAL,
PACKED_FULL,
PACKED_STATIC
-} gfc_packed;
+};
/* be-function.c */
void gfc_convert_function_code (gfc_namespace *);
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h
index 3b8a365bbea..3a23a3cc259 100644
--- a/gcc/fortran/trans.h
+++ b/gcc/fortran/trans.h
@@ -107,15 +107,14 @@ gfc_se;
/* Denotes different types of coarray.
Please keep in sync with libgfortran/caf/libcaf.h. */
-typedef enum
+enum gfc_coarray_type
{
GFC_CAF_COARRAY_STATIC,
GFC_CAF_COARRAY_ALLOC,
GFC_CAF_LOCK_STATIC,
GFC_CAF_LOCK_ALLOC,
GFC_CAF_CRITICAL
-}
-gfc_coarray_type;
+};
/* The array-specific scalarization information. The array members of
@@ -148,7 +147,7 @@ typedef struct gfc_array_info
}
gfc_array_info;
-typedef enum
+enum gfc_ss_type
{
/* A scalar value. This will be evaluated before entering the
scalarization loop. */
@@ -190,8 +189,7 @@ typedef enum
/* A component of a derived type. */
GFC_SS_COMPONENT
-}
-gfc_ss_type;
+};
typedef struct gfc_ss_info
diff --git a/gcc/gcse-common.h b/gcc/gcse-common.h
index a6b1a0c3bde..43f762baa66 100644
--- a/gcc/gcse-common.h
+++ b/gcc/gcse-common.h
@@ -22,11 +22,11 @@ along with GCC; see the file COPYING3. If not see
#define GCC_GCSE_COMMON_H
typedef vec<rtx_insn *> vec_rtx_heap;
-typedef struct modify_pair_s
+struct modify_pair
{
rtx dest; /* A MEM. */
rtx dest_addr; /* The canonical address of `dest'. */
-} modify_pair;
+};
typedef vec<modify_pair> vec_modify_pair_heap;
diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in
index f6d813a544b..3f117844420 100644
--- a/gcc/gdbinit.in
+++ b/gcc/gdbinit.in
@@ -16,9 +16,6 @@
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
-## Basile adds
-set print elements 500
-
define pr
set debug_rtx ($)
end
@@ -193,17 +190,6 @@ document pbm
Dump the bitmap that is in $ as a comma-separated list of numbers.
end
-## for melt
-set breakpoint pending on
-define pby
-set melt_dbgeprint ($)
-end
-
-document pby
-Print the melt_ptr_t that is $.
-Works only when an inferior is executing.
-end
-
define pel
output expand_location ($)
echo \n
diff --git a/gcc/genopinit.c b/gcc/genopinit.c
index 7728609c449..167815d561d 100644
--- a/gcc/genopinit.c
+++ b/gcc/genopinit.c
@@ -104,7 +104,7 @@ typedef enum optab_tag {
#define OPTAB_DC(o, p, c) { #o, p, NS, ZS, NS, o, c, c, 4 },
#define OPTAB_D(o, p) { #o, p, NS, ZS, NS, o, UNKNOWN, UNKNOWN, 4 },
-typedef struct optab_def_d
+struct optab_def
{
const char *name;
const char *pattern;
@@ -115,7 +115,7 @@ typedef struct optab_def_d
enum rtx_code fcode;
enum rtx_code rcode;
unsigned int kind;
-} optab_def;
+};
static optab_def optabs[] = {
{ "unknown_optab", NULL, NS, ZS, NS, unknown_optab, UNKNOWN, UNKNOWN, 0 },
@@ -136,13 +136,13 @@ static optab_def optabs[] = {
/* Vector in which to collect insns that match. */
-typedef struct pattern_d
+struct pattern
{
const char *name;
unsigned int op;
unsigned int m1, m2;
unsigned int sort_num;
-} pattern;
+};
static vec<pattern> patterns;
diff --git a/gcc/ggc-page.c b/gcc/ggc-page.c
index 9b1a49f9487..deb21bba464 100644
--- a/gcc/ggc-page.c
+++ b/gcc/ggc-page.c
@@ -241,7 +241,7 @@ inverse_table[NUM_ORDERS];
/* A page_entry records the status of an allocation page. This
structure is dynamically sized to fit the bitmap in_use_p. */
-typedef struct page_entry
+struct page_entry
{
/* The next page-entry with objects of the same size, or NULL if
this is the last page-entry. */
@@ -288,12 +288,12 @@ typedef struct page_entry
Nth bit is one if the Nth object on this page is allocated. This
array is dynamically sized. */
unsigned long in_use_p[1];
-} page_entry;
+};
#ifdef USING_MALLOC_PAGE_GROUPS
/* A page_group describes a large allocation from malloc, from which
we parcel out aligned pages. */
-typedef struct page_group
+struct page_group
{
/* A linked list of all extant page groups. */
struct page_group *next;
@@ -306,7 +306,7 @@ typedef struct page_group
/* A bitmask of pages in use. */
unsigned int in_use;
-} page_group;
+};
#endif
#if HOST_BITS_PER_PTR <= 32
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
index 975e1063c2d..628fc90f7b2 100644
--- a/gcc/graphite-isl-ast-to-gimple.c
+++ b/gcc/graphite-isl-ast-to-gimple.c
@@ -288,11 +288,7 @@ gcc_expression_from_isl_ast_expr_id (tree type,
"Could not map isl_id to tree expression");
isl_ast_expr_free (expr_id);
tree t = res->second;
- tree *val = region->parameter_rename_map->get(t);
-
- if (!val)
- val = &t;
- return fold_convert (type, *val);
+ return fold_convert (type, t);
}
/* Converts an isl_ast_expr_int expression E to a GCC expression tree of
@@ -1089,70 +1085,6 @@ scop_to_isl_ast (scop_p scop, ivs_params &ip)
return ast_isl;
}
-/* Copy def from sese REGION to the newly created TO_REGION. TR is defined by
- DEF_STMT. GSI points to entry basic block of the TO_REGION. */
-
-static void
-copy_def (tree tr, gimple *def_stmt, sese_info_p region, sese_info_p to_region,
- gimple_stmt_iterator *gsi)
-{
- if (!defined_in_sese_p (tr, region->region))
- return;
-
- ssa_op_iter iter;
- use_operand_p use_p;
- FOR_EACH_SSA_USE_OPERAND (use_p, def_stmt, iter, SSA_OP_USE)
- {
- tree use_tr = USE_FROM_PTR (use_p);
-
- /* Do not copy parameters that have been generated in the header of the
- scop. */
- if (region->parameter_rename_map->get(use_tr))
- continue;
-
- gimple *def_of_use = SSA_NAME_DEF_STMT (use_tr);
- if (!def_of_use)
- continue;
-
- copy_def (use_tr, def_of_use, region, to_region, gsi);
- }
-
- gimple *copy = gimple_copy (def_stmt);
- gsi_insert_after (gsi, copy, GSI_NEW_STMT);
-
- /* Create new names for all the definitions created by COPY and
- add replacement mappings for each new name. */
- def_operand_p def_p;
- ssa_op_iter op_iter;
- FOR_EACH_SSA_DEF_OPERAND (def_p, copy, op_iter, SSA_OP_ALL_DEFS)
- {
- tree old_name = DEF_FROM_PTR (def_p);
- tree new_name = create_new_def_for (old_name, copy, def_p);
- region->parameter_rename_map->put(old_name, new_name);
- }
-
- update_stmt (copy);
-}
-
-static void
-copy_internal_parameters (sese_info_p region, sese_info_p to_region)
-{
- /* For all the parameters which definitino is in the if_region->false_region,
- insert code on true_region (if_region->true_region->entry). */
-
- int i;
- tree tr;
- gimple_stmt_iterator gsi = gsi_start_bb(to_region->region.entry->dest);
-
- FOR_EACH_VEC_ELT (region->params, i, tr)
- {
- // If def is not in region.
- gimple *def_stmt = SSA_NAME_DEF_STMT (tr);
- if (def_stmt)
- copy_def (tr, def_stmt, region, to_region, &gsi);
- }
-}
-
/* GIMPLE Loop Generator: generates loops from STMT in GIMPLE form for
the given SCOP. Return true if code generation succeeded.
@@ -1192,9 +1124,6 @@ graphite_regenerate_ast_isl (scop_p scop)
context_loop = region->region.entry->src->loop_father;
- /* Copy all the parameters which are defined in the region. */
- copy_internal_parameters(if_region->false_region, if_region->true_region);
-
translate_isl_ast_to_gimple t(region);
edge e = single_succ_edge (if_region->true_region->region.entry->dest);
split_edge (e);
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c
index b43054ae8b1..c7d51643e92 100644
--- a/gcc/loop-iv.c
+++ b/gcc/loop-iv.c
@@ -289,72 +289,34 @@ iv_analysis_loop_init (struct loop *loop)
check_iv_ref_table_size ();
}
-/* Return true if D_REF is defined in an immediate predecessor of the
- current loop's latch block. Otherwise return false. */
-
-static bool
-def_pred_latch_p (df_ref d_ref)
-{
- basic_block bb = DF_REF_BB (d_ref);
- edge_iterator ei;
- edge e;
-
- FOR_EACH_EDGE (e, ei, current_loop->latch->preds)
- {
- if (e->src == bb)
- return true;
- }
- return false;
-}
-
/* Finds the definition of REG that dominates loop latch and stores
it to DEF. Returns false if there is not a single definition
- dominating the latch or all defs are same and they are on different
- predecessors of loop latch. If REG has no definition in loop, DEF
+ dominating the latch. If REG has no definition in loop, DEF
is set to NULL and true is returned. */
static bool
latch_dominating_def (rtx reg, df_ref *def)
{
df_ref single_rd = NULL, adef;
- unsigned regno = REGNO (reg), def_num = 0;
+ unsigned regno = REGNO (reg);
struct df_rd_bb_info *bb_info = DF_RD_BB_INFO (current_loop->latch);
for (adef = DF_REG_DEF_CHAIN (regno); adef; adef = DF_REF_NEXT_REG (adef))
{
- /* Initialize this to true for the very first iteration when
- SINGLE_RD is NULL. */
- bool def_pred_latch = true;
-
if (!bitmap_bit_p (df->blocks_to_analyze, DF_REF_BBNO (adef))
|| !bitmap_bit_p (&bb_info->out, DF_REF_ID (adef)))
continue;
- /* More than one reaching definition is ok in case definitions are
- in predecessors of latch block and those definitions are the same.
- Probably this could be relaxed and check for sub-dominance instead
- predecessor. */
- def_num++;
+ /* More than one reaching definition. */
if (single_rd)
- {
- if (!(def_pred_latch = def_pred_latch_p (adef))
- || !rtx_equal_p (PATTERN (DF_REF_INSN (single_rd)),
- PATTERN (DF_REF_INSN (adef))))
- return false;
- }
+ return false;
+
+ if (!just_once_each_iteration_p (current_loop, DF_REF_BB (adef)))
+ return false;
single_rd = adef;
}
- /* If we have single definition it has to be executed on each iteration. */
- if ((def_num == 1) && single_rd
- && !just_once_each_iteration_p (current_loop, DF_REF_BB (single_rd)))
- return false;
-
- /* Make sure all preds contain definitions. */
- if (def_num != EDGE_COUNT (current_loop->latch->preds))
- return false;
-
*def = single_rd;
return true;
}
@@ -364,10 +326,10 @@ latch_dominating_def (rtx reg, df_ref *def)
static enum iv_grd_result
iv_get_reaching_def (rtx_insn *insn, rtx reg, df_ref *def)
{
- df_ref use, adef = NULL;
+ df_ref use, adef;
basic_block def_bb, use_bb;
rtx_insn *def_insn;
- bool dom_p, dom_latch_p = false;
+ bool dom_p;
*def = NULL;
if (!simple_reg_p (reg))
@@ -382,26 +344,11 @@ iv_get_reaching_def (rtx_insn *insn, rtx reg, df_ref *def)
if (!DF_REF_CHAIN (use))
return GRD_INVARIANT;
- adef = DF_REF_CHAIN (use)->ref;
- /* Having more than one reaching def is ok once all defs are in blocks which
- are latch's predecessors. */
+ /* More than one reaching def. */
if (DF_REF_CHAIN (use)->next)
- {
- df_link* defs;
- unsigned int def_num = 0;
-
- for (defs = DF_REF_CHAIN (use); defs; defs = defs->next)
- {
- if (!def_pred_latch_p (defs->ref))
- return GRD_INVALID;
- def_num++;
- }
- /* Make sure all preds contain definitions. */
- if (def_num != EDGE_COUNT (current_loop->latch->preds))
- return GRD_INVALID;
+ return GRD_INVALID;
- dom_latch_p = true;
- }
+ adef = DF_REF_CHAIN (use)->ref;
/* We do not handle setting only part of the register. */
if (DF_REF_FLAGS (adef) & DF_REF_READ_WRITE)
@@ -424,8 +371,8 @@ iv_get_reaching_def (rtx_insn *insn, rtx reg, df_ref *def)
/* The definition does not dominate the use. This is still OK if
this may be a use of a biv, i.e. if the def_bb dominates loop
- latch or all defs are in latch's predecessors. */
- if (dom_latch_p || just_once_each_iteration_p (current_loop, def_bb))
+ latch. */
+ if (just_once_each_iteration_p (current_loop, def_bb))
return GRD_MAYBE_BIV;
return GRD_INVALID;
@@ -2924,49 +2871,6 @@ fail:
return;
}
-/* Return true if LOOP has a complex exit, but is still good for further
- analysis. Return false otherwise. BB is LOOP's exit block. */
-
-static bool
-check_complex_exit_p (struct loop* loop, basic_block bb)
-{
- edge e;
- basic_block pred, exit;
-
- if (EDGE_COUNT (bb->preds) > 1)
- return false;
-
- e = EDGE_PRED (bb, 0);
-
- pred = e->src;
- if (EDGE_COUNT (pred->succs) != 2)
- return false;
-
- /* Predecessor must be tested (at least) once during any iteration. */
- if (!dominated_by_p (CDI_DOMINATORS, loop->latch, pred))
- return false;
-
- if (EDGE_SUCC (pred, 0)->dest == bb)
- exit = EDGE_SUCC (pred, 1)->dest;
- else
- exit = EDGE_SUCC (pred, 0)->dest;
-
- /* Check that EXIT is really loop exit. */
- if (flow_bb_inside_loop_p (loop, exit))
- {
- edge_iterator eei;
- edge ee;
-
- FOR_EACH_EDGE (ee, eei, exit->succs)
- {
- if (!flow_bb_inside_loop_p (loop, ee->dest))
- return true;
- }
- }
- return false;
-
-}
-
/* Checks whether E is a simple exit from LOOP and stores its description
into DESC. */
@@ -2986,8 +2890,7 @@ check_simple_exit (struct loop *loop, edge e, struct niter_desc *desc)
return;
/* It must be tested (at least) once during any iteration. */
- if (!dominated_by_p (CDI_DOMINATORS, loop->latch, exit_bb)
- && !check_complex_exit_p (loop, exit_bb))
+ if (!dominated_by_p (CDI_DOMINATORS, loop->latch, exit_bb))
return;
/* It must end in a simple conditional jump. */
diff --git a/gcc/lto/lto.h b/gcc/lto/lto.h
index 8f38ee8af6f..7b9f4f341f1 100644
--- a/gcc/lto/lto.h
+++ b/gcc/lto/lto.h
@@ -23,13 +23,13 @@ along with GCC; see the file COPYING3. If not see
/* A file. */
-typedef struct lto_file_struct
+struct lto_file
{
/* The name of the file. */
const char *filename;
/* The offset for the object inside an ar archive file (or zero). */
off_t offset;
-} lto_file;
+};
/* In lto-lang.c */
extern const char *resolution_file_name;
diff --git a/gcc/machmode.h b/gcc/machmode.h
index d51f115c3d5..5de16349919 100644
--- a/gcc/machmode.h
+++ b/gcc/machmode.h
@@ -356,12 +356,12 @@ extern void init_adjust_machine_modes (void);
(SCALAR_INT_MODE_P (MODE) \
&& GET_MODE_PRECISION (MODE) <= HOST_BITS_PER_WIDE_INT)
-typedef struct {
+struct int_n_data_t {
/* These parts are initailized by genmodes output */
unsigned int bitsize;
machine_mode m;
/* RID_* is RID_INTN_BASE + index into this array */
-} int_n_data_t;
+};
/* This is also in tree.h. genmodes.c guarantees the're sorted from
smallest bitsize to largest bitsize. */
diff --git a/gcc/mcf.c b/gcc/mcf.c
index d0b769e5f48..1e566799a59 100644
--- a/gcc/mcf.c
+++ b/gcc/mcf.c
@@ -59,7 +59,7 @@ along with GCC; see the file COPYING3. If not see
/* Limit the number of iterations for cancel_negative_cycles() to ensure
reasonable compile time. */
#define MAX_ITER(n, e) 10 + (1000000 / ((n) * (e)))
-typedef enum
+enum edge_type
{
INVALID_EDGE,
VERTEX_SPLIT_EDGE, /* Edge to represent vertex with w(e) = w(v). */
@@ -70,10 +70,10 @@ typedef enum
BALANCE_EDGE, /* Edge connecting with source/sink: cp(e) = 0. */
REDIRECT_NORMALIZED_EDGE, /* Normalized edge for a redirect edge. */
REVERSE_NORMALIZED_EDGE /* Normalized edge for a reverse edge. */
-} edge_type;
+};
/* Structure to represent an edge in the fixup graph. */
-typedef struct fixup_edge_d
+struct fixup_edge_type
{
int src;
int dest;
@@ -89,21 +89,21 @@ typedef struct fixup_edge_d
gcov_type weight;
gcov_type cost;
gcov_type max_capacity;
-} fixup_edge_type;
+};
typedef fixup_edge_type *fixup_edge_p;
/* Structure to represent a vertex in the fixup graph. */
-typedef struct fixup_vertex_d
+struct fixup_vertex_type
{
vec<fixup_edge_p> succ_edges;
-} fixup_vertex_type;
+};
typedef fixup_vertex_type *fixup_vertex_p;
/* Fixup graph used in the MCF algorithm. */
-typedef struct fixup_graph_d
+struct fixup_graph_type
{
/* Current number of vertices for the graph. */
int num_vertices;
@@ -117,18 +117,18 @@ typedef struct fixup_graph_d
fixup_vertex_p vertex_list;
/* Fixup edge list. */
fixup_edge_p edge_list;
-} fixup_graph_type;
+};
-typedef struct queue_d
+struct queue_type
{
int *queue;
int head;
int tail;
int size;
-} queue_type;
+};
/* Structure used in the maximal flow routines to find augmenting path. */
-typedef struct augmenting_path_d
+struct augmenting_path_type
{
/* Queue used to hold vertex indices. */
queue_type queue_list;
@@ -136,7 +136,7 @@ typedef struct augmenting_path_d
int *bb_pred;
/* Vector that indicates if basic block i has been visited. */
int *is_visited;
-} augmenting_path_type;
+};
/* Function definitions. */
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index 57250cc4462..555b44b8c6d 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -157,8 +157,6 @@ struct ps_reg_move_info
rtx_insn *insn;
};
-typedef struct ps_reg_move_info ps_reg_move_info;
-
/* Holds the partial schedule as an array of II rows. Each entry of the
array points to a linked list of PS_INSNs, which represents the
instructions that are scheduled for that row. */
@@ -243,8 +241,6 @@ typedef struct node_sched_params
u will precede v if column (u) < column (v). */
int column;
} *node_sched_params_ptr;
-
-typedef struct node_sched_params node_sched_params;
/* The following three functions are copied from the current scheduler
code in order to use sched_analyze() for computing the dependencies.
diff --git a/gcc/objc/objc-act.h b/gcc/objc/objc-act.h
index 337f2510448..55afba417d4 100644
--- a/gcc/objc/objc-act.h
+++ b/gcc/objc/objc-act.h
@@ -95,11 +95,11 @@ void objc_common_init_ts (void);
#define PROPERTY_NONATOMIC(DECL) \
DECL_LANG_FLAG_1 (PROPERTY_DECL_CHECK (DECL))
-typedef enum objc_property_assign_semantics {
+enum objc_property_assign_semantics {
OBJC_PROPERTY_ASSIGN = 1,
OBJC_PROPERTY_RETAIN = 2,
OBJC_PROPERTY_COPY = 3
-} objc_property_assign_semantics;
+};
/* PROPERTY_ASSIGN_SEMANTICS can be OBJC_PROPERTY_ASSIGN,
OBJC_PROPERTY_RETAIN or OBJC_PROPERTY_COPY. We need an integer to
@@ -291,7 +291,7 @@ extern GTY(()) struct imp_entry *imp_list;
extern GTY(()) int imp_count; /* `@implementation' */
extern GTY(()) int cat_count; /* `@category' */
-extern GTY(()) objc_ivar_visibility_kind objc_ivar_visibility;
+extern GTY(()) enum objc_ivar_visibility_kind objc_ivar_visibility;
/* Objective-C/Objective-C++ global tree enumeration. */
@@ -645,13 +645,13 @@ extern GTY(()) tree objc_global_trees[OCTI_MAX];
#define TAG_ENUMERATION_MUTATION "objc_enumerationMutation"
#define TAG_FAST_ENUMERATION_STATE "__objcFastEnumerationState"
-typedef enum string_section
+enum string_section
{
class_names, /* class, category, protocol, module names */
meth_var_names, /* method and variable names */
meth_var_types, /* method and variable type descriptors */
prop_names_attr /* property names and their attributes. */
-} string_section;
+};
#define METHOD_DEF 0
#define METHOD_REF 1
diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.c
index df8f395c2b2..2ac0a9851ea 100644
--- a/gcc/objc/objc-next-runtime-abi-02.c
+++ b/gcc/objc/objc-next-runtime-abi-02.c
@@ -1009,10 +1009,10 @@ next_runtime_abi_02_string_decl (tree type, const char *name, string_section wh
/* NOTE --- entry --- */
-typedef struct GTY(()) ident_data_tuple {
+struct GTY(()) ident_data_tuple {
tree ident;
tree data;
-} ident_data_tuple ;
+};
/* This routine creates a file scope static variable of type 'Class'
to hold the address of a class. */
@@ -1193,11 +1193,11 @@ build_v2_message_reference_decl (tree sel_name, tree message_func_ident)
return decl;
}
-typedef struct GTY(()) msgref_entry {
+struct GTY(()) msgref_entry {
tree func;
tree selname;
tree refdecl;
-} msgref_entry;
+};
static GTY (()) vec<msgref_entry, va_gc> *msgrefs;
@@ -1249,10 +1249,10 @@ build_v2_protocollist_ref_decl (tree protocol)
return decl;
}
-typedef struct GTY(()) prot_list_entry {
+struct GTY(()) prot_list_entry {
tree id;
tree refdecl;
-} prot_list_entry;
+};
static GTY (()) vec<prot_list_entry, va_gc> *protrefs;
static tree
@@ -2753,11 +2753,11 @@ generate_v2_category (struct imp_entry *impent)
/* This routine declares a variable to hold the offset for ivar
FIELD_DECL. Variable name is .objc_ivar.ClassName.IvarName. */
-typedef struct GTY(()) ivarref_entry
+struct GTY(()) ivarref_entry
{
tree decl;
tree offset;
-} ivarref_entry;
+};
static GTY (()) vec<ivarref_entry, va_gc> *ivar_offset_refs;
diff --git a/gcc/objc/objc-runtime-hooks.h b/gcc/objc/objc-runtime-hooks.h
index 5d7c02e29d1..a97aa016666 100644
--- a/gcc/objc/objc-runtime-hooks.h
+++ b/gcc/objc/objc-runtime-hooks.h
@@ -34,7 +34,7 @@ along with GCC; see the file COPYING3. If not see
differences from the parser's perspective. */
/* TODO: Do we want the initial underscore ? */
-typedef struct _objc_runtime_hooks_r
+struct objc_runtime_hooks
{
/* TODO: Expand comments in this file. */
@@ -97,7 +97,7 @@ typedef struct _objc_runtime_hooks_r
during parsing. */
void (*generate_metadata) (void);
-} objc_runtime_hooks;
+};
/* For shared support that needs to access these. */
extern objc_runtime_hooks runtime;
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index b31a9ac0f62..51b471cff5a 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -141,7 +141,7 @@ struct omp_region
/* Context structure. Used to store information about each parallel
directive in the code. */
-typedef struct omp_context
+struct omp_context
{
/* This field must be at the beginning, as we do "inheritance": Some
callback functions for tree-inline.c (e.g., omp_copy_decl)
@@ -190,7 +190,7 @@ typedef struct omp_context
/* True if this construct can be cancelled. */
bool cancellable;
-} omp_context;
+};
/* A structure holding the elements of:
for (V = N1; V cond N2; V += STEP) [...] */
diff --git a/gcc/optabs-query.h b/gcc/optabs-query.h
index 162d2e9a7c3..48bcf7c71d2 100644
--- a/gcc/optabs-query.h
+++ b/gcc/optabs-query.h
@@ -98,6 +98,15 @@ get_vcond_icode (machine_mode vmode, machine_mode cmode, bool uns)
return icode;
}
+/* Return insn code for a conditional operator with a mask mode
+ MMODE resulting in a value of mode VMODE. */
+
+static inline enum insn_code
+get_vcond_mask_icode (machine_mode vmode, machine_mode mmode)
+{
+ return convert_optab_handler (vcond_mask_optab, vmode, mmode);
+}
+
/* Enumerates the possible extraction_insn operations. */
enum extraction_pattern { EP_insv, EP_extv, EP_extzv };
diff --git a/gcc/optabs-tree.c b/gcc/optabs-tree.c
index aa863cfb941..d8876199496 100644
--- a/gcc/optabs-tree.c
+++ b/gcc/optabs-tree.c
@@ -342,6 +342,9 @@ expand_vec_cond_expr_p (tree value_type, tree cmp_op_type)
{
machine_mode value_mode = TYPE_MODE (value_type);
machine_mode cmp_op_mode = TYPE_MODE (cmp_op_type);
+ if (VECTOR_BOOLEAN_TYPE_P (cmp_op_type))
+ return get_vcond_mask_icode (TYPE_MODE (value_type),
+ TYPE_MODE (cmp_op_type)) != CODE_FOR_nothing;
if (GET_MODE_SIZE (value_mode) != GET_MODE_SIZE (cmp_op_mode)
|| GET_MODE_NUNITS (value_mode) != GET_MODE_NUNITS (cmp_op_mode)
|| get_vcond_icode (TYPE_MODE (value_type), TYPE_MODE (cmp_op_type),
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 4ffbc0cdefd..554530282db 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -5427,6 +5427,38 @@ expand_vec_perm (machine_mode mode, rtx v0, rtx v1, rtx sel, rtx target)
return tmp;
}
+/* Generate insns for a VEC_COND_EXPR with mask, given its TYPE and its
+ three operands. */
+
+rtx
+expand_vec_cond_mask_expr (tree vec_cond_type, tree op0, tree op1, tree op2,
+ rtx target)
+{
+ struct expand_operand ops[4];
+ machine_mode mode = TYPE_MODE (vec_cond_type);
+ machine_mode mask_mode = TYPE_MODE (TREE_TYPE (op0));
+ enum insn_code icode = get_vcond_mask_icode (mode, mask_mode);
+ rtx mask, rtx_op1, rtx_op2;
+
+ if (icode == CODE_FOR_nothing)
+ return 0;
+
+ mask = expand_normal (op0);
+ rtx_op1 = expand_normal (op1);
+ rtx_op2 = expand_normal (op2);
+
+ mask = force_reg (GET_MODE (mask), mask);
+ rtx_op1 = force_reg (GET_MODE (rtx_op1), rtx_op1);
+
+ create_output_operand (&ops[0], target, mode);
+ create_input_operand (&ops[1], rtx_op1, mode);
+ create_input_operand (&ops[2], rtx_op2, mode);
+ create_input_operand (&ops[3], mask, mask_mode);
+ expand_insn (icode, 4, ops);
+
+ return ops[0].value;
+}
+
/* Generate insns for a VEC_COND_EXPR, given its TYPE and its
three operands. */
@@ -5451,11 +5483,20 @@ expand_vec_cond_expr (tree vec_cond_type, tree op0, tree op1, tree op2,
}
else
{
- /* Fake op0 < 0. */
gcc_assert (VECTOR_BOOLEAN_TYPE_P (TREE_TYPE (op0)));
- op0a = op0;
- op0b = build_zero_cst (TREE_TYPE (op0));
- tcode = LT_EXPR;
+ if (get_vcond_mask_icode (mode, TYPE_MODE (TREE_TYPE (op0)))
+ != CODE_FOR_nothing)
+ return expand_vec_cond_mask_expr (vec_cond_type, op0, op1,
+ op2, target);
+ /* Fake op0 < 0. */
+ else
+ {
+ gcc_assert (GET_MODE_CLASS (TYPE_MODE (TREE_TYPE (op0)))
+ == MODE_VECTOR_INT);
+ op0a = op0;
+ op0b = build_zero_cst (TREE_TYPE (op0));
+ tcode = LT_EXPR;
+ }
}
cmp_op_mode = TYPE_MODE (TREE_TYPE (op0a));
unsignedp = TYPE_UNSIGNED (TREE_TYPE (op0a));
diff --git a/gcc/optabs.def b/gcc/optabs.def
index c9e52a96a25..0ca2333eeff 100644
--- a/gcc/optabs.def
+++ b/gcc/optabs.def
@@ -61,6 +61,7 @@ OPTAB_CD(vec_load_lanes_optab, "vec_load_lanes$a$b")
OPTAB_CD(vec_store_lanes_optab, "vec_store_lanes$a$b")
OPTAB_CD(vcond_optab, "vcond$a$b")
OPTAB_CD(vcondu_optab, "vcondu$a$b")
+OPTAB_CD(vcond_mask_optab, "vcond_mask_$a$b")
OPTAB_CD(vec_cmp_optab, "vec_cmp$a$b")
OPTAB_CD(vec_cmpu_optab, "vec_cmpu$a$b")
OPTAB_CD(maskload_optab, "maskload$a$b")
diff --git a/gcc/params.def b/gcc/params.def
index b372d687d7e..c5d96e7e38b 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -768,30 +768,6 @@ DEFPARAM (PARAM_USE_CANONICAL_TYPES,
"Whether to use canonical types.",
1, 0, 1)
-/**** stuff for MELT runtime */
-
-/* the Melt minor zone size for its own copying garbage collector */
-DEFPARAM (PARAM_MELT_MINOR_ZONE,
- "melt-minor-zone",
- "size in kilowords (one word = one pointer) of the minor zone for the specialized copying melt collector",
- 512, 256, 32768)
-
-/* Parameter tuning the frequency of full garbage collection in
- Melt - it is a threshold in kilowords. */
-DEFPARAM (PARAM_MELT_FULL_THRESHOLD,
- "melt-full-threshold",
- "tuning the frequency of full garbage collection in the specialized melt collector (threshold in kilowords)",
- 65536, 8192, 524288)
-
-/* Parameter tuning the period of full garbage collection in
- Melt - it is the maximal number of minor GCs between full GCs. */
-DEFPARAM (PARAM_MELT_FULL_PERIOD,
- "melt-full-period",
- "period of full garbage collection in the specialized melt collector",
- 2048, 1024, 16384)
-/**** end of Melt stuff */
-
-
DEFPARAM (PARAM_MAX_PARTIAL_ANTIC_LENGTH,
"max-partial-antic-length",
"Maximum length of partial antic set when performing tree pre optimization.",
diff --git a/gcc/passes.c b/gcc/passes.c
index 8a283ae8a7a..dd8d00ad36a 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -2302,11 +2302,7 @@ execute_one_pass (opt_pass *pass)
invoke_plugin_callbacks (PLUGIN_PASS_EXECUTION, pass);
if (!quiet_flag && !cfun)
- fprintf (stderr, " <%s/%d%c>", pass->name ? pass->name : "",
- pass->static_pass_number,
- (pass->type == SIMPLE_IPA_PASS) ? 'S' :
- (pass->type == IPA_PASS) ? 'I' :
- '?');
+ fprintf (stderr, " <%s>", pass->name ? pass->name : "");
/* Note that the folders should only create gimple expressions.
This is a hack until the new folder is ready. */
diff --git a/gcc/read-rtl.c b/gcc/read-rtl.c
index 80d51166a16..36e42cd599a 100644
--- a/gcc/read-rtl.c
+++ b/gcc/read-rtl.c
@@ -77,9 +77,6 @@ struct iterator_use {
void *ptr;
};
-/* Vector definitions for the above. */
-typedef struct iterator_use iterator_use;
-
/* Records one use of an attribute (the "<[iterator:]attribute>" syntax)
in a non-string rtx field. */
struct attribute_use {
@@ -93,9 +90,6 @@ struct attribute_use {
void *ptr;
};
-/* Vector definitions for the above. */
-typedef struct attribute_use attribute_use;
-
/* This struct is used to link subst_attr named ATTR_NAME with
corresponding define_subst named ITER_NAME. */
struct subst_attr_to_iter_mapping
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index 668f471cb29..83bb58afdee 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -139,22 +139,20 @@ static state_t *bb_state = NULL;
while other blocks in the region from which insns can be moved to the
target are called "source" blocks. The candidate structure holds info
about such sources: are they valid? Speculative? Etc. */
-typedef struct
+struct bblst
{
basic_block *first_member;
int nr_members;
-}
-bblst;
+};
-typedef struct
+struct candidate
{
char is_valid;
char is_speculative;
int src_prob;
bblst split_bbs;
bblst update_bbs;
-}
-candidate;
+};
static candidate *candidate_table;
#define IS_VALID(src) (candidate_table[src].is_valid)
@@ -167,12 +165,11 @@ static candidate *candidate_table;
int target_bb;
/* List of edges. */
-typedef struct
+struct edgelst
{
edge *first_member;
int nr_members;
-}
-edgelst;
+};
static edge *edgelst_table;
static int edgelst_last;
diff --git a/gcc/sese.c b/gcc/sese.c
index c176b8ab98a..644c87cf39f 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -259,7 +259,6 @@ new_sese_info (edge entry, edge exit)
SESE_LOOPS (region) = BITMAP_ALLOC (NULL);
SESE_LOOP_NEST (region).create (3);
SESE_PARAMS (region).create (3);
- region->parameter_rename_map = new parameter_rename_map_t;
region->bbs.create (3);
return region;
@@ -275,8 +274,6 @@ free_sese_info (sese_info_p region)
SESE_PARAMS (region).release ();
SESE_LOOP_NEST (region).release ();
- delete region->parameter_rename_map;
- region->parameter_rename_map = NULL;
XDELETE (region);
}
@@ -370,8 +367,7 @@ get_rename (rename_map_type *rename_map, tree old_name)
/* Register in RENAME_MAP the rename tuple (OLD_NAME, EXPR). */
static void
-set_rename (rename_map_type *rename_map, tree old_name, tree expr,
- sese_info_p region)
+set_rename (rename_map_type *rename_map, tree old_name, tree expr)
{
if (dump_file)
{
@@ -386,13 +382,6 @@ set_rename (rename_map_type *rename_map, tree old_name, tree expr,
return;
rename_map->put (old_name, expr);
-
- tree t;
- int i;
- /* For a parameter of a scop we dont want to rename it. */
- FOR_EACH_VEC_ELT (SESE_PARAMS (region), i, t)
- if (old_name == t)
- region->parameter_rename_map->put(old_name, expr);
}
/* Renames the scalar uses of the statement COPY, using the
@@ -498,7 +487,7 @@ rename_uses (gimple *copy, rename_map_type *rename_map,
recompute_tree_invariant_for_addr_expr (rhs);
}
- set_rename (rename_map, old_name, new_expr, region);
+ set_rename (rename_map, old_name, new_expr);
}
return changed;
@@ -539,14 +528,6 @@ graphite_copy_stmts_from_block (basic_block bb, basic_block new_bb,
&& scev_analyzable_p (lhs, region->region))
continue;
- /* Do not copy parameters that have been generated in the header of the
- scop. */
- if (is_gimple_assign (stmt)
- && (lhs = gimple_assign_lhs (stmt))
- && TREE_CODE (lhs) == SSA_NAME
- && region->parameter_rename_map->get(lhs))
- continue;
-
/* Create a new copy of STMT and duplicate STMT's virtual
operands. */
copy = gimple_copy (stmt);
@@ -561,7 +542,7 @@ graphite_copy_stmts_from_block (basic_block bb, basic_block new_bb,
{
tree old_name = DEF_FROM_PTR (def_p);
tree new_name = create_new_def_for (old_name, copy, def_p);
- set_rename (rename_map, old_name, new_name, region);
+ set_rename (rename_map, old_name, new_name);
}
if (rename_uses (copy, rename_map, &gsi_tgt, region, loop, iv_map,
@@ -571,25 +552,6 @@ graphite_copy_stmts_from_block (basic_block bb, basic_block new_bb,
fold_stmt_inplace (&gsi_tgt);
}
- /* For each SSA_NAME in the parameter_rename_map rename their usage. */
- ssa_op_iter iter;
- use_operand_p use_p;
- if (!is_gimple_debug (copy))
- FOR_EACH_SSA_USE_OPERAND (use_p, copy, iter, SSA_OP_USE)
- {
- tree old_name = USE_FROM_PTR (use_p);
-
- if (TREE_CODE (old_name) != SSA_NAME
- || SSA_NAME_IS_DEFAULT_DEF (old_name))
- continue;
-
- tree *new_expr = region->parameter_rename_map->get (old_name);
- if (!new_expr)
- continue;
-
- replace_exp (use_p, *new_expr);
- }
-
update_stmt (copy);
}
}
diff --git a/gcc/sese.h b/gcc/sese.h
index 98ab4911e20..b3d48b9d421 100644
--- a/gcc/sese.h
+++ b/gcc/sese.h
@@ -22,8 +22,6 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_SESE_H
#define GCC_SESE_H
-typedef hash_map<tree, tree> parameter_rename_map_t;
-
/* A Single Entry, Single Exit region is a part of the CFG delimited
by two edges. */
struct sese_l
@@ -61,9 +59,6 @@ typedef struct sese_info_t
/* Parameters used within the SCOP. */
vec<tree> params;
- /* Parameters to be renamed. */
- parameter_rename_map_t *parameter_rename_map;
-
/* Loops completely contained in this SESE. */
bitmap loops;
vec<loop_p> loop_nest;
diff --git a/gcc/signop.h b/gcc/signop.h
index bc760eab5ef..94024d10395 100644
--- a/gcc/signop.h
+++ b/gcc/signop.h
@@ -25,11 +25,9 @@ along with GCC; see the file COPYING3. If not see
unsigned types. The signedness of a tree type can be found by
using the TYPE_SIGN macro. */
-enum signop_e {
+enum signop {
SIGNED,
UNSIGNED
};
-typedef enum signop_e signop;
-
#endif
diff --git a/gcc/testsuite/g++.dg/compat/compat.exp b/gcc/testsuite/g++.dg/compat/compat.exp
index 12722890c76..4c4b25f7e64 100644
--- a/gcc/testsuite/g++.dg/compat/compat.exp
+++ b/gcc/testsuite/g++.dg/compat/compat.exp
@@ -78,6 +78,7 @@ proc compat-use-tst-compiler { } {
set ALWAYS_CXXFLAGS $save_always_cxxflags
set ld_library_path $save_ld_library_path
set_ld_library_path_env_vars
+ clear_effective_target_cache
}
}
diff --git a/gcc/testsuite/g++.dg/compat/struct-layout-1.exp b/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
index 7777d98a3ce..097a731a671 100644
--- a/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
+++ b/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
@@ -61,6 +61,7 @@ proc compat-use-alt-compiler { } {
set ld_library_path $alt_ld_library_path
set_ld_library_path_env_vars
restore_gcc_exec_prefix_env_var
+ clear_effective_target_cache
}
}
diff --git a/gcc/testsuite/gcc.dg/graphite/scop-23.c b/gcc/testsuite/gcc.dg/graphite/scop-23.c
new file mode 100644
index 00000000000..d0627f8d70c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/scop-23.c
@@ -0,0 +1,40 @@
+int toto()
+{
+ int i,j, b;
+ int a[100];
+
+ if (i == 20)
+ {
+ for (j = 0; j <= 20; j++)
+ a[j] = b + i;
+ for (j = 2; j <= 23; j++)
+ a[j] = b + i;
+ b = 3;
+ }
+ else if (i == 12)
+ {
+ if (i == 30)
+ {
+ for (j = 0; j <= 30; j++)
+ a[j] = b + i;
+ b = 5;
+ }
+ else
+ {
+ for (j = 0; j <= 40; j++)
+ a[j] = b + i;
+ b = 8;
+ }
+ }
+ else if (i == 10)
+ {
+ b = 8;
+ }
+
+ for (j = 0; j <= 40; j++)
+ a[j] = b + i;
+
+ return a[b];
+}
+
+/* { dg-final { scan-tree-dump-times "number of SCoPs: 1" 1 "graphite"} } */
diff --git a/gcc/testsuite/gcc.dg/pr42631.c b/gcc/testsuite/gcc.dg/pr42631.c
index 39b20a99ee6..18fb67d1d5e 100644
--- a/gcc/testsuite/gcc.dg/pr42631.c
+++ b/gcc/testsuite/gcc.dg/pr42631.c
@@ -14,7 +14,7 @@
combine uninitialized uses into a single web. */
/* { dg-do compile } */
-/* { dg-options "-g -O1 -funroll-loops -fcompare-debug -fdump-rtl-web" } */
+/* { dg-options "-g -O1 -funroll-loops -fcompare-debug" } */
/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
void foo()
@@ -22,6 +22,3 @@ void foo()
unsigned k;
while (--k > 0);
}
-
-/* { dg-final { scan-rtl-dump-not "Web oldreg" "web" } } */
-/* { dg-final { cleanup-rtl-dump "web" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fp16/set_zero_1.c b/gcc/testsuite/gcc.target/aarch64/fp16/set_zero_1.c
new file mode 100644
index 00000000000..69fd1e8585b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fp16/set_zero_1.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-mfp16-format=ieee" { target "arm*-*-*" } } */
+
+extern void abort (void);
+
+__attribute__ ((noinline))
+void setfoo (__fp16 *f)
+{
+ *f = 0.0;
+}
+
+int
+main (int argc, char **argv)
+{
+ __fp16 a = 1.0;
+ setfoo (&a);
+ if (a != 0.0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr47312.c b/gcc/testsuite/gcc.target/i386/pr47312.c
index a63089d422a..03769a1cf81 100644
--- a/gcc/testsuite/gcc.target/i386/pr47312.c
+++ b/gcc/testsuite/gcc.target/i386/pr47312.c
@@ -2,7 +2,9 @@
/* { dg-do link } */
/* { dg-require-effective-target lto } */
/* { dg-require-effective-target xop } */
+/* { dg-require-effective-target c99_runtime } */
/* { dg-options "-O -flto -mno-sse3 -mxop" } */
+/* { dg-add-options c99_runtime } */
extern double fma (double, double, double);
extern float fmaf (float, float, float);
@@ -18,6 +20,6 @@ main ()
f = fmaf (f, f, f);
d = fma (d, d, d);
ld = fmal (ld, ld, ld);
- asm volatile ("" : : "r" (&f), "r" (&d), "r" (&ld) : "memory");
+ __asm__ volatile ("" : : "r" (&f), "r" (&d), "r" (&ld) : "memory");
return 0;
}
diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp
index 141a4791f87..3ce264e21a3 100644
--- a/gcc/testsuite/lib/asan-dg.exp
+++ b/gcc/testsuite/lib/asan-dg.exp
@@ -138,6 +138,7 @@ proc asan_finish { args } {
}
set ld_library_path $asan_saved_library_path
set_ld_library_path_env_vars
+ clear_effective_target_cache
}
# Symbolize lines like
diff --git a/gcc/testsuite/lib/atomic-dg.exp b/gcc/testsuite/lib/atomic-dg.exp
index 81f52a394a0..0640f3c38b7 100644
--- a/gcc/testsuite/lib/atomic-dg.exp
+++ b/gcc/testsuite/lib/atomic-dg.exp
@@ -109,4 +109,5 @@ proc atomic_finish { args } {
unset TEST_ALWAYS_FLAGS
}
}
+ clear_effective_target_cache
}
diff --git a/gcc/testsuite/lib/cilk-plus-dg.exp b/gcc/testsuite/lib/cilk-plus-dg.exp
index 38e5400c134..7f38f37f59f 100644
--- a/gcc/testsuite/lib/cilk-plus-dg.exp
+++ b/gcc/testsuite/lib/cilk-plus-dg.exp
@@ -101,4 +101,5 @@ proc cilkplus_finish { args } {
} else {
unset TEST_ALWAYS_FLAGS
}
+ clear_effective_target_cache
}
diff --git a/gcc/testsuite/lib/clearcap.exp b/gcc/testsuite/lib/clearcap.exp
index d41aa1ed9dc..3e2a88c8ba2 100644
--- a/gcc/testsuite/lib/clearcap.exp
+++ b/gcc/testsuite/lib/clearcap.exp
@@ -55,4 +55,5 @@ proc clearcap-finish { args } {
} else {
unset TEST_ALWAYS_FLAGS
}
+ clear_effective_target_cache
}
diff --git a/gcc/testsuite/lib/mpx-dg.exp b/gcc/testsuite/lib/mpx-dg.exp
index c8f64cddd27..b2bd40c2802 100644
--- a/gcc/testsuite/lib/mpx-dg.exp
+++ b/gcc/testsuite/lib/mpx-dg.exp
@@ -142,4 +142,5 @@ proc mpx_finish { args } {
}
set ld_library_path $mpx_saved_library_path
set_ld_library_path_env_vars
+ clear_effective_target_cache
}
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index e0df1d2ff04..75d50682922 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -117,6 +117,7 @@ proc current_target_name { } {
proc check_cached_effective_target { prop args } {
global et_cache
+ global et_prop_list
set target [current_target_name]
if {![info exists et_cache($prop,target)]
@@ -135,6 +136,29 @@ proc check_cached_effective_target { prop args } {
return $value
}
+# Clear effective-target cache. This is useful after testing
+# effective-target features and overriding TEST_ALWAYS_FLAGS and/or
+# ALWAYS_CXXFLAGS.
+# If one changes ALWAYS_CXXFLAGS or TEST_ALWAYS_FLAGS then they should
+# do a clear_effective_target_cache at the end as the target cache can
+# make decisions based upon the flags, and those decisions need to be
+# redone when the flags change. An example of this is the
+# asan_init/asan_finish pair.
+
+proc clear_effective_target_cache { } {
+ global et_cache
+ global et_prop_list
+
+ if {[info exists et_prop_list]} {
+ verbose "clear_effective_target_cache: $et_prop_list" 2
+ foreach prop $et_prop_list {
+ unset et_cache($prop,value)
+ unset et_cache($prop,target)
+ }
+ unset et_prop_list
+ }
+}
+
# Like check_compile, but delete the output file and return true if the
# compiler printed no messages.
proc check_no_compiler_messages_nocache {args} {
diff --git a/gcc/testsuite/lib/tsan-dg.exp b/gcc/testsuite/lib/tsan-dg.exp
index eb528f8513e..ff51fdf34f9 100644
--- a/gcc/testsuite/lib/tsan-dg.exp
+++ b/gcc/testsuite/lib/tsan-dg.exp
@@ -149,4 +149,5 @@ proc tsan_finish { args } {
}
set ld_library_path $tsan_saved_library_path
set_ld_library_path_env_vars
+ clear_effective_target_cache
}
diff --git a/gcc/testsuite/lib/ubsan-dg.exp b/gcc/testsuite/lib/ubsan-dg.exp
index 81934bb2961..65799db0d93 100644
--- a/gcc/testsuite/lib/ubsan-dg.exp
+++ b/gcc/testsuite/lib/ubsan-dg.exp
@@ -121,4 +121,5 @@ proc ubsan_finish { args } {
}
set ld_library_path $ubsan_saved_library_path
set_ld_library_path_env_vars
+ clear_effective_target_cache
}
diff --git a/gcc/toplev.c b/gcc/toplev.c
index f790a8d1e4e..ef9ce1f325f 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1163,13 +1163,6 @@ general_init (const char *argv0, bool init_signals)
line_table->round_alloc_size = ggc_round_alloc_size;
init_ttree ();
- /* Melt needs PARMAPOLY & LIBTOOLDYNL */
-#if HAVE_PARMAPOLY
- /* Initialize the Parma Polyhedra Library. */
- if (ppl_initialize () <0)
- fatal_error ("failed to initialize Parma Polyedra Library");
-#endif
-
/* Initialize register usage now so switches may override. */
init_reg_sets ();
diff --git a/gcc/toplev.h b/gcc/toplev.h
index a1bbf6b4918..86f559ca4f5 100644
--- a/gcc/toplev.h
+++ b/gcc/toplev.h
@@ -96,7 +96,6 @@ extern bool set_src_pwd (const char *);
extern HOST_WIDE_INT get_random_seed (bool);
extern const char *set_random_seed (const char *);
-
extern void initialize_rtl (void);
diff --git a/gcc/tree-call-cdce.c b/gcc/tree-call-cdce.c
index b6d2edf5964..a5f38ce1331 100644
--- a/gcc/tree-call-cdce.c
+++ b/gcc/tree-call-cdce.c
@@ -82,7 +82,7 @@ along with GCC; see the file COPYING3. If not see
to indicate if lb and ub value are inclusive
respectively. */
-typedef struct input_domain
+struct inp_domain
{
int lb;
int ub;
@@ -90,7 +90,7 @@ typedef struct input_domain
bool has_ub;
bool is_lb_inclusive;
bool is_ub_inclusive;
-} inp_domain;
+};
/* A helper function to construct and return an input
domain object. LB is the lower bound, HAS_LB is
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c
index c46fb6ff70f..bb5cd496126 100644
--- a/gcc/tree-dfa.c
+++ b/gcc/tree-dfa.c
@@ -820,12 +820,11 @@ stmt_references_abnormal_ssa_name (gimple *stmt)
}
/* Pair of tree and a sorting index, for dump_enumerated_decls. */
-struct GTY(()) numbered_tree_d
+struct GTY(()) numbered_tree
{
tree t;
int num;
};
-typedef struct numbered_tree_d numbered_tree;
/* Compare two declarations references by their DECL_UID / sequence number.
diff --git a/gcc/tree-diagnostic.c b/gcc/tree-diagnostic.c
index 5f84a48ba47..bbb830b3e06 100644
--- a/gcc/tree-diagnostic.c
+++ b/gcc/tree-diagnostic.c
@@ -53,11 +53,11 @@ default_tree_diagnostic_starter (diagnostic_context *context,
/* This is a pair made of a location and the line map it originated
from. It's used in the maybe_unwind_expanded_macro_loc function
below. */
-typedef struct
+struct loc_map_pair
{
const line_map_macro *map;
source_location where;
-} loc_map_pair;
+};
/* Unwind the different macro expansions that lead to the token which
diff --git a/gcc/tree-inline.h b/gcc/tree-inline.h
index e73bf29ae6a..b8fb2a2a38c 100644
--- a/gcc/tree-inline.h
+++ b/gcc/tree-inline.h
@@ -152,7 +152,7 @@ struct copy_body_data
/* Weights of constructions for estimate_num_insns. */
-typedef struct eni_weights_d
+struct eni_weights
{
/* Cost per call. */
unsigned call_cost;
@@ -179,7 +179,7 @@ typedef struct eni_weights_d
cost of a switch statement is logarithmic rather than linear in number
of cases. */
bool time_based;
-} eni_weights;
+};
/* Weights that estimate_num_insns uses for heuristics in inlining. */
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index 91b21f6e298..e90aafb771c 100644
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -882,11 +882,11 @@ get_loop_exit_condition (const struct loop *loop)
/* Depth first search algorithm. */
-typedef enum t_bool {
+enum t_bool {
t_false,
t_true,
t_dont_know
-} t_bool;
+};
static t_bool follow_ssa_edge (struct loop *loop, gimple *, gphi *,
diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c
index b626f0df742..62b89e61d53 100644
--- a/gcc/tree-ssa-address.c
+++ b/gcc/tree-ssa-address.c
@@ -74,13 +74,13 @@ along with GCC; see the file COPYING3. If not see
/* A "template" for memory address, used to determine whether the address is
valid for mode. */
-typedef struct GTY (()) mem_addr_template {
+struct GTY (()) mem_addr_template {
rtx ref; /* The template. */
rtx * GTY ((skip)) step_p; /* The point in template where the step should be
filled in. */
rtx * GTY ((skip)) off_p; /* The point in template where the offset should
be filled in. */
-} mem_addr_template;
+};
/* The templates. Each of the low five bits of the index corresponds to one
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index f848c512dc7..5cb26441b51 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -1282,186 +1282,6 @@ cprop_into_successor_phis (basic_block bb,
}
}
-
-
-
-/// Basile: we have two definitions of record_edge_info, skipping the
-/// second one...
-#if 0
-/* We have finished optimizing BB, record any information implied by
- taking a specific outgoing edge from BB. */
-
-static void
-record_edge_info (basic_block bb)
-{
- gimple_stmt_iterator gsi = gsi_last_bb (bb);
- struct edge_info *edge_info;
-
- if (! gsi_end_p (gsi))
- {
- gimple stmt = gsi_stmt (gsi);
- location_t loc = gimple_location (stmt);
-
- if (gimple_code (stmt) == GIMPLE_SWITCH)
- {
- gswitch *switch_stmt = as_a <gswitch *> (stmt);
- tree index = gimple_switch_index (switch_stmt);
-
- if (TREE_CODE (index) == SSA_NAME)
- {
- int i;
- int n_labels = gimple_switch_num_labels (switch_stmt);
- tree *info = XCNEWVEC (tree, last_basic_block_for_fn (cfun));
- edge e;
- edge_iterator ei;
-
- for (i = 0; i < n_labels; i++)
- {
- tree label = gimple_switch_label (switch_stmt, i);
- basic_block target_bb = label_to_block (CASE_LABEL (label));
- if (CASE_HIGH (label)
- || !CASE_LOW (label)
- || info[target_bb->index])
- info[target_bb->index] = error_mark_node;
- else
- info[target_bb->index] = label;
- }
-
- FOR_EACH_EDGE (e, ei, bb->succs)
- {
- basic_block target_bb = e->dest;
- tree label = info[target_bb->index];
-
- if (label != NULL && label != error_mark_node)
- {
- tree x = fold_convert_loc (loc, TREE_TYPE (index),
- CASE_LOW (label));
- edge_info = allocate_edge_info (e);
- edge_info->lhs = index;
- edge_info->rhs = x;
- }
- }
- free (info);
- }
- }
-
- /* A COND_EXPR may create equivalences too. */
- if (gimple_code (stmt) == GIMPLE_COND)
- {
- edge true_edge;
- edge false_edge;
-
- tree op0 = gimple_cond_lhs (stmt);
- tree op1 = gimple_cond_rhs (stmt);
- enum tree_code code = gimple_cond_code (stmt);
-
- extract_true_false_edges_from_block (bb, &true_edge, &false_edge);
-
- /* Special case comparing booleans against a constant as we
- know the value of OP0 on both arms of the branch. i.e., we
- can record an equivalence for OP0 rather than COND. */
- if ((code == EQ_EXPR || code == NE_EXPR)
- && TREE_CODE (op0) == SSA_NAME
- && TREE_CODE (TREE_TYPE (op0)) == BOOLEAN_TYPE
- && is_gimple_min_invariant (op1))
- {
- if (code == EQ_EXPR)
- {
- edge_info = allocate_edge_info (true_edge);
- edge_info->lhs = op0;
- edge_info->rhs = (integer_zerop (op1)
- ? boolean_false_node
- : boolean_true_node);
-
- edge_info = allocate_edge_info (false_edge);
- edge_info->lhs = op0;
- edge_info->rhs = (integer_zerop (op1)
- ? boolean_true_node
- : boolean_false_node);
- }
- else
- {
- edge_info = allocate_edge_info (true_edge);
- edge_info->lhs = op0;
- edge_info->rhs = (integer_zerop (op1)
- ? boolean_true_node
- : boolean_false_node);
-
- edge_info = allocate_edge_info (false_edge);
- edge_info->lhs = op0;
- edge_info->rhs = (integer_zerop (op1)
- ? boolean_false_node
- : boolean_true_node);
- }
- }
- else if (is_gimple_min_invariant (op0)
- && (TREE_CODE (op1) == SSA_NAME
- || is_gimple_min_invariant (op1)))
- {
- tree cond = build2 (code, boolean_type_node, op0, op1);
- tree inverted = invert_truthvalue_loc (loc, cond);
- bool can_infer_simple_equiv
- = !(HONOR_SIGNED_ZEROS (op0)
- && real_zerop (op0));
- struct edge_info *edge_info;
-
- edge_info = allocate_edge_info (true_edge);
- record_conditions (edge_info, cond, inverted);
-
- if (can_infer_simple_equiv && code == EQ_EXPR)
- {
- edge_info->lhs = op1;
- edge_info->rhs = op0;
- }
-
- edge_info = allocate_edge_info (false_edge);
- record_conditions (edge_info, inverted, cond);
-
- if (can_infer_simple_equiv && TREE_CODE (inverted) == EQ_EXPR)
- {
- edge_info->lhs = op1;
- edge_info->rhs = op0;
- }
- }
-
- else if (TREE_CODE (op0) == SSA_NAME
- && (TREE_CODE (op1) == SSA_NAME
- || is_gimple_min_invariant (op1)))
- {
- tree cond = build2 (code, boolean_type_node, op0, op1);
- tree inverted = invert_truthvalue_loc (loc, cond);
- bool can_infer_simple_equiv
- = !(HONOR_SIGNED_ZEROS (op1)
- && (TREE_CODE (op1) == SSA_NAME || real_zerop (op1)));
- struct edge_info *edge_info;
-
- edge_info = allocate_edge_info (true_edge);
- record_conditions (edge_info, cond, inverted);
-
- if (can_infer_simple_equiv && code == EQ_EXPR)
- {
- edge_info->lhs = op0;
- edge_info->rhs = op1;
- }
-
- edge_info = allocate_edge_info (false_edge);
- record_conditions (edge_info, inverted, cond);
-
- if (can_infer_simple_equiv && TREE_CODE (inverted) == EQ_EXPR)
- {
- edge_info->lhs = op0;
- edge_info->rhs = op1;
- }
- }
- }
-
- /* ??? TRUTH_NOT_EXPR can create an equivalence too. */
- }
-}
-#endif
-
-
-
void
dom_opt_dom_walker::before_dom_children (basic_block bb)
{
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index 800cd0e935c..6d480c0df41 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -57,10 +57,10 @@ along with GCC; see the file COPYING3. If not see
/* Bounds on some value, BELOW <= X <= UP. */
-typedef struct
+struct bounds
{
mpz_t below, up;
-} bounds;
+};
/* Splits expression EXPR to a variable part VAR and constant OFFSET. */
diff --git a/gcc/tree-ssa-loop.h b/gcc/tree-ssa-loop.h
index f0ff9e1af40..48c7b6740ed 100644
--- a/gcc/tree-ssa-loop.h
+++ b/gcc/tree-ssa-loop.h
@@ -65,7 +65,7 @@ struct tree_niter_desc
extern bool for_each_index (tree *, bool (*) (tree, tree *, void *), void *);
extern char *get_lsm_tmp_name (tree ref, unsigned n, const char *suffix = NULL);
-extern unsigned tree_num_loop_insns (struct loop *, struct eni_weights_d *);
+extern unsigned tree_num_loop_insns (struct loop *, struct eni_weights *);
/* Returns the loop of the statement STMT. */
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 3a42ce22098..baafa34d40b 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -166,13 +166,13 @@ enum pre_expr_kind
CONSTANT
};
-typedef union pre_expr_union_d
+union pre_expr_union
{
tree name;
tree constant;
vn_nary_op_t nary;
vn_reference_t reference;
-} pre_expr_union;
+};
typedef struct pre_expr_d : nofree_ptr_hash <pre_expr_d>
{
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 7ff2aa59639..a75290c2c54 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -975,12 +975,12 @@ static void linearize_expr_tree (vec<operand_entry *> *, gimple *,
bool, bool);
/* Structure for tracking and counting operands. */
-typedef struct oecount_s {
+struct oecount {
int cnt;
int id;
enum tree_code oecode;
tree op;
-} oecount;
+};
/* The heap for the oecount hashtable and the sorted list of operands. */
diff --git a/gcc/tree-ssa-sccvn.h b/gcc/tree-ssa-sccvn.h
index ae34b303193..bbdca65ce46 100644
--- a/gcc/tree-ssa-sccvn.h
+++ b/gcc/tree-ssa-sccvn.h
@@ -190,7 +190,7 @@ typedef struct vn_ssa_aux
unsigned needs_insertion : 1;
} *vn_ssa_aux_t;
-typedef enum { VN_NOWALK, VN_WALK, VN_WALKREWRITE } vn_lookup_kind;
+enum vn_lookup_kind { VN_NOWALK, VN_WALK, VN_WALKREWRITE };
/* Return the value numbering info for an SSA_NAME. */
extern vn_ssa_aux_t VN_INFO (tree);
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 86386de5c3a..f24ebeba815 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -473,7 +473,7 @@ get_call_clobber_vi (gcall *call)
}
-typedef enum {SCALAR, DEREF, ADDRESSOF} constraint_expr_type;
+enum constraint_expr_type {SCALAR, DEREF, ADDRESSOF};
/* An expression that appears in a constraint. */
diff --git a/gcc/tree-ssa-uninit.c b/gcc/tree-ssa-uninit.c
index 315319dae9c..a439363d42f 100644
--- a/gcc/tree-ssa-uninit.c
+++ b/gcc/tree-ssa-uninit.c
@@ -477,13 +477,13 @@ compute_control_dep_chain (basic_block bb, basic_block dep_bb,
/* The type to represent a simple predicate */
-typedef struct use_def_pred_info
+struct pred_info
{
tree pred_lhs;
tree pred_rhs;
enum tree_code cond_code;
bool invert;
-} pred_info;
+};
/* The type to represent a sequence of predicates grouped
with .AND. operation. */
diff --git a/gcc/tree-ssa.h b/gcc/tree-ssa.h
index 63a209f801e..3b5bd706593 100644
--- a/gcc/tree-ssa.h
+++ b/gcc/tree-ssa.h
@@ -21,12 +21,11 @@ along with GCC; see the file COPYING3. If not see
#define GCC_TREE_SSA_H
/* Mapping for redirected edges. */
-struct _edge_var_map {
+struct edge_var_map {
tree result; /* PHI result. */
tree def; /* PHI arg definition. */
source_location locus; /* PHI arg location. */
};
-typedef struct _edge_var_map edge_var_map;
/* A vector of var maps. */
typedef vec<edge_var_map, va_heap, vl_embed> edge_var_map_vector;
diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c
index 843c34e91d5..c96e1967189 100644
--- a/gcc/tree-vect-loop-manip.c
+++ b/gcc/tree-vect-loop-manip.c
@@ -111,11 +111,11 @@ rename_variables_in_bb (basic_block bb, bool rename_from_outer_loop)
}
-typedef struct
+struct adjust_info
{
tree from, to;
basic_block bb;
-} adjust_info;
+};
/* A stack of values to be adjusted in debug stmts. We have to
process them LIFO, so that the closest substitution applies. If we
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index 4e1d2dbe858..b9d900c1bad 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -3317,7 +3317,7 @@ vect_recog_bool_pattern (vec<gimple *> *stmts, tree *type_in,
else
{
tree type = search_type_for_mask (var, vinfo);
- tree cst0, cst1, cmp, tmp;
+ tree cst0, cst1, tmp;
if (!type)
return NULL;
@@ -3333,9 +3333,7 @@ vect_recog_bool_pattern (vec<gimple *> *stmts, tree *type_in,
cst0 = build_int_cst (type, 0);
cst1 = build_int_cst (type, 1);
tmp = vect_recog_temp_ssa_var (type, NULL);
- cmp = build2 (NE_EXPR, boolean_type_node,
- var, build_int_cst (TREE_TYPE (var), 0));
- pattern_stmt = gimple_build_assign (tmp, COND_EXPR, cmp, cst1, cst0);
+ pattern_stmt = gimple_build_assign (tmp, COND_EXPR, var, cst1, cst0);
if (!useless_type_conversion_p (type, TREE_TYPE (lhs)))
{
@@ -3378,19 +3376,16 @@ vect_recog_bool_pattern (vec<gimple *> *stmts, tree *type_in,
if (get_vectype_for_scalar_type (type) == NULL_TREE)
return NULL;
- if (check_bool_pattern (var, vinfo))
- {
- rhs = adjust_bool_pattern (var, type, NULL_TREE, stmts);
- rhs = build2 (NE_EXPR, boolean_type_node,
- rhs, build_int_cst (type, 0));
- }
- else
- rhs = build2 (NE_EXPR, boolean_type_node,
- var, build_int_cst (TREE_TYPE (var), 0)),
+ if (!check_bool_pattern (var, vinfo))
+ return NULL;
+
+ rhs = adjust_bool_pattern (var, type, NULL_TREE, stmts);
lhs = vect_recog_temp_ssa_var (TREE_TYPE (lhs), NULL);
pattern_stmt
- = gimple_build_assign (lhs, COND_EXPR, rhs,
+ = gimple_build_assign (lhs, COND_EXPR,
+ build2 (NE_EXPR, boolean_type_node,
+ rhs, build_int_cst (type, 0)),
gimple_assign_rhs2 (last_stmt),
gimple_assign_rhs3 (last_stmt));
*type_out = vectype;
@@ -3417,7 +3412,7 @@ vect_recog_bool_pattern (vec<gimple *> *stmts, tree *type_in,
else
{
tree type = search_type_for_mask (var, vinfo);
- tree cst0, cst1, cmp, new_vectype;
+ tree cst0, cst1, new_vectype;
if (!type)
return NULL;
@@ -3430,10 +3425,7 @@ vect_recog_bool_pattern (vec<gimple *> *stmts, tree *type_in,
new_vectype = get_vectype_for_scalar_type (type);
rhs = vect_recog_temp_ssa_var (type, NULL);
- cmp = build2 (NE_EXPR, boolean_type_node,
- var, build_int_cst (TREE_TYPE (var), 0));
- pattern_stmt = gimple_build_assign (rhs, COND_EXPR,
- cmp, cst1, cst0);
+ pattern_stmt = gimple_build_assign (rhs, COND_EXPR, var, cst1, cst0);
pattern_stmt_info = new_stmt_vec_info (pattern_stmt, vinfo);
set_vinfo_for_stmt (pattern_stmt, pattern_stmt_info);
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 8c125962b87..75875f333ad 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -226,7 +226,8 @@ vect_get_and_check_slp_defs (vec_info *vinfo,
{
enum tree_code code = gimple_assign_rhs_code (stmt);
number_of_oprnds = gimple_num_ops (stmt) - 1;
- if (gimple_assign_rhs_code (stmt) == COND_EXPR)
+ if (gimple_assign_rhs_code (stmt) == COND_EXPR
+ && COMPARISON_CLASS_P (gimple_assign_rhs1 (stmt)))
{
first_op_cond = true;
commutative = true;
@@ -447,7 +448,6 @@ vect_build_slp_tree_1 (vec_info *vinfo,
machine_mode vec_mode;
HOST_WIDE_INT dummy;
gimple *first_load = NULL, *prev_first_load = NULL;
- tree cond;
/* For every stmt in NODE find its def stmt/s. */
FOR_EACH_VEC_ELT (stmts, i, stmt)
@@ -492,24 +492,6 @@ vect_build_slp_tree_1 (vec_info *vinfo,
return false;
}
- if (is_gimple_assign (stmt)
- && gimple_assign_rhs_code (stmt) == COND_EXPR
- && (cond = gimple_assign_rhs1 (stmt))
- && !COMPARISON_CLASS_P (cond))
- {
- if (dump_enabled_p ())
- {
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "Build SLP failed: condition is not "
- "comparison ");
- dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
- dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
- }
- /* Fatal mismatch. */
- matches[0] = false;
- return false;
- }
-
scalar_type = vect_get_smallest_scalar_type (stmt, &dummy, &dummy);
vectype = get_vectype_for_scalar_type (scalar_type);
if (!vectype)
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index e6a320b341e..cfe30e067ea 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -7194,6 +7194,19 @@ vect_is_simple_cond (tree cond, vec_info *vinfo, tree *comp_vectype)
enum vect_def_type dt;
tree vectype1 = NULL_TREE, vectype2 = NULL_TREE;
+ /* Mask case. */
+ if (TREE_CODE (cond) == SSA_NAME
+ && TREE_CODE (TREE_TYPE (cond)) == BOOLEAN_TYPE)
+ {
+ gimple *lhs_def_stmt = SSA_NAME_DEF_STMT (cond);
+ if (!vect_is_simple_use (cond, vinfo, &lhs_def_stmt,
+ &dt, comp_vectype)
+ || !*comp_vectype
+ || !VECTOR_BOOLEAN_TYPE_P (*comp_vectype))
+ return false;
+ return true;
+ }
+
if (!COMPARISON_CLASS_P (cond))
return false;
@@ -7263,6 +7276,7 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi,
vec<tree> vec_oprnds2 = vNULL;
vec<tree> vec_oprnds3 = vNULL;
tree vec_cmp_type;
+ bool masked = false;
if (reduc_index && STMT_SLP_TYPE (stmt_info))
return false;
@@ -7322,7 +7336,13 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi,
if (!vect_is_simple_use (else_clause, stmt_info->vinfo, &def_stmt, &dt))
return false;
- vec_cmp_type = build_same_sized_truth_vector_type (comp_vectype);
+ if (VECTOR_BOOLEAN_TYPE_P (comp_vectype))
+ {
+ vec_cmp_type = comp_vectype;
+ masked = true;
+ }
+ else
+ vec_cmp_type = build_same_sized_truth_vector_type (comp_vectype);
if (vec_cmp_type == NULL_TREE)
return false;
@@ -7357,14 +7377,20 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi,
auto_vec<tree, 4> ops;
auto_vec<vec<tree>, 4> vec_defs;
- ops.safe_push (TREE_OPERAND (cond_expr, 0));
- ops.safe_push (TREE_OPERAND (cond_expr, 1));
+ if (masked)
+ ops.safe_push (cond_expr);
+ else
+ {
+ ops.safe_push (TREE_OPERAND (cond_expr, 0));
+ ops.safe_push (TREE_OPERAND (cond_expr, 1));
+ }
ops.safe_push (then_clause);
ops.safe_push (else_clause);
vect_get_slp_defs (ops, slp_node, &vec_defs, -1);
vec_oprnds3 = vec_defs.pop ();
vec_oprnds2 = vec_defs.pop ();
- vec_oprnds1 = vec_defs.pop ();
+ if (!masked)
+ vec_oprnds1 = vec_defs.pop ();
vec_oprnds0 = vec_defs.pop ();
ops.release ();
@@ -7373,17 +7399,28 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi,
else
{
gimple *gtemp;
- vec_cond_lhs =
- vect_get_vec_def_for_operand (TREE_OPERAND (cond_expr, 0),
- stmt, comp_vectype);
- vect_is_simple_use (TREE_OPERAND (cond_expr, 0),
- loop_vinfo, &gtemp, &dts[0]);
-
- vec_cond_rhs =
- vect_get_vec_def_for_operand (TREE_OPERAND (cond_expr, 1),
- stmt, comp_vectype);
- vect_is_simple_use (TREE_OPERAND (cond_expr, 1),
- loop_vinfo, &gtemp, &dts[1]);
+ if (masked)
+ {
+ vec_cond_lhs
+ = vect_get_vec_def_for_operand (cond_expr, stmt,
+ comp_vectype);
+ vect_is_simple_use (cond_expr, stmt_info->vinfo,
+ &gtemp, &dts[0]);
+ }
+ else
+ {
+ vec_cond_lhs =
+ vect_get_vec_def_for_operand (TREE_OPERAND (cond_expr, 0),
+ stmt, comp_vectype);
+ vect_is_simple_use (TREE_OPERAND (cond_expr, 0),
+ loop_vinfo, &gtemp, &dts[0]);
+
+ vec_cond_rhs =
+ vect_get_vec_def_for_operand (TREE_OPERAND (cond_expr, 1),
+ stmt, comp_vectype);
+ vect_is_simple_use (TREE_OPERAND (cond_expr, 1),
+ loop_vinfo, &gtemp, &dts[1]);
+ }
if (reduc_index == 1)
vec_then_clause = reduc_def;
else
@@ -7405,10 +7442,14 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi,
}
else
{
- vec_cond_lhs = vect_get_vec_def_for_stmt_copy (dts[0],
- vec_oprnds0.pop ());
- vec_cond_rhs = vect_get_vec_def_for_stmt_copy (dts[1],
- vec_oprnds1.pop ());
+ vec_cond_lhs
+ = vect_get_vec_def_for_stmt_copy (dts[0],
+ vec_oprnds0.pop ());
+ if (!masked)
+ vec_cond_rhs
+ = vect_get_vec_def_for_stmt_copy (dts[1],
+ vec_oprnds1.pop ());
+
vec_then_clause = vect_get_vec_def_for_stmt_copy (dts[2],
vec_oprnds2.pop ());
vec_else_clause = vect_get_vec_def_for_stmt_copy (dts[3],
@@ -7418,7 +7459,8 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi,
if (!slp_node)
{
vec_oprnds0.quick_push (vec_cond_lhs);
- vec_oprnds1.quick_push (vec_cond_rhs);
+ if (!masked)
+ vec_oprnds1.quick_push (vec_cond_rhs);
vec_oprnds2.quick_push (vec_then_clause);
vec_oprnds3.quick_push (vec_else_clause);
}
@@ -7426,12 +7468,17 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi,
/* Arguments are ready. Create the new vector stmt. */
FOR_EACH_VEC_ELT (vec_oprnds0, i, vec_cond_lhs)
{
- vec_cond_rhs = vec_oprnds1[i];
vec_then_clause = vec_oprnds2[i];
vec_else_clause = vec_oprnds3[i];
- vec_compare = build2 (TREE_CODE (cond_expr), vec_cmp_type,
- vec_cond_lhs, vec_cond_rhs);
+ if (masked)
+ vec_compare = vec_cond_lhs;
+ else
+ {
+ vec_cond_rhs = vec_oprnds1[i];
+ vec_compare = build2 (TREE_CODE (cond_expr), vec_cmp_type,
+ vec_cond_lhs, vec_cond_rhs);
+ }
vec_cond_expr = build3 (VEC_COND_EXPR, vectype,
vec_compare, vec_then_clause, vec_else_clause);
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 878bfd59077..eaeeb05f2a2 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -73,12 +73,12 @@ enum vect_reduction_type {
/* Structure to encapsulate information about a group of like
instructions to be presented to the target cost model. */
-typedef struct _stmt_info_for_cost {
+struct stmt_info_for_cost {
int count;
enum vect_cost_for_stmt kind;
gimple *stmt;
int misalign;
-} stmt_info_for_cost;
+};
typedef vec<stmt_info_for_cost> stmt_vector_for_cost;
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index b0f6c78d734..e2393e4d3a0 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -158,10 +158,10 @@ static bool values_propagated;
node. */
static int *vr_phi_edge_counts;
-typedef struct {
+struct switch_update {
gswitch *stmt;
tree vec;
-} switch_update;
+};
static vec<edge> to_remove_edges;
static vec<switch_update> to_update_switch_stmts;
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index c8be4e8b722..9185bfd39cf 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -168,7 +168,7 @@ enum emit_note_where
};
/* Structure holding information about micro operation. */
-typedef struct micro_operation_def
+struct micro_operation
{
/* Type of micro operation. */
enum micro_operation_type type;
@@ -192,7 +192,7 @@ typedef struct micro_operation_def
/* Stack adjustment. */
HOST_WIDE_INT adjust;
} u;
-} micro_operation;
+};
/* A declaration of a variable, or an RTL value being handled like a
@@ -276,23 +276,23 @@ struct location_chain
DV on VALUEs, i.e., the VALUEs expanded so as to form the current
location of DV. Each entry is also part of VALUE' s linked-list of
backlinks back to DV. */
-typedef struct loc_exp_dep_s
+struct loc_exp_dep
{
/* The dependent DV. */
decl_or_value dv;
/* The dependency VALUE or DECL_DEBUG. */
rtx value;
/* The next entry in VALUE's backlinks list. */
- struct loc_exp_dep_s *next;
+ struct loc_exp_dep *next;
/* A pointer to the pointer to this entry (head or prev's next) in
the doubly-linked list. */
- struct loc_exp_dep_s **pprev;
-} loc_exp_dep;
+ struct loc_exp_dep **pprev;
+};
/* This data structure holds information about the depth of a variable
expansion. */
-typedef struct expand_depth_struct
+struct expand_depth
{
/* This measures the complexity of the expanded expression. It
grows by one for each level of expansion that adds more than one
@@ -301,7 +301,7 @@ typedef struct expand_depth_struct
/* This counts the number of ENTRY_VALUE expressions in an
expansion. We want to minimize their use. */
int entryvals;
-} expand_depth;
+};
/* This data structure is allocated for one-part variables at the time
of emitting notes. */
@@ -327,7 +327,7 @@ struct onepart_aux
};
/* Structure describing one part of variable. */
-typedef struct variable_part_def
+struct variable_part
{
/* Chain of locations of the part. */
location_chain *loc_chain;
@@ -343,7 +343,7 @@ typedef struct variable_part_def
/* Pointer to auxiliary data, if var->onepart and emit_notes. */
struct onepart_aux *onepaux;
} aux;
-} variable_part;
+};
/* Maximum number of location parts. */
#define MAX_VAR_PARTS 16
@@ -503,7 +503,7 @@ typedef variable_table_type::iterator variable_iterator_type;
/* Structure for passing some other parameters to function
emit_note_insn_var_location. */
-typedef struct emit_note_data_def
+struct emit_note_data
{
/* The instruction which the note will be emitted before/after. */
rtx_insn *insn;
@@ -513,7 +513,7 @@ typedef struct emit_note_data_def
/* The variables and values active at this point. */
variable_table_type *vars;
-} emit_note_data;
+};
/* Structure holding a refcounted hash table. If refcount > 1,
it must be first unshared before modified. */
@@ -527,7 +527,7 @@ struct shared_hash
};
/* Structure holding the IN or OUT set for a basic block. */
-typedef struct dataflow_set_def
+struct dataflow_set
{
/* Adjustment of stack offset. */
HOST_WIDE_INT stack_adjust;
@@ -540,7 +540,7 @@ typedef struct dataflow_set_def
/* Vars that is being traversed. */
shared_hash *traversed_vars;
-} dataflow_set;
+};
/* The structure (one for each basic block) containing the information
needed for variable tracking. */
diff --git a/gcc/web.c b/gcc/web.c
index 9bb967782d6..975a66bba25 100644
--- a/gcc/web.c
+++ b/gcc/web.c
@@ -269,11 +269,7 @@ entry_register (web_entry *entry, df_ref ref, unsigned int *used)
and there won't be any use for the other values when we get to
this point. */
if (used[REGNO (reg)] != 1)
- {
- newreg = reg;
- if (!used[REGNO (reg)])
- used[REGNO (reg)] = 1;
- }
+ newreg = reg, used[REGNO (reg)] = 1;
else
{
newreg = gen_reg_rtx (GET_MODE (reg));