8sa1-gcc/gcc/gensupport.h
Martin Sebor 6c1dae73cd PR c++/61339 - add mismatch between struct and class [-Wmismatched-tags] to non-bugs
gcc/c/ChangeLog:

	PR c++/61339
	* c-decl.c: Change class-key from class to struct and vice versa
	to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
	* gimple-parser.c: Same.

gcc/c-family/ChangeLog:

	PR c++/61339
	* c-format.c (check_argument_type): Change class-key from class to
	struct and vice versa to match convention and avoid -Wclass-is-pod
	and -Wstruct-no-pod.
	* c-pretty-print.h: Same.

gcc/cp/ChangeLog:

	PR c++/61339
	* constexpr.c (cxx_eval_call_expression): Change class-key from class
	to struct and vice versa to match convention and avoid -Wclass-is-pod
	and -Wstruct-no-pod.
	* constraint.cc (get_concept_definition): Same.
	* cp-tree.h: Same.
	* cxx-pretty-print.h: Same.
	* error.c: Same.
	* logic.cc (term_list::replace): Same.
	* name-lookup.c (find_local_binding): Same.
	* pt.c (tsubst_binary_right_fold): Same.
	* search.c (field_accessor_p): Same.
	* semantics.c (expand_or_defer_fn): Same.

gcc/lto/ChangeLog:

	PR c++/61339
	* lto-dump.c: Change class-key from classi to struct and vice versa
	to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.

gcc/ChangeLog:

	PR c++/61339
	* align.h: Change class-key from class to struct and vice versa
	to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
	* alloc-pool.h: Same.
	* asan.c (shadow_mem_size): Same.
	* auto-profile.c: Same.
	* basic-block.h: Same.
	* bitmap.h: Same.
	* cfgexpand.c (set_rtl): Same.
	(expand_one_stack_var_at): Same.
	* cfghooks.h: Same.
	* cfgloop.h: Same.
	* cgraph.h: Same.
	* config/i386/i386.h: Same.
	* df-problems.c (df_print_bb_index): Same.
	* df-scan.c: Same.
	* df.h (df_single_use): Same.
	* diagnostic-show-locus.c (layout::print_annotation_line): Same.
	(layout::annotation_line_showed_range_p): Same.
	(get_printed_columns): Same.
	(correction::ensure_terminated): Same.
	(line_corrections::~line_corrections): Same.
	* dojump.h: Same.
	* dse.c: Same.
	* dump-context.h: Same.
	* dumpfile.h: Same.
	* dwarf2out.c: Same.
	* edit-context.c: Same.
	* fibonacci_heap.c (test_union_of_equal_heaps): Same.
	* flags.h: Same.
	* function.c (assign_stack_local): Same.
	* function.h: Same.
	* gcc.c: Same.
	* gcov.c (block_info::block_info): Same.
	* genattrtab.c: Same.
	* genextract.c: Same.
	* genmatch.c (comparison_code_p): Same.
	(id_base::id_base): Same.
	(decision_tree::print): Same.
	* genoutput.c: Same.
	* genpreds.c (write_one_predicate_function): Same.
	* genrecog.c (validate_pattern): Same.
	(find_operand_positions): Same.
	(optimize_subroutine_group): Same.
	(merge_pattern_transition::merge_pattern_transition): Same.
	(merge_pattern_info::merge_pattern_info): Same.
	(merge_state_result::merge_state_result): Same.
	(merge_into_state): Same.
	* gensupport.c: Same.
	* gensupport.h: Same.
	* ggc-common.c (init_ggc_heuristics): Same.
	* ggc-tests.c (test_union): Same.
	* gimple-loop-interchange.cc (dump_induction): Same.
	* gimple-loop-versioning.cc: Same.
	* gimple-match.h (gimple_match_cond::any_else): Same.
	* gimple-ssa-backprop.c: Same.
	* gimple-ssa-sprintf.c: Same.
	* gimple-ssa-store-merging.c (store_operand_info::store_operand_info): Same.
	(store_immediate_info::store_immediate_info): Same.
	(merged_store_group::apply_stores): Same.
	(get_location_for_stmts): Same.
	* gimple-ssa-strength-reduction.c: Same.
	* gimple-ssa-warn-alloca.c: Same.
	* gimple-ssa-warn-restrict.c (pass_wrestrict::execute): Same.
	* godump.c (go_type_decl): Same.
	* hash-map-tests.c (test_map_of_strings_to_int): Same.
	* hash-map.h: Same.
	* hash-set-tests.c (test_set_of_strings): Same.
	* hsa-brig.c: Same.
	* hsa-common.h: Same.
	* hsa-gen.c (transformable_switch_to_sbr_p): Same.
	* input.c (assert_loceq): Same.
	* input.h: Same.
	* ipa-cp.c: Same.
	* ipa-devirt.c (possible_polymorphic_call_targets_1): Same.
	* ipa-fnsummary.h: Same.
	* ipa-inline.h: Same.
	* ipa-prop.h: Same.
	* ipa-split.c (visit_bb): Same.
	* ira-int.h (minmax_set_iter_next): Same.
	* loop-invariant.c: Same.
	* loop-iv.c: Same.
	* lra-eliminations.c: Same.
	* lra-int.h: Same.
	* lra-lives.c (mark_regno_dead): Same.
	* lra-remat.c: Same.
	* lra-spills.c: Same.
	* lto-streamer.h: Same.
	* mem-stats.h: Same.
	* omp-grid.c (omp_grid_lastprivate_predicate): Same.
	* omp-low.c (omp_clause_aligned_alignment): Same.
	* optabs-query.h (get_vcond_eq_icode): Same.
	* optabs.h: Same.
	* opts.c (wrap_help): Same.
	* poly-int.h: Same.
	* predict.c (predict_paths_leading_to_edge): Same.
	* pretty-print.h: Same.
	* profile-count.h: Same.
	* read-md.h: Same.
	* read-rtl-function.c: Same.
	* ree.c: Same.
	* reginfo.c: Same.
	* regrename.c: Same.
	* regrename.h: Same.
	* reload.h: Same.
	* rtl-iter.h: Same.
	* rtl.h (costs_add_n_insns): Same.
	* sanopt.c: Same.
	* sched-int.h: Same.
	* sel-sched-ir.h: Same.
	* selftest.h: Same.
	* sese.h (vec_find): Same.
	* stmt.c: Same.
	* target-globals.h: Same.
	* tree-affine.c (aff_combination_find_elt): Same.
	* tree-affine.h: Same.
	* tree-data-ref.h: Same.
	* tree-outof-ssa.c (ssa_is_replaceable_p): Same.
	* tree-predcom.c: Same.
	* tree-scalar-evolution.c (find_var_scev_info): Same.
	* tree-ssa-alias.h: Same.
	* tree-ssa-ccp.c: Same.
	* tree-ssa-coalesce.c (ssa_conflicts_dump): Same.
	* tree-ssa-loop-im.c (for_all_locs_in_loop): Same.
	(rewrite_mem_refs): Same.
	(execute_sm_if_changed): Same.
	(hoist_memory_references): Same.
	* tree-ssa-loop-ivopts.c (operator<=): Same.
	* tree-ssa-loop.h: Same.
	* tree-ssa-pre.c (get_or_alloc_expr_for_name): Same.
	* tree-ssa-structalias.c: Same.
	* tree-switch-conversion.h (cluster::cluster): Same.
	(simple_cluster::simple_cluster): Same.
	* tree-vect-patterns.c (type_conversion_p): Same.
	* tree-vectorizer.c (dump_stmt_cost): Same.
	* tree-vectorizer.h (loop_vec_info_for_loop): Same.
	* tree.c (protected_set_expr_location): Same.
	* tree.h (desired_pro_or_demotion_p): Same.
	(fndecl_built_in_p): Same.
	* unique-ptr-tests.cc: Same.
	* var-tracking.c (delete_variable_part): Same.
	* varasm.c (assemble_real): Same.
	(tree_output_constant_def): Same.
	* vec.c: Same.
	* wide-int-bitmask.h: Same.
	* wide-int.h (decompose): Same.

From-SVN: r273308
2019-07-09 10:36:00 -06:00

229 lines
6.8 KiB
C++

/* Declarations for rtx-reader support for gen* routines.
Copyright (C) 2000-2019 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#ifndef GCC_GENSUPPORT_H
#define GCC_GENSUPPORT_H
#include "read-md.h"
struct obstack;
extern struct obstack *rtl_obstack;
/* Information about an .md define_* rtx. */
class md_rtx_info {
public:
/* The rtx itself. */
rtx def;
/* The location of the first line of the rtx. */
file_location loc;
/* The unique number attached to the rtx. Currently all define_insns,
define_expands, define_splits, define_peepholes and define_peephole2s
share the same insn_code index space. */
int index;
};
#define OPTAB_CL(name, pat, c, b, l) name,
#define OPTAB_CX(name, pat)
#define OPTAB_CD(name, pat) name,
#define OPTAB_NL(name, pat, c, b, s, l) name,
#define OPTAB_NC(name, pat, c) name,
#define OPTAB_NX(name, pat)
#define OPTAB_VL(name, pat, c, b, s, l) name,
#define OPTAB_VC(name, pat, c) name,
#define OPTAB_VX(name, pat)
#define OPTAB_DC(name, pat, c) name,
#define OPTAB_D(name, pat) name,
/* Enumerates all optabs. */
typedef enum optab_tag {
unknown_optab,
#include "optabs.def"
NUM_OPTABS
} optab;
#undef OPTAB_CL
#undef OPTAB_CX
#undef OPTAB_CD
#undef OPTAB_NL
#undef OPTAB_NC
#undef OPTAB_NX
#undef OPTAB_VL
#undef OPTAB_VC
#undef OPTAB_VX
#undef OPTAB_DC
#undef OPTAB_D
/* Describes one entry in optabs.def. */
struct optab_def
{
/* The name of the optab (e.g. "add_optab"). */
const char *name;
/* The pattern that matching define_expands and define_insns have.
See the comment at the head of optabs.def for details. */
const char *pattern;
/* The initializers (in the form of C code) for the libcall_basename,
libcall_suffix and libcall_gen fields of (convert_)optab_libcall_d. */
const char *base;
const char *suffix;
const char *libcall;
/* The optab's enum value. */
unsigned int op;
/* The value returned by optab_to_code (OP). */
enum rtx_code fcode;
/* CODE if code_to_optab (CODE) should return OP, otherwise UNKNOWN. */
enum rtx_code rcode;
/* 1: conversion optabs with libcall data,
2: conversion optabs without libcall data,
3: non-conversion optabs with libcall data ("normal" and "overflow"
optabs in the optabs.def comment)
4: non-conversion optabs without libcall data ("direct" optabs). */
unsigned int kind;
};
extern optab_def optabs[];
extern unsigned int num_optabs;
/* Information about an instruction name that matches an optab pattern. */
struct optab_pattern
{
/* The name of the instruction. */
const char *name;
/* The matching optab. */
unsigned int op;
/* The optab modes. M2 is only significant for conversion optabs;
it is zero otherwise. */
unsigned int m1, m2;
/* An index that provides a lexicographical sort of (OP, M2, M1).
Used by genopinit.c. */
unsigned int sort_num;
};
extern rtx add_implicit_parallel (rtvec);
extern rtx_reader *init_rtx_reader_args_cb (int, const char **,
bool (*)(const char *));
extern rtx_reader *init_rtx_reader_args (int, const char **);
extern bool read_md_rtx (md_rtx_info *);
extern unsigned int get_num_insn_codes ();
/* Set this to 0 to disable automatic elision of insn patterns which
can never be used in this configuration. See genconditions.c.
Must be set before calling init_md_reader. */
extern int insn_elision;
/* Return the C test that says whether a definition rtx can be used,
or "" if it can be used unconditionally. */
extern const char *get_c_test (rtx);
/* If the C test passed as the argument can be evaluated at compile
time, return its truth value; else return -1. The test must have
appeared somewhere in the machine description when genconditions
was run. */
extern int maybe_eval_c_test (const char *);
/* Add an entry to the table of conditions. Used by genconditions and
by read-rtl.c. */
extern void add_c_test (const char *, int);
/* This structure is used internally by gensupport.c and genconditions.c. */
struct c_test
{
const char *expr;
int value;
};
#ifdef __HASHTAB_H__
extern hashval_t hash_c_test (const void *);
extern int cmp_c_test (const void *, const void *);
extern void traverse_c_tests (htab_trav, void *);
#endif
/* Predicate handling: helper functions and data structures. */
struct pred_data
{
struct pred_data *next; /* for iterating over the set of all preds */
const char *name; /* predicate name */
bool special; /* special handling of modes? */
/* data used primarily by genpreds.c */
const char *c_block; /* C test block */
rtx exp; /* RTL test expression */
/* data used primarily by genrecog.c */
enum rtx_code singleton; /* if pred takes only one code, that code */
int num_codes; /* number of codes accepted */
bool allows_non_lvalue; /* if pred allows non-lvalue expressions */
bool allows_non_const; /* if pred allows non-const expressions */
bool codes[NUM_RTX_CODE]; /* set of codes accepted */
};
extern struct pred_data *first_predicate;
extern struct pred_data *lookup_predicate (const char *);
extern void add_predicate_code (struct pred_data *, enum rtx_code);
extern void add_predicate (struct pred_data *);
#define FOR_ALL_PREDICATES(p) for (p = first_predicate; p; p = p->next)
struct pattern_stats
{
/* The largest match_operand, match_operator or match_parallel
number found. */
int max_opno;
/* The largest match_dup, match_op_dup or match_par_dup number found. */
int max_dup_opno;
/* The smallest and largest match_scratch number found. */
int min_scratch_opno;
int max_scratch_opno;
/* The number of times match_dup, match_op_dup or match_par_dup appears
in the pattern. */
int num_dups;
/* The number of rtx arguments to the generator function. */
int num_generator_args;
/* The number of rtx operands in an insn. */
int num_insn_operands;
/* The number of operand variables that are needed. */
int num_operand_vars;
};
extern void get_pattern_stats (struct pattern_stats *ranges, rtvec vec);
extern void compute_test_codes (rtx, file_location, char *);
extern file_location get_file_location (rtx);
extern const char *get_emit_function (rtx);
extern bool needs_barrier_p (rtx);
extern bool find_optab (optab_pattern *, const char *);
#endif /* GCC_GENSUPPORT_H */