+2019-07-09 Martin Sebor <msebor@redhat.com>
+
+ 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.
+
2019-07-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/91114
/* Alignment flags is structure used as value of -align-* options.
It's used in target-dependant code. */
-struct align_flags
+class align_flags
{
+public:
/* Default constructor. */
align_flags (int log0 = 0, int maxskip0 = 0, int log1 = 0, int maxskip1 = 0)
{
extern ALLOC_POOL_ID_TYPE last_id;
/* Pool allocator memory usage. */
-struct pool_usage: public mem_usage
+class pool_usage: public mem_usage
{
+public:
/* Default contructor. */
pool_usage (): m_element_size (0), m_pool_name ("") {}
/* Constructor. */
#define RZ_BUFFER_SIZE 4
/* ASAN redzone buffer container that handles emission of shadow bytes. */
-struct asan_redzone_buffer
+class asan_redzone_buffer
{
+public:
/* Constructor. */
asan_redzone_buffer (rtx shadow_mem, HOST_WIDE_INT prev_offset):
m_shadow_mem (shadow_mem), m_prev_offset (prev_offset),
typedef std::set<gimple *> stmt_set;
/* Represent count info of an inline stack. */
-struct count_info
+class count_info
{
+public:
/* Sampled count of the inline stack. */
gcov_type count;
#include <profile-count.h>
/* Control flow edge information. */
-struct GTY((user)) edge_def {
+class GTY((user)) edge_def {
+public:
/* The two blocks at the ends of the edge. */
basic_block src;
basic_block dest;
#include "obstack.h"
/* Bitmap memory usage. */
-struct bitmap_usage: public mem_usage
+class bitmap_usage: public mem_usage
{
+public:
/* Default contructor. */
bitmap_usage (): m_nsearches (0), m_search_iter (0) {}
/* Constructor. */
/* Head of bitmap linked list. The 'current' member points to something
already pointed to by the chain started by first, so GTY((skip)) it. */
-struct GTY(()) bitmap_head {
+class GTY(()) bitmap_head {
+public:
static bitmap_obstack crashme;
/* Poison obstack to not make it not a valid initialized GC bitmap. */
CONSTEXPR bitmap_head()
+2019-07-09 Martin Sebor <msebor@redhat.com>
+
+ 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.
+
2019-07-03 Martin Liska <mliska@suse.cz>
* c-common.c (try_to_locate_new_include_insertion_point): Remove
/* Support struct for argument_parser and check_format_info_main.
Encapsulates any length modifier applied to the current argument. */
-struct length_modifier
+class length_modifier
{
+public:
length_modifier ()
: chars (NULL), val (FMT_LEN_none), std (STD_C89),
scalar_identity_flag (0)
/* Describes "paired tokens" within the format string that are
expected to be balanced. */
-struct baltoks_t
+class baltoks_t
{
+public:
baltoks_t (): singlequote (), doublequote () { }
typedef auto_vec<const char *> balanced_tokens_t;
facilities provided here. A derived pretty-printer can override
any function listed in the vtable below. See cp/cxx-pretty-print.h
and cp/cxx-pretty-print.c for an example of derivation. */
-struct c_pretty_printer : pretty_printer
+class c_pretty_printer : public pretty_printer
{
+public:
c_pretty_printer ();
// Format string, possibly translated.
+2019-07-09 Martin Sebor <msebor@redhat.com>
+
+ 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.
+
2019-07-01 Richard Biener <rguenther@suse.de>
* gimple-parser.c (c_parser_gimple_postfix_expression): Handle
/* Information that we keep for a struct or union while it is being
parsed. */
-struct c_struct_parse_info
+class c_struct_parse_info
{
+public:
/* If warn_cxx_compat, a list of types defined within this
struct. */
auto_vec<tree> struct_types;
/* GIMPLE parser state. */
-struct gimple_parser
+class gimple_parser
{
+public:
gimple_parser (c_parser *p) : parser (p), edges(), current_bb(NULL) {}
/* c_parser is not visible here, use composition and fake inheritance
via a conversion operator. */
c_parser *parser;
/* CFG build state. */
- struct gimple_parser_edge
+ class gimple_parser_edge
{
+ public:
int src;
int dest;
int flags;
/* This structure holds data relevant to one variable that will be
placed in a stack slot. */
-struct stack_var
+class stack_var
{
+public:
/* The Variable. */
tree decl;
set_rtl (decl, x);
}
-struct stack_vars_data
+class stack_vars_data
{
+public:
/* Vector of offset pairs, always end of some padding followed
by start of the padding that needs Address Sanitizer protection.
The vector is in reversed, highest offset pairs come first. */
/* Optional data for duplicate_block. */
-struct copy_bb_data
+class copy_bb_data
{
+public:
copy_bb_data() : dependence_map (NULL) {}
~copy_bb_data () { delete dependence_map; }
/* The structure describing a bound on number of iterations of a loop. */
-struct GTY ((chain_next ("%h.next"))) nb_iter_bound {
+class GTY ((chain_next ("%h.next"))) nb_iter_bound {
+public:
/* The statement STMT is executed at most ... */
gimple *stmt;
};
/* Structure to hold information for each natural loop. */
-struct GTY ((chain_next ("%h.next"))) loop {
+class GTY ((chain_next ("%h.next"))) loop {
+public:
/* Index into loops array. Note indices will never be reused after loop
is destroyed. */
int num;
computation is done, which would enable it to be different from the
outer one? */
-struct rtx_iv
+class rtx_iv
{
+public:
/* Its base and step (mode of base and step is supposed to be extend_mode,
see the description above). */
rtx base, step;
/* The description of an exit from the loop and of the number of iterations
till we take the exit. */
-struct GTY(()) niter_desc
+class GTY(()) niter_desc
{
+public:
/* The edge out of the loop. */
edge out_edge;
/* The iterator for loops. */
-struct loop_iterator
+class loop_iterator
{
+public:
loop_iterator (function *fn, loop_p *loop, unsigned flags);
~loop_iterator ();
/* Base of all entries in the symbol table.
The symtab_node is inherited by cgraph and varpol nodes. */
-class GTY((desc ("%h.type"), tag ("SYMTAB_SYMBOL"),
- chain_next ("%h.next"), chain_prev ("%h.previous")))
+struct GTY((desc ("%h.type"), tag ("SYMTAB_SYMBOL"),
+ chain_next ("%h.next"), chain_prev ("%h.previous")))
symtab_node
{
public:
/* The cgraph data structure.
Each function decl has assigned cgraph_node listing callees and callers. */
-struct GTY((tag ("SYMTAB_FUNCTION"))) cgraph_node : public symtab_node {
+class GTY((tag ("SYMTAB_FUNCTION"))) cgraph_node : public symtab_node
+{
public:
friend class symbol_table;
/* Structure containing additional information about an indirect call. */
-struct GTY(()) cgraph_indirect_call_info
+class GTY(()) cgraph_indirect_call_info
{
+public:
/* When agg_content is set, an offset where the call pointer is located
within the aggregate. */
HOST_WIDE_INT offset;
unsigned vptr_changed : 1;
};
-struct GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"),
- for_user)) cgraph_edge {
+class GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"),
+ for_user)) cgraph_edge
+{
+public:
friend class cgraph_node;
friend class symbol_table;
/* The varpool data structure.
Each static variable decl has assigned varpool_node. */
-class GTY((tag ("SYMTAB_VARIABLE"))) varpool_node : public symtab_node {
-public:
+struct GTY((tag ("SYMTAB_VARIABLE"))) varpool_node : public symtab_node
+{
/* Dump given varpool node to F. */
void dump (FILE *f);
#include "insn-attr-common.h"
-struct pta
+class pta
{
+public:
const char *const name; /* processor name or nickname. */
const enum processor_type processor;
const enum attr_cpu schedule;
+2019-07-09 Martin Sebor <msebor@redhat.com>
+
+ 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.
+
2019-07-08 Jakub Jelinek <jakub@redhat.com>
PR c++/91110
/* We build up the bindings list before we know whether we already have this
call cached. If we don't end up saving these bindings, ggc_free them when
this function exits. */
- struct free_bindings
+ class free_bindings
{
+ public:
tree &bindings;
bool do_free;
free_bindings (tree &b): bindings (b), do_free(true) { }
int expansion_level = 0;
-struct expanding_concept_sentinel
+class expanding_concept_sentinel
{
+public:
expanding_concept_sentinel ()
{
++expansion_level;
/* Simplified unique_ptr clone to release a tree vec on exit. */
-struct releasing_vec
+class releasing_vec
{
+public:
typedef vec<tree, va_gc> vec_t;
releasing_vec (vec_t *v): v(v) { }
/* RAII sentinel to handle clearing processing_template_decl and restoring
it when done. */
-struct processing_template_decl_sentinel
+class processing_template_decl_sentinel
{
+public:
int saved;
processing_template_decl_sentinel (bool reset = true)
: saved (processing_template_decl)
/* RAII sentinel to disable certain warnings during template substitution
and elsewhere. */
-struct warning_sentinel
+class warning_sentinel
{
+public:
int &flag;
int val;
warning_sentinel(int& flag, bool suppress=true)
/* RAII class used to inhibit the evaluation of operands during parsing
and template instantiation. Evaluation warnings are also inhibited. */
-struct cp_unevaluated
+class cp_unevaluated
{
+public:
cp_unevaluated ();
~cp_unevaluated ();
};
/* The reverse: an RAII class used for nested contexts that are evaluated even
if the enclosing context is not. */
-struct cp_evaluated
+class cp_evaluated
{
+public:
int uneval;
int inhibit;
cp_evaluated ()
// specializations. When the stack goes out of scope, the
// previous pointer map is restored.
enum lss_policy { lss_blank, lss_copy };
-struct local_specialization_stack
+class local_specialization_stack
{
+public:
local_specialization_stack (lss_policy = lss_blank);
~local_specialization_stack ();
/* RAII sentinel to ensures that deferred access checks are popped before
a function returns. */
-struct deferring_access_check_sentinel
+class deferring_access_check_sentinel
{
+public:
deferring_access_check_sentinel (enum deferring_kind kind = dk_deferred)
{
push_deferring_access_checks (kind);
pp_cxx_flag_default_argument = 1 << pp_c_flag_last_bit
};
-struct cxx_pretty_printer : c_pretty_printer
+class cxx_pretty_printer : public c_pretty_printer
{
+public:
cxx_pretty_printer ();
void constant (tree);
/* Struct for handling %H or %I, which require delaying printing the
type until a postprocessing stage. */
-struct deferred_printed_type
+class deferred_printed_type
{
+public:
deferred_printed_type ()
: m_tree (NULL_TREE), m_buffer_ptr (NULL), m_verbose (false), m_quote (false)
{}
Each term list maintains an iterator that refers to the current
term. This can be used by various tactics to support iteration
and stateful manipulation of the list. */
-struct term_list
+class term_list
{
+public:
typedef std::list<tree>::iterator iterator;
term_list ();
conclusions written as propositions in the constraint
language (i.e., lists of trees). */
-struct proof_goal
+class proof_goal
{
+public:
term_list assumptions;
term_list conclusions;
};
current sub-goal. The class also provides facilities
for managing subgoals and constructing term lists. */
-struct proof_state : std::list<proof_goal>
+class proof_state : public std::list<proof_goal>
{
+public:
proof_state ();
iterator branch (iterator i);
return NULL;
}
-struct name_lookup
+class name_lookup
{
public:
typedef std::pair<tree, tree> using_pair;
/* Walk through the pattern of a pack expansion, adding everything in
local_specializations to a list. */
-struct el_data
+class el_data
{
+public:
hash_set<tree> internal;
tree extra;
tsubst_flags_t complain;
/* Callback data for dfs_locate_field_accessor_pre. */
-struct locate_field_data
+class locate_field_data
{
+public:
locate_field_data (tree field_decl_, bool const_p_)
: field_decl (field_decl_), const_p (const_p_) {}
}
}
-struct nrv_data
+class nrv_data
{
+public:
nrv_data () : visited (37) {}
tree var;
/* Private data used to compute the solution for this problem. These
data structures are not accessible outside of this module. */
-struct df_rd_problem_data
+class df_rd_problem_data
{
+public:
/* The set of defs to regs invalidated by call. */
bitmap_head sparse_invalidated_by_call;
/* The set of defs to regs invalidate by call for rd. */
/* Initialize ur_in and ur_out as if all hard registers were partially
available. */
-struct df_collection_rec
+class df_collection_rec
{
+public:
auto_vec<df_ref, 128> def_vec;
auto_vec<df_ref, 32> use_vec;
auto_vec<df_ref, 32> eq_use_vec;
used by owners of the problem.
----------------------------------------------------------------------------*/
-struct df_d
+class df_d
{
+public:
/* The set of problems to be solved is stored in two arrays. In
PROBLEMS_IN_ORDER, the problems are stored in the order that they
the ref except sparse_kill which is indexed by regno. For the
LR&RD problem, the kill set is not complete: It does not contain
DEFs killed because the set register has died in the LR set. */
-struct df_rd_bb_info
+class df_rd_bb_info
{
+public:
/* Local sets to describe the basic blocks. */
bitmap_head kill;
bitmap_head sparse_kill;
/* Multiple reaching definitions. All bitmaps are referenced by the
register number. */
-struct df_md_bb_info
+class df_md_bb_info
{
+public:
/* Local sets to describe the basic blocks. */
bitmap_head gen; /* Partial/conditional definitions live at BB out. */
bitmap_head kill; /* Other definitions that are live at BB out. */
/* Live registers, a backwards dataflow problem. All bitmaps are
referenced by the register number. */
-struct df_lr_bb_info
+class df_lr_bb_info
{
+public:
/* Local sets to describe the basic blocks. */
bitmap_head def; /* The set of registers set in this block
- except artificial defs at the top. */
register number. Anded results of the forwards and backward live
info. Note that the forwards live information is not available
separately. */
-struct df_live_bb_info
+class df_live_bb_info
{
+public:
/* Local sets to describe the basic blocks. */
bitmap_head kill; /* The set of registers unset in this block. Calls,
for instance, unset registers. */
pseudo. Only pseudos that have a size of 2 * UNITS_PER_WORD are
meaningfully tracked. */
-struct df_word_lr_bb_info
+class df_word_lr_bb_info
{
+public:
/* Local sets to describe the basic blocks. */
bitmap_head def; /* The set of registers set in this block
- except artificial defs at the top. */
/* Must-initialized registers. All bitmaps are referenced by the
register number. */
-struct df_mir_bb_info
+class df_mir_bb_info
{
+public:
/* Local sets to describe the basic blocks. */
bitmap_head kill; /* The set of registers unset in this block. Calls,
for instance, unset registers. */
/* web */
-class web_entry_base
+struct web_entry_base
{
private:
/* Reference to the parent in the union/find tree. */
splits the pertinent source lines into a list of disjoint line_span
instances (e.g. lines 5-10, lines 15-20, line 23). */
-struct line_span
+class line_span
{
+public:
line_span (linenum_type first_line, linenum_type last_line)
: m_first_line (first_line), m_last_line (last_line)
{
A label within the given row of source. */
-struct line_label
+class line_label
{
+public:
line_label (int state_idx, int column, label_text text)
: m_state_idx (state_idx), m_column (column),
m_text (text), m_length (strlen (text.m_buffer)),
/* A range of columns within a line. */
-struct column_range
+class column_range
{
+public:
column_range (int start_, int finish_) : start (start_), finish (finish_)
{
/* We must have either a range, or an insertion. */
instances that affected the line, potentially consolidating hints
into corrections to make the result easier for the user to read. */
-struct correction
+class correction
{
+public:
correction (column_range affected_columns,
column_range printed_columns,
const char *new_text, size_t new_text_len)
This is used by layout::print_trailing_fixits for planning
how to print the fix-it hints affecting the line. */
-struct line_corrections
+class line_corrections
{
+public:
line_corrections (const char *filename, linenum_type row)
: m_filename (filename), m_row (row)
{}
/* A struct wrapping a particular source line, allowing
run-time bounds-checking of accesses in a checked build. */
-struct source_line
+class source_line
{
+public:
source_line (const char *filename, int line);
char_span as_span () { return char_span (chars, width); }
/* Struct for saving/restoring of pending_stack_adjust/stack_pointer_delta
values. */
-struct saved_pending_stack_adjust
+class saved_pending_stack_adjust
{
+public:
/* Saved value of pending_stack_adjust. */
poly_int64 x_pending_stack_adjust;
struct insn_info_type;
/* This structure holds information about a candidate store. */
-struct store_info
+class store_info
{
+public:
/* False means this is a clobber. */
bool is_set;
/* This structure holds information about a load. These are only
built for rtx bases. */
-struct read_info_type
+class read_info_type
{
+public:
/* The id of the mem group of the base address. */
int group_id;
private:
/* Information on an optinfo_item that was generated during phase 2 of
formatting. */
- struct stashed_item
+ class stashed_item
{
+ public:
stashed_item (const char **buffer_ptr_, optinfo_item *item_)
: buffer_ptr (buffer_ptr_), item (item_) {}
const char **buffer_ptr;
/* A class for identifying where in the compiler's own source
(or a plugin) that a dump message is being emitted from. */
-struct dump_impl_location_t
+class dump_impl_location_t
{
+public:
dump_impl_location_t (
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
const char *file = __builtin_FILE (),
/* Set to TRUE while dwarf2out_early_global_decl is running. */
static bool early_dwarf;
static bool early_dwarf_finished;
-struct set_early_dwarf {
+class set_early_dwarf {
+public:
bool saved;
set_early_dwarf () : saved(early_dwarf)
{
/* A struct to hold the params of a print_diff call. */
-struct diff
+class diff
{
+public:
diff (pretty_printer *pp, bool show_filenames)
: m_pp (pp), m_show_filenames (show_filenames) {}
/* Dummy struct for testing. */
-struct heap_key
+class heap_key
{
+public:
heap_key (int k): key (k)
{
}
\f
/* Other basic status info about current function. */
-struct target_flag_state
+class target_flag_state
{
+public:
/* Each falign-foo can generate up to two levels of alignment:
-falign-foo=N:M[:N2:M2] */
align_flags x_align_loops;
result, all temporaries are preserved. A temporary is preserved by
pretending it was allocated at the previous nesting level. */
-struct GTY(()) temp_slot {
+class GTY(()) temp_slot {
+public:
/* Points to next temporary slot. */
struct temp_slot *next;
/* Points to previous temporary slot. */
/* Describe an empty area of space in the stack frame. These can be chained
into a list; this is used to keep track of space wasted for alignment
reasons. */
-struct GTY(()) frame_space
+class GTY(()) frame_space
{
+public:
struct frame_space *next;
poly_int64 start;
poly_int64 length;
};
-struct GTY(()) stack_usage
+class GTY(()) stack_usage
{
+public:
/* # of bytes of static stack space allocated by the function. */
HOST_WIDE_INT static_stack_size;
getenv ();
Hence we need to use "get" for the accessor method, not "getenv". */
-class env_manager
+struct env_manager
{
public:
void init (bool can_restore, bool debug);
/* Check whether a particular argument was used. The first time we
canonicalize the switches to keep only the ones we care about. */
-class used_arg_t
+struct used_arg_t
{
public:
int operator () (const char *p, int len);
/* Describes which locations (lines and files) are associated with
a basic block. */
-struct block_location_info
+class block_location_info
{
+public:
block_location_info (unsigned _source_file_idx):
source_file_idx (_source_file_idx)
{}
/* Describes a basic block. Contains lists of arcs to successor and
predecessor blocks. */
-struct block_info
+class block_info
{
+public:
/* Constructor. */
block_info ();
/* Describes a single line of source. Contains a chain of basic blocks
with code on it. */
-struct line_info
+class line_info
{
+public:
/* Default constructor. */
line_info ();
/* Describes a single function. Contains an array of basic blocks. */
-struct function_info
+class function_info
{
+public:
function_info ();
~function_info ();
/* Describes a file mentioned in the block graph. Contains an array
of line info. */
-struct source_info
+class source_info
{
+public:
/* Default constructor. */
source_info ();
`struct insn_def'. This is done to allow attribute definitions to occur
anywhere in the file. */
-struct insn_def
+class insn_def
{
+public:
struct insn_def *next; /* Next insn in chain. */
rtx def; /* The DEFINE_... */
int insn_code; /* Instruction number. */
/* Structure for each attribute. */
-struct attr_desc
+class attr_desc
{
+public:
char *name; /* Name of attribute. */
const char *enum_name; /* Enum name for DEFINE_ENUM_NAME. */
struct attr_desc *next; /* Next attribute. */
/* Structure for each DEFINE_DELAY. */
-struct delay_desc
+class delay_desc
{
+public:
rtx def; /* DEFINE_DELAY expression. */
struct delay_desc *next; /* Next DEFINE_DELAY. */
file_location loc; /* Where in the .md files it occurs. */
data that will be used to produce an extractions structure. */
-struct accum_extract
+class accum_extract
{
+public:
accum_extract () : oplocs (10), duplocs (10), dupnums (10), pathstr (20) {}
auto_vec<locstr> oplocs;
/* Base class for all identifiers the parser knows. */
-struct id_base : nofree_ptr_hash<id_base>
+class id_base : public nofree_ptr_hash<id_base>
{
+public:
enum id_kind { CODE, FN, PREDICATE, USER, NULL_ID } kind;
id_base (id_kind, const char *, int = -1);
/* Identifier that maps to a tree code. */
-struct operator_id : public id_base
+class operator_id : public id_base
{
+public:
operator_id (enum tree_code code_, const char *id_, unsigned nargs_,
const char *tcc_)
: id_base (id_base::CODE, id_, nargs_), code (code_), tcc (tcc_) {}
/* Identifier that maps to a builtin or internal function code. */
-struct fn_id : public id_base
+class fn_id : public id_base
{
+public:
fn_id (enum built_in_function fn_, const char *id_)
: id_base (id_base::FN, id_), fn (fn_) {}
fn_id (enum internal_fn fn_, const char *id_)
/* Identifier that maps to a user-defined predicate. */
-struct predicate_id : public id_base
+class predicate_id : public id_base
{
+public:
predicate_id (const char *id_)
: id_base (id_base::PREDICATE, id_), matchers (vNULL) {}
vec<simplify *> matchers;
/* Identifier that maps to a operator defined by a 'for' directive. */
-struct user_id : public id_base
+class user_id : public id_base
{
+public:
user_id (const char *id_, bool is_oper_list_ = false)
: id_base (id_base::USER, id_), substitutes (vNULL),
used (false), is_oper_list (is_oper_list_) {}
/* The base class for operands. */
-struct operand {
+class operand {
+public:
enum op_type { OP_PREDICATE, OP_EXPR, OP_CAPTURE, OP_C_EXPR, OP_IF, OP_WITH };
operand (enum op_type type_, location_t loc_)
: type (type_), location (loc_) {}
/* A predicate operand. Predicates are leafs in the AST. */
-struct predicate : public operand
+class predicate : public operand
{
+public:
predicate (predicate_id *p_, location_t loc)
: operand (OP_PREDICATE, loc), p (p_) {}
predicate_id *p;
/* An operand that constitutes an expression. Expressions include
function calls and user-defined predicate invocations. */
-struct expr : public operand
+class expr : public operand
{
+public:
expr (id_base *operation_, location_t loc, bool is_commutative_ = false)
: operand (OP_EXPR, loc), operation (operation_),
ops (vNULL), expr_type (NULL), is_commutative (is_commutative_),
a leaf operand in the AST. This class is also used to represent
the code to be generated for 'if' and 'with' expressions. */
-struct c_expr : public operand
+class c_expr : public operand
{
+public:
/* A mapping of an identifier and its replacement. Used to apply
'for' lowering. */
- struct id_tab {
+ class id_tab {
+ public:
const char *id;
const char *oper;
id_tab (const char *id_, const char *oper_): id (id_), oper (oper_) {}
/* A wrapper around another operand that captures its value. */
-struct capture : public operand
+class capture : public operand
{
+public:
capture (location_t loc, unsigned where_, operand *what_, bool value_)
: operand (OP_CAPTURE, loc), where (where_), value_match (value_),
what (what_) {}
/* if expression. */
-struct if_expr : public operand
+class if_expr : public operand
{
+public:
if_expr (location_t loc)
: operand (OP_IF, loc), cond (NULL), trueexpr (NULL), falseexpr (NULL) {}
c_expr *cond;
/* with expression. */
-struct with_expr : public operand
+class with_expr : public operand
{
+public:
with_expr (location_t loc)
: operand (OP_WITH, loc), with (NULL), subexpr (NULL) {}
c_expr *with;
duplicates all outer 'if' and 'for' expressions here so each
simplify can exist in isolation. */
-struct simplify
+class simplify
{
+public:
enum simplify_kind { SIMPLIFY, MATCH };
simplify (simplify_kind kind_, unsigned id_, operand *match_,
/* Decision tree base class, used for DT_NODE. */
-struct dt_node
+class dt_node
{
+public:
enum dt_type { DT_NODE, DT_OPERAND, DT_TRUE, DT_MATCH, DT_SIMPLIFY };
enum dt_type type;
/* Generic decision tree node used for DT_OPERAND, DT_MATCH and DT_TRUE. */
-struct dt_operand : public dt_node
+class dt_operand : public dt_node
{
+public:
operand *op;
dt_operand *match_dop;
unsigned pos;
/* Leaf node of the decision tree, used for DT_SIMPLIFY. */
-struct dt_simplify : public dt_node
+class dt_simplify : public dt_node
{
+public:
simplify *s;
unsigned pattern_no;
dt_operand **indexes;
/* A container for the actual decision tree. */
-struct decision_tree
+class decision_tree
{
+public:
dt_node *root;
void insert (struct simplify *, unsigned);
on the outermost match expression operands for cases we cannot
handle. */
-struct capture_info
+class capture_info
{
+public:
capture_info (simplify *s, operand *, bool);
void walk_match (operand *o, unsigned toplevel_arg, bool, bool);
bool walk_result (operand *o, bool, operand *);
/* Record in this chain all information that we will output,
associated with the code number of the insn. */
-struct data
+class data
{
+public:
struct data *next;
const char *name;
const char *template_code;
static void validate_insn_alternatives (struct data *);
static void validate_insn_operands (struct data *);
-struct constraint_data
+class constraint_data
{
+public:
struct constraint_data *next_this_letter;
file_location loc;
unsigned int namelen;
verify that there are no duplicate names. */
/* All data from one constraint definition. */
-struct constraint_data
+class constraint_data
{
+public:
struct constraint_data *next_this_letter;
struct constraint_data *next_textual;
const char *name;
to "T *prev, *next;" and a function "void set_parent (list_head <T> *)"
to set the parent list. */
template <typename T>
-struct list_head
+class list_head
{
+public:
/* A range of linked items. */
- struct range
+ class range
{
+ public:
range (T *);
range (T *, T *);
}
/* Represents a parameter to a pattern routine. */
-struct parameter
+class parameter
{
+public:
/* The C type of parameter. */
enum type_enum {
/* Represents an invalid parameter. */
an ad-hoc enum value on success and -1 on failure. The routine can
be used by any subroutine type. The match can be parameterized by
things like mode, code and UNSPEC number. */
-struct pattern_routine
+class pattern_routine
{
+public:
/* The state that implements the pattern. */
state *s;
static vec <pattern_routine *> patterns;
/* Represents one use of a pattern routine. */
-struct pattern_use
+class pattern_use
{
+public:
/* The pattern routine to use. */
pattern_routine *routine;
};
/* Represents a test performed by a decision. */
-struct rtx_test
+class rtx_test
{
+public:
rtx_test ();
/* The types of test that can be performed. Most of them take as input
/* A simple set of transition labels. Most transitions have a singleton
label, so try to make that case as efficient as possible. */
-struct int_set : public auto_vec <uint64_t, 1>
+class int_set : public auto_vec <uint64_t, 1>
{
+public:
typedef uint64_t *iterator;
int_set ();
/* Represents a transition between states, dependent on the result of
a test T. */
-struct transition
+class transition
{
+public:
transition (const int_set &, state *, bool);
void set_parent (list_head <transition> *);
to the transition's target state. If no suitable transition exists,
the machine either falls through to the next decision or, if there are no
more decisions to try, fails the match. */
-struct decision : list_head <transition>
+class decision : public list_head <transition>
{
+public:
decision (const rtx_test &);
void set_parent (list_head <decision> *s);
/* Represents one machine state. For each state the machine tries a list
of decisions, in order, and acts on the first match. It fails without
further backtracking if no decisions match. */
-struct state : list_head <decision>
+class state : public list_head <decision>
{
+public:
void set_parent (list_head <state> *) {}
};
const unsigned char TESTED_VECLEN = 2;
/* Represents a set of conditions that are known to hold. */
-struct known_conditions
+class known_conditions
{
+public:
/* A mask of TESTED_ values for each position, indexed by the position's
id field. */
auto_vec <unsigned char> position_tests;
}
/* Statistics about a matching routine. */
-struct stats
+class stats
{
+public:
stats ();
/* The total number of decisions in the routine, excluding trivial
struct merge_pattern_info;
/* Represents a transition from one pattern to another. */
-struct merge_pattern_transition
+class merge_pattern_transition
{
+public:
merge_pattern_transition (merge_pattern_info *);
/* The target pattern. */
/* Represents a pattern that can might match several states. The pattern
may replace parts of the test with a parameter value. It may also
replace transition labels with parameters. */
-struct merge_pattern_info
+class merge_pattern_info
{
+public:
merge_pattern_info (unsigned int);
/* If PARAM_TEST_P, the state's singleton test should be generalized
/* Describes one way of matching a particular state to a particular
pattern. */
-struct merge_state_result
+class merge_state_result
{
+public:
merge_state_result (merge_pattern_info *, position *, merge_state_result *);
/* A pattern that matches the state. */
/* Information about a state, used while trying to match it against
a pattern. */
-struct merge_state_info
+class merge_state_info
{
+public:
merge_state_info (state *);
/* The state itself. */
/* Pairs a pattern that needs to be matched with the rtx position at
which the pattern should occur. */
-struct pattern_pos {
+class pattern_pos {
+public:
pattern_pos () {}
pattern_pos (rtx, position *);
/* Information used while writing out code. */
-struct output_state
+class output_state
{
+public:
/* The type of routine that we're generating. */
routine_type type;
define_cond_exec and define_subst patterns, then return
them one at a time. */
-struct queue_elem
+class queue_elem
{
+public:
rtx data;
file_location loc;
struct queue_elem *next;
extern struct obstack *rtl_obstack;
/* Information about an .md define_* rtx. */
-struct md_rtx_info {
+class md_rtx_info {
+public:
/* The rtx itself. */
rtx def;
}
/* GGC memory usage. */
-struct ggc_usage: public mem_usage
+class ggc_usage: public mem_usage
{
+public:
/* Default constructor. */
ggc_usage (): m_freed (0), m_collected (0), m_overhead (0) {}
/* Constructor. */
/* Verify that destructors get run when instances are collected. */
-struct GTY(()) test_struct_with_dtor
+class GTY(()) test_struct_with_dtor
{
+public:
/* This struct has a destructor; it *ought* to be called
by the ggc machinery when instances are collected. */
~test_struct_with_dtor () { dtor_call_count++; }
/* Loop candidate for interchange. */
-struct loop_cand
+class loop_cand
{
+public:
loop_cand (struct loop *, struct loop *);
~loop_cand ();
/* Information about an address calculation, and the range of constant
offsets applied to it. */
-struct address_info
+class address_info
{
+public:
static const unsigned int MAX_TERMS = 8;
/* One statement that calculates the address. If multiple statements
};
/* Information about the versioning we'd like to apply to a loop. */
-struct loop_info
+class loop_info
{
+public:
bool worth_versioning_p () const;
/* True if we've decided not to version this loop. The remaining
/* Represents the condition under which an operation should happen,
and the value to use otherwise. The condition applies elementwise
(as for VEC_COND_EXPR) if the values are vectors. */
-struct gimple_match_cond
+class gimple_match_cond
{
+public:
enum uncond { UNCOND };
/* Build an unconditional op. */
/* Represents an operation to be simplified, or the result of the
simplification. */
-struct gimple_match_op
+class gimple_match_op
{
+public:
gimple_match_op ();
gimple_match_op (const gimple_match_cond &, code_helper, tree, unsigned int);
gimple_match_op (const gimple_match_cond &,
namespace {
/* Information about a group of uses of an SSA name. */
-struct usage_info
+class usage_info
{
+public:
usage_info () : flag_word (0) {}
usage_info &operator &= (const usage_info &);
usage_info operator & (const usage_info &) const;
/* Description of the result of conversion either of a single directive
or the whole format string. */
-struct fmtresult
+class fmtresult
{
+public:
/* Construct a FMTRESULT object with all counters initialized
to MIN. KNOWNRANGE is set when MIN is valid. */
fmtresult (unsigned HOST_WIDE_INT min = HOST_WIDE_INT_MAX)
and the other fields also reflect the memory load, or an SSA name, then
VAL represents the SSA name and all the other fields are zero, */
-struct store_operand_info
+class store_operand_info
{
+public:
tree val;
tree base_addr;
poly_uint64 bitsize;
to memory. These are created in the first phase and coalesced into
merged_store_group objects in the second phase. */
-struct store_immediate_info
+class store_immediate_info
{
+public:
unsigned HOST_WIDE_INT bitsize;
unsigned HOST_WIDE_INT bitpos;
unsigned HOST_WIDE_INT bitregion_start;
These are produced by the second phase (coalescing) and consumed in the
third phase that outputs the widened stores. */
-struct merged_store_group
+class merged_store_group
{
+public:
unsigned HOST_WIDE_INT start;
unsigned HOST_WIDE_INT width;
unsigned HOST_WIDE_INT bitregion_start;
/* Structure describing the store chain. */
-struct imm_store_chain_info
+class imm_store_chain_info
{
+public:
/* Doubly-linked list that imposes an order on chain processing.
PNXP (prev's next pointer) points to the head of a list, or to
the next field in the previous chain in the list.
/* Used to decribe a store resulting from splitting a wide store in smaller
regularly-sized stores in split_group. */
-struct split_store
+class split_store
{
+public:
unsigned HOST_WIDE_INT bytepos;
unsigned HOST_WIDE_INT size;
unsigned HOST_WIDE_INT align;
CAND_PHI
};
-struct slsr_cand_d
+class slsr_cand_d
{
+public:
/* The candidate statement S1. */
gimple *cand_stmt;
of the cost of initializers. The absolute value of the increment
is stored in the incr_info. */
-struct incr_info_d
+class incr_info_d
{
+public:
/* The increment that relates a candidate to its basis. */
widest_int incr;
};
// Type of an alloca call with its corresponding limit, if applicable.
-struct alloca_type_and_limit {
+class alloca_type_and_limit {
+public:
enum alloca_type type;
// For ALLOCA_BOUND_MAYBE_LARGE and ALLOCA_BOUND_DEFINITELY_LARGE
// types, this field indicates the assumed limit if known or
/* Description of a memory reference by a built-in function. This
is similar to ao_ref but made especially suitable for -Wrestrict
and not for optimization. */
-struct builtin_memref
+class builtin_memref
{
+public:
/* The original pointer argument to the built-in function. */
tree ptr;
/* The referenced subobject or NULL if not available, and the base
/* A container for the data we pass around when generating information
at the end of the compilation. */
-struct godump_container
+class godump_container
{
+public:
/* DECLs that we have already seen. */
hash_set<tree> decls_seen;
ASSERT_EQ (1, string_map.elements ());
}
-typedef struct hash_map_test_val_t
+typedef class hash_map_test_val_t
{
+public:
static int ndefault;
static int ncopy;
static int nassign;
/* Can't use std::pair here, because GCC before 4.3 don't handle
std::pair where template parameters are references well.
See PR86739. */
- struct reference_pair {
+ class reference_pair {
+ public:
const Key &first;
Value &second;
ASSERT_EQ (2, t.elements ());
}
-typedef struct hash_set_test_value_t
+typedef class hash_set_test_value_t
{
+public:
static int ndefault;
static int ncopy;
static int nassign;
/* List of sbr instructions. */
static vec <hsa_insn_sbr *> *switch_instructions;
-struct function_linkage_pair
+class function_linkage_pair
{
+public:
function_linkage_pair (tree decl, unsigned int off)
: function_decl (decl), offset (off) {}
/* Class representing an input argument, output argument (result) or a
variable, that will eventually end up being a symbol directive. */
-struct hsa_symbol
+class hsa_symbol
{
+public:
/* Constructor. */
hsa_symbol (BrigType16_t type, BrigSegment8_t segment,
BrigLinkage8_t linkage, bool global_scope_p = false,
HSA_FUNCTION
};
-struct hsa_function_summary
+class hsa_function_summary
{
+public:
/* Default constructor. */
hsa_function_summary ();
/* Structure hold connection between PHI nodes and immediate
values hold by there nodes. */
-struct phi_definition
+class phi_definition
{
+public:
phi_definition (unsigned phi_i, unsigned label_i, tree imm):
phi_index (phi_i), label_index (label_i), phi_value (imm)
{}
/* This is a cache used by get_next_line to store the content of a
file to be searched for file lines. */
-struct fcache
+class fcache
{
+public:
/* These are information used to store a line boundary. */
- struct line_info
+ class line_info
{
+ public:
/* The line number. It starts from 1. */
size_t line_num;
The following struct describes a particular case within our test
matrix. */
-struct line_table_case
+class line_table_case
{
+public:
line_table_case (int default_range_bits, int base_location)
: m_default_range_bits (default_range_bits),
m_base_location (base_location)
/* A struct for writing lexer tests. */
-struct lexer_test
+class lexer_test
{
+public:
lexer_test (const line_table_case &case_, const char *content,
lexer_test_options *options);
~lexer_test ();
void diagnostics_file_cache_forcibly_evict_file (const char *file_path);
-struct GTY(()) string_concat
+class GTY(()) string_concat
{
+public:
string_concat (int num, location_t *locs);
int m_num;
/* Describes a particular source for an IPA-CP value. */
template <typename valtype>
-class ipcp_value_source
+struct ipcp_value_source
{
public:
/* Aggregate offset of the source, negative if the source is scalar value of
contains_variable flag should be disregarded. */
template <typename valtype>
-class ipcp_lattice
+struct ipcp_lattice
{
public:
/* The list of known values and types in this lattice. Note that values are
/* Lattice of tree values with an offset to describe a part of an
aggregate. */
-class ipcp_agg_lattice : public ipcp_lattice<tree>
+struct ipcp_agg_lattice : public ipcp_lattice<tree>
{
public:
/* Offset that is being described by this lattice. */
/* Edge clone summary. */
-struct edge_clone_summary
+class edge_clone_summary
{
+public:
/* Default constructor. */
edge_clone_summary (): prev_clone (NULL), next_clone (NULL) {}
polymorphic calls in the program, so we memoize all the previous
queries and avoid duplicated work. */
-struct polymorphic_call_target_d
+class polymorphic_call_target_d
{
+public:
HOST_WIDE_INT otr_token;
ipa_polymorphic_call_context context;
odr_type type;
/* Information about type and decl warnings. */
-struct final_warning_record
+class final_warning_record
{
+public:
/* If needed grow type_warnings vector and initialize new decl_warn_count
to have dyn_count set to profile_count::zero (). */
void grow_type_warnings (unsigned newlen);
/* Representation of function body size and time depending on the call
context. We keep simple array of record, every containing of predicate
and time/size to account. */
-struct GTY(()) size_time_entry
+class GTY(()) size_time_entry
{
+public:
/* Predicate for code to be executed. */
predicate exec_predicate;
/* Predicate for value to be constant and optimized out in a specialized copy.
};
/* Function inlining information. */
-struct GTY(()) ipa_fn_summary
+class GTY(()) ipa_fn_summary
{
+public:
/* Keep all field empty so summary dumping works during its computation.
This is useful for debugging. */
ipa_fn_summary ()
*ipa_fn_summaries;
/* Information kept about callgraph edges. */
-struct ipa_call_summary
+class ipa_call_summary
{
+public:
/* Keep all field empty so summary dumping works during its computation.
This is useful for debugging. */
ipa_call_summary ()
/* Data we cache about callgraph edges during inlining to avoid expensive
re-computations during the greedy algorithm. */
-struct edge_growth_cache_entry
+class edge_growth_cache_entry
{
+public:
sreal time, nonspec_time;
int size;
ipa_hints hints;
typedef struct ipa_agg_jump_function *ipa_agg_jump_function_p;
/* Information about zero/non-zero bits. */
-struct GTY(()) ipa_bits
+class GTY(()) ipa_bits
{
+public:
/* The propagated value. */
widest_int value;
/* Mask corresponding to the value.
/* Info about value ranges. */
-struct GTY(()) ipa_vr
+class GTY(()) ipa_vr
{
+public:
/* The data fields below are valid only if known is true. */
bool known;
enum value_range_kind type;
and some other information for interprocedural passes that operate on
parameters (such as ipa-cp). */
-struct GTY((for_user)) ipa_node_params
+class GTY((for_user)) ipa_node_params
{
+public:
/* Default constructor. */
ipa_node_params ();
/* Per basic block info. */
-struct split_bb_info
+class split_bb_info
{
+public:
unsigned int size;
sreal time;
};
/* Description of split point. */
-struct split_point
+class split_point
{
+public:
/* Size of the partitions. */
sreal header_time, split_time;
unsigned int header_size, split_size;
/* Stack entry for recursive DFS walk in find_split_point. */
-struct stack_entry
+class stack_entry
{
+public:
/* Basic block we are examining. */
basic_block bb;
/* The following structure describes a stack slot used for spilled
pseudo-registers. */
-struct ira_spilled_reg_stack_slot
+class ira_spilled_reg_stack_slot
{
+public:
/* pseudo-registers assigned to the stack slot. */
bitmap_head spilled_regs;
/* RTL representation of the stack slot. */
minmax_set_iter_cond (&(ITER), &(N)); \
minmax_set_iter_next (&(ITER)))
\f
-struct target_ira_int {
+class target_ira_int {
+public:
~target_ira_int ();
void free_ira_costs ();
/* The data stored for the loop. */
-struct loop_data
+class loop_data
{
+public:
struct loop *outermost_exit; /* The outermost exit of the loop. */
bool has_call; /* True if the loop contains a call. */
/* Maximal register pressure inside loop for given register class
/* Information about a biv. */
-struct biv_entry
+class biv_entry
{
+public:
unsigned regno; /* The register of the biv. */
struct rtx_iv iv; /* Value of the biv. */
};
/* This structure is used to record information about hard register
eliminations. */
-struct lra_elim_table
+class lra_elim_table
{
+public:
/* Hard register number to be eliminated. */
int from;
/* Hard register number used as replacement. */
};
/* Common info about a register (pseudo or hard register). */
-struct lra_reg
+class lra_reg
{
+public:
/* Bitmap of UIDs of insns (including debug insns) referring the
reg. */
bitmap_head insn_bitmap;
/* LRA internal info about an insn (LRA internal insn
representation). */
-struct lra_insn_recog_data
+class lra_insn_recog_data
{
+public:
/* The insn code. */
int icode;
/* The alternative should be used for the insn, LRA_UNKNOWN_ALT if
/* Structure describing local BB data used for pseudo
live-analysis. */
-struct bb_data_pseudos
+class bb_data_pseudos
{
+public:
/* Basic block about which the below data are. */
basic_block bb;
bitmap_head killed_pseudos; /* pseudos killed in the BB. */
/* Data about basic blocks used for the rematerialization
sub-pass. */
-struct remat_bb_data
+class remat_bb_data
{
+public:
/* Basic block about which the below data are. */
basic_block bb;
/* Registers changed in the basic block: */
/* The structure describes a register or a stack slot which can be
used for several spilled pseudos. */
-struct slot
+class slot
{
+public:
/* First pseudo with given stack slot. */
int regno;
/* Hard reg into which the slot pseudos are spilled. The value is
/* Data and descriptors used when reading from an LTO file. */
-struct data_in
+class data_in
{
+public:
/* The global decls and types. */
struct lto_file_decl_data *file_data;
+2019-07-09 Martin Sebor <msebor@redhat.com>
+
+ PR c++/61339
+ * lto-dump.c: Change class-key from class to struct and vice versa
+ to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
+
2019-07-04 Martin Liska <mliska@suse.cz>
PR lto/91078
/* Stores details of symbols for dumping symbol list. */
-struct symbol_entry
+class symbol_entry
{
+public:
symtab_node *node;
symbol_entry (symtab_node *node_): node (node_)
{}
/* Stores variable specific details of symbols for dumping symbol list. */
-struct variable_entry: public symbol_entry
+class variable_entry: public symbol_entry
{
+public:
variable_entry (varpool_node *node_): symbol_entry (node_)
{}
/* Stores function specific details of symbols for dumping symbol list. */
-struct function_entry: public symbol_entry
+class function_entry: public symbol_entry
{
+public:
function_entry (cgraph_node *node_): symbol_entry (node_)
{}
#define LOCATION_LINE_WIDTH 48
/* Memory allocation location. */
-struct mem_location
+class mem_location
{
+public:
/* Default constructor. */
inline
mem_location () {}
};
/* Memory usage register to a memory location. */
-struct mem_usage
+class mem_usage
{
+public:
/* Default constructor. */
mem_usage (): m_allocated (0), m_times (0), m_peak (0), m_instances (1) {}
/* Memory usage pair that connectes memory usage and number
of allocated bytes. */
template <class T>
-struct mem_usage_pair
+class mem_usage_pair
{
+public:
mem_usage_pair (T *usage_, size_t allocated_): usage (usage_),
allocated (allocated_) {}
/* Structure describing the basic properties of the loop we ara analyzing
whether it can be gridified and when it is gridified. */
-struct grid_prop
+class grid_prop
{
+public:
/* True when we are doing tiling gridification, i.e. when there is a distinct
distribute loop over groups and a loop construct over work-items. False
when distribute and parallel for loops form a combined construct. */
/* This structure is part of the interface between lower_rec_simd_input_clauses
and lower_rec_input_clauses. */
-struct omplow_simd_context {
+class omplow_simd_context {
+public:
omplow_simd_context () { memset (this, 0, sizeof (*this)); }
tree idx;
tree lane;
enum extraction_pattern { EP_insv, EP_extv, EP_extzv };
/* Describes an instruction that inserts or extracts a bitfield. */
-struct extraction_insn
+class extraction_insn
{
+public:
/* The code of the instruction. */
enum insn_code icode;
};
/* Information about an operand for instruction expansion. */
-struct expand_operand {
+class expand_operand {
+public:
/* The type of operand. */
ENUM_BITFIELD (expand_operand_type) type : 8;
/* Data structure used to print list of valid option values. */
-struct option_help_tuple
+class option_help_tuple
{
+public:
option_help_tuple (int code, vec<const char *> values):
m_code (code), m_values (values)
{}
/* A struct for describing a run of chars within a string. */
-struct string_fragment
+class string_fragment
{
+public:
string_fragment (const char *start, size_t len)
: m_start (start), m_len (len) {}
/* A base POD class for polynomial integers. The polynomial has N
coefficients of type C. */
template<unsigned int N, typename C>
-class poly_int_pod
+struct poly_int_pod
{
public:
template<typename Ca>
/* This is used to carry information about basic blocks. It is
attached to the AUX field of the standard CFG block. */
-struct block_info
+class block_info
{
+public:
/* Estimated frequency of execution of basic_block. */
sreal frequency;
};
/* Similar information for edges. */
-struct edge_prob_info
+class edge_prob_info
{
+public:
/* In case edge is a loopback edge, the probability edge will be reached
in case header is. Estimated number of iterations of the loop can be
then computed as 1 / (1 - back_edge_prob). */
/* The output buffer datatype. This is best seen as an abstract datatype
whose fields should not be accessed directly by clients. */
-struct output_buffer
+class output_buffer
{
+public:
output_buffer ();
~output_buffer ();
/* The data structure that contains the bare minimum required to do
proper pretty-printing. Clients may derived from this structure
and add additional fields they need. */
-struct pretty_printer
+class pretty_printer
{
+public:
/* Default construct a pretty printer with specified
maximum line length cut off limit. */
explicit pretty_printer (int = 0);
class sreal;
-class GTY(()) profile_count
+struct GTY(()) profile_count
{
public:
/* Use 62bit to hold basic block counters. Should be at least
#include "obstack.h"
/* Records a position in the file. */
-struct file_location {
+class file_location {
+public:
file_location () {}
file_location (const char *, int, int);
at LOC, which will be turned into an actual CFG edge once
the "insn-chain" is fully parsed. */
-struct deferred_edge
+class deferred_edge
{
+public:
deferred_edge (file_location loc, int src_bb_idx, int dest_bb_idx, int flags)
: m_loc (loc), m_src_bb_idx (src_bb_idx), m_dest_bb_idx (dest_bb_idx),
m_flags (flags)
};
/* Vectors used by combine_reaching_defs and its helpers. */
-struct ext_state
+class ext_state
{
+public:
/* In order to avoid constant alloc/free, we keep these
4 vectors live through the entire find_and_remove_re and just
truncate them each time. */
/* Used to cache the results of simplifiable_subregs. SHAPE is the input
parameter and SIMPLIFIABLE_REGS is the result. */
-struct simplifiable_subreg
+class simplifiable_subreg
{
+public:
simplifiable_subreg (const subreg_shape &);
subreg_shape shape;
A pointer to such a structure is stored in each basic block's aux field
during regrename_analyze, except for blocks we know can't be optimized
(such as entry and exit blocks). */
-struct bb_rename_info
+class bb_rename_info
{
+public:
/* The basic block corresponding to this structure. */
basic_block bb;
/* Copies of the global information. */
/* We keep linked lists of DU_HEAD structures, each of which describes
a chain of occurrences of a reg. */
-struct du_head
+class du_head
{
+public:
/* The next chain. */
struct du_head *next_chain;
/* The first and last elements of this chain. */
/* This structure describes instructions which are relevant for reload.
Apart from all regular insns, this also includes CODE_LABELs, since they
must be examined for register elimination. */
-struct insn_chain
+class insn_chain
{
+public:
/* Links to the neighbor instructions. */
struct insn_chain *next, *prev;
typedef typename T::rtunion_type rtunion_type;
public:
- struct array_type
+ class array_type
{
+ public:
array_type ();
~array_type ();
value_type stack[LOCAL_ELEMS];
/* Structure used to describe the attributes of a MEM. These are hashed
so MEMs that the same attributes share a data structure. This means
they cannot be modified in place. */
-struct GTY(()) mem_attrs
+class GTY(()) mem_attrs
{
+public:
mem_attrs ();
/* The expression that the MEM accesses, or null if not known.
object in the low part of a 4-byte register, the OFFSET field
will be -3 rather than 0. */
-struct GTY((for_user)) reg_attrs {
+class GTY((for_user)) reg_attrs {
+public:
tree decl; /* decl corresponding to REG. */
poly_int64 offset; /* Offset from start of DECL. */
};
/* A node for constructing singly-linked lists of rtx. */
-class GTY(()) rtx_expr_list : public rtx_def
+struct GTY(()) rtx_expr_list : public rtx_def
{
+private:
/* No extra fields, but adds invariant: (GET_CODE (X) == EXPR_LIST). */
public:
return rt->code == EXPR_LIST;
}
-class GTY(()) rtx_insn_list : public rtx_def
+struct GTY(()) rtx_insn_list : public rtx_def
{
+private:
/* No extra fields, but adds invariant: (GET_CODE (X) == INSN_LIST).
This is an instance of:
/* A node with invariant GET_CODE (X) == SEQUENCE i.e. a vector of rtx,
typically (but not always) of rtx_insn *, used in the late passes. */
-class GTY(()) rtx_sequence : public rtx_def
+struct GTY(()) rtx_sequence : public rtx_def
{
+private:
/* No extra fields, but adds invariant: (GET_CODE (X) == SEQUENCE). */
public:
return rt->code == SEQUENCE;
}
-class GTY(()) rtx_insn : public rtx_def
+struct GTY(()) rtx_insn : public rtx_def
{
public:
/* No extra fields, but adds the invariant:
/* Subclasses of rtx_insn. */
-class GTY(()) rtx_debug_insn : public rtx_insn
+struct GTY(()) rtx_debug_insn : public rtx_insn
{
/* No extra fields, but adds the invariant:
DEBUG_INSN_P (X) aka (GET_CODE (X) == DEBUG_INSN)
from rtl.def. */
};
-class GTY(()) rtx_nonjump_insn : public rtx_insn
+struct GTY(()) rtx_nonjump_insn : public rtx_insn
{
/* No extra fields, but adds the invariant:
NONJUMP_INSN_P (X) aka (GET_CODE (X) == INSN)
from rtl.def. */
};
-class GTY(()) rtx_jump_insn : public rtx_insn
+struct GTY(()) rtx_jump_insn : public rtx_insn
{
public:
/* No extra fields, but adds the invariant:
inline void set_jump_target (rtx_code_label *);
};
-class GTY(()) rtx_call_insn : public rtx_insn
+struct GTY(()) rtx_call_insn : public rtx_insn
{
/* No extra fields, but adds the invariant:
CALL_P (X) aka (GET_CODE (X) == CALL_INSN)
from rtl.def. */
};
-class GTY(()) rtx_jump_table_data : public rtx_insn
+struct GTY(()) rtx_jump_table_data : public rtx_insn
{
/* No extra fields, but adds the invariant:
JUMP_TABLE_DATA_P (X) aka (GET_CODE (INSN) == JUMP_TABLE_DATA)
DEF_RTL_EXPR(JUMP_TABLE_DATA, "jump_table_data", "uuBe0000", RTX_INSN)
from rtl.def. */
-public:
-
/* This can be either:
(a) a table of absolute jumps, in which case PATTERN (this) is an
inline scalar_int_mode get_data_mode () const;
};
-class GTY(()) rtx_barrier : public rtx_insn
+struct GTY(()) rtx_barrier : public rtx_insn
{
/* No extra fields, but adds the invariant:
BARRIER_P (X) aka (GET_CODE (X) == BARRIER)
from rtl.def. */
};
-class GTY(()) rtx_code_label : public rtx_insn
+struct GTY(()) rtx_code_label : public rtx_insn
{
/* No extra fields, but adds the invariant:
LABEL_P (X) aka (GET_CODE (X) == CODE_LABEL)
from rtl.def. */
};
-class GTY(()) rtx_note : public rtx_insn
+struct GTY(()) rtx_note : public rtx_insn
{
/* No extra fields, but adds the invariant:
NOTE_P(X) aka (GET_CODE (X) == NOTE)
inner_mode == the mode of the SUBREG_REG
offset == the SUBREG_BYTE
outer_mode == the mode of the SUBREG itself. */
-struct subreg_shape {
+class subreg_shape {
+public:
subreg_shape (machine_mode, poly_uint16, machine_mode);
bool operator == (const subreg_shape &) const;
bool operator != (const subreg_shape &) const;
/* This is used to carry various hash maps and variables used
in sanopt_optimize_walker. */
-struct sanopt_ctx
+class sanopt_ctx
{
+public:
/* This map maps a pointer (the first argument of UBSAN_NULL) to
a vector of UBSAN_NULL call statements that check this pointer. */
hash_map<tree, auto_vec<gimple *> > null_check_map;
};
/* Describe state of dependencies used during sched_analyze phase. */
-struct deps_desc
+class deps_desc
{
+public:
/* The *_insns and *_mems are paired lists. Each pending memory operation
will have a pointer to the MEM rtx on one list and a pointer to the
containing insn on the other list in the same place in the list. */
/* Indexed by INSN_LUID, the collection of all data associated with
a single instruction that is in the stream. */
-struct _sel_insn_data
+class _sel_insn_data
{
+public:
/* The expression that contains vinsn for this insn and some
flow-sensitive data like priority. */
expr_def expr;
/* A struct describing the source-location of a selftest, to make it
easier to track down failing tests. */
-struct location
+class location
{
+public:
location (const char *file, int line, const char *function)
: m_file (file), m_line (line), m_function (function) {}
/* A Single Entry, Single Exit region is a part of the CFG delimited
by two edges. */
-struct sese_l
+class sese_l
{
+public:
sese_l (edge e, edge x) : entry (e), exit (x) {}
operator bool () const { return entry && exit; }
}
/* A helper structure for bookkeeping information about a scop in graphite. */
-typedef struct sese_info_t
+typedef class sese_info_t
{
+public:
/* The SESE region. */
sese_l region;
*/
-struct simple_case_node
+class simple_case_node
{
+public:
simple_case_node (tree low, tree high, tree code_label):
m_low (low), m_high (high), m_code_label (code_label)
{}
extern struct target_lower_subreg *this_target_lower_subreg;
#endif
-struct GTY(()) target_globals {
+class GTY(()) target_globals {
+public:
~target_globals ();
struct target_flag_state *GTY((skip)) flag_state;
/* Element of the cache that maps ssa name NAME to its expanded form
as an affine expression EXPANSION. */
-struct name_expansion
+class name_expansion
{
+public:
aff_tree expansion;
/* True if the expansion for the name is just being generated. */
/* Element of an affine combination. */
-struct aff_comb_elt
+class aff_comb_elt
{
+public:
/* The value of the element. */
tree val;
widest_int coef;
};
-struct aff_tree
+class aff_tree
{
+public:
/* Type of the result of the combination. */
tree type;
including the data ref itself and the segment length for aliasing
checks. This is used to merge alias checks. */
-struct dr_with_seg_len
+class dr_with_seg_len
{
+public:
dr_with_seg_len (data_reference_p d, tree len, unsigned HOST_WIDE_INT size,
unsigned int a)
: dr (d), seg_len (len), access_size (size), align (a) {}
/* This struct contains two dr_with_seg_len objects with aliasing data
refs. Two comparisons are generated from them. */
-struct dr_with_seg_len_pair_t
+class dr_with_seg_len_pair_t
{
+public:
dr_with_seg_len_pair_t (const dr_with_seg_len& d1,
const dr_with_seg_len& d2)
: first (d1), second (d2) {}
rarely more than 6, and in the bootstrap of gcc, the maximum number
of nodes encountered was 12. */
-struct elim_graph
+class elim_graph
{
+public:
elim_graph (var_map map);
/* Size of the elimination vectors. */
/* Data references (or phi nodes that carry data reference values across
loop iterations). */
-typedef struct dref_d
+typedef class dref_d
{
+public:
/* The reference itself. */
struct data_reference *ref;
analyzing a scalar evolution, instantiating a CHREC or
resolving mixers. */
-struct instantiate_cache_type
+class instantiate_cache_type
{
+public:
htab_t map;
vec<scev_info_str> entries;
/* Simplified and cached information about a memory reference tree.
Used by the alias-oracle internally and externally in alternate
interfaces. */
-struct ao_ref
+class ao_ref
{
+public:
/* The original full memory reference tree or NULL_TREE if that is
not available. */
tree ref;
VARYING
} ccp_lattice_t;
-struct ccp_prop_value_t {
+class ccp_prop_value_t {
+public:
/* Lattice value. */
ccp_lattice_t lattice_val;
marked as being live. This delays clearing of these bitmaps until
they are actually needed again. */
-struct live_track
+class live_track
{
+public:
bitmap_obstack obstack; /* A place to allocate our bitmaps. */
bitmap_head live_base_var; /* Indicates if a basevar is live. */
bitmap_head *live_base_partitions; /* Live partitions for each basevar. */
/* Description of a memory reference. */
-struct im_mem_ref
+class im_mem_ref
{
+public:
unsigned id : 30; /* ID assigned to the memory reference
(its index in memory_accesses.refs_list) */
unsigned ref_canonical : 1; /* Whether mem.ref was canonicalized. */
/* Rewrites location LOC by TMP_VAR. */
-struct rewrite_mem_ref_loc
+class rewrite_mem_ref_loc
{
+public:
rewrite_mem_ref_loc (tree tmp_var_) : tmp_var (tmp_var_) {}
bool operator () (mem_ref_loc *loc);
tree tmp_var;
/* Stores the first reference location in LOCP. */
-struct first_mem_ref_loc_1
+class first_mem_ref_loc_1
{
+public:
first_mem_ref_loc_1 (mem_ref_loc **locp_) : locp (locp_) {}
bool operator () (mem_ref_loc *loc);
mem_ref_loc **locp;
/* When REF is set on the location, set flag indicating the store. */
-struct sm_set_flag_if_changed
+class sm_set_flag_if_changed
{
+public:
sm_set_flag_if_changed (tree flag_, hash_set <basic_block> *bbs_)
: flag (flag_), bbs (bbs_) {}
bool operator () (mem_ref_loc *loc);
}
}
-struct ref_always_accessed
+class ref_always_accessed
{
+public:
ref_always_accessed (struct loop *loop_, bool stored_p_)
: loop (loop_), stored_p (stored_p_) {}
bool operator () (mem_ref_loc *loc);
};
/* Cost of a computation. */
-struct comp_cost
+class comp_cost
{
+public:
comp_cost (): cost (0), complexity (0), scratch (0)
{}
struct iv_inv_expr_ent;
/* The candidate - cost pair. */
-struct cost_pair
+class cost_pair
{
+public:
struct iv_cand *cand; /* The candidate. */
comp_cost cost; /* The cost. */
enum tree_code comp; /* For iv elimination, the comparison. */
};
/* Hashtable entry for common candidate derived from iv uses. */
-struct iv_common_cand
+class iv_common_cand
{
+public:
tree base;
tree step;
/* IV uses from which this common candidate is derived. */
/* An assignment of iv candidates to uses. */
-struct iv_ca
+class iv_ca
{
+public:
/* The number of uses covered by the assignment. */
unsigned upto;
the structure can be evaluated at the end of the loop's preheader
(and due to ssa form, also anywhere inside the body of the loop). */
-struct tree_niter_desc
+class tree_niter_desc
{
+public:
tree assumptions; /* The boolean expression. If this expression evaluates
to false, then the other fields in this structure
should not be used; there is no guarantee that they
/* An unordered bitmap set. One bitmap tracks values, the other,
expressions. */
-typedef struct bitmap_set
+typedef class bitmap_set
{
+public:
bitmap_head expressions;
bitmap_head values;
} *bitmap_set_t;
/* Strongly Connected Component visitation info. */
-struct scc_info
+class scc_info
{
+public:
scc_info (size_t size);
~scc_info ();
|-jump_table_cluster (JUMP_TABLE)
`-bit_test_cluster (BIT_TEST). */
-struct cluster
+class cluster
{
+public:
/* Constructor. */
cluster (tree case_label_expr, basic_block case_bb, profile_probability prob,
profile_probability subtree_prob);
/* Subclass of cluster representing a simple contiguous range
from [low..high]. */
-struct simple_cluster: public cluster
+class simple_cluster: public cluster
{
+public:
/* Constructor. */
simple_cluster (tree low, tree high, tree case_label_expr,
basic_block case_bb, profile_probability prob);
/* Abstract subclass of jump table and bit test cluster,
handling a collection of simple_cluster instances. */
-struct group_cluster: public cluster
+class group_cluster: public cluster
{
+public:
/* Constructor. */
group_cluster (vec<cluster *> &clusters, unsigned start, unsigned end);
The "emit" vfunc gernerates a nested switch statement which
is later lowered to a jump table. */
-struct jump_table_cluster: public group_cluster
+class jump_table_cluster: public group_cluster
{
+public:
/* Constructor. */
jump_table_cluster (vec<cluster *> &clusters, unsigned start, unsigned end)
: group_cluster (clusters, start, end)
http://gcc.gnu.org/ml/gcc-patches/2003-01/msg01950.html
*/
-struct bit_test_cluster: public group_cluster
+class bit_test_cluster: public group_cluster
{
+public:
/* Constructor. */
bit_test_cluster (vec<cluster *> &clusters, unsigned start, unsigned end,
bool handles_entire_switch)
/* Helper struct to find minimal clusters. */
-struct min_cluster_item
+class min_cluster_item
{
+public:
/* Constructor. */
min_cluster_item (unsigned count, unsigned start, unsigned non_jt_cases):
m_count (count), m_start (start), m_non_jt_cases (non_jt_cases)
/* Helper struct to represent switch decision tree. */
-struct case_tree_node
+class case_tree_node
{
+public:
/* Empty Constructor. */
case_tree_node ();
is used to quickly identify all cases in this set without
looking at label_to_block for every case label. */
-struct case_bit_test
+class case_bit_test
{
+public:
wide_int mask;
basic_block target_bb;
tree label;
static int cmp (const void *p1, const void *p2);
};
-struct switch_decision_tree
+class switch_decision_tree
{
+public:
/* Constructor. */
switch_decision_tree (gswitch *swtch): m_switch (swtch), m_phi_mapping (),
m_case_bbs (), m_case_node_pool ("struct case_node pool"),
http://gcc.gnu.org/ml/gcc-patches/2008-07/msg00011.html */
/* The main structure of the pass. */
-struct switch_conversion
+class switch_conversion
{
+public:
/* Constructor. */
switch_conversion ();
/* Holds information about an input operand after some sign changes
and type promotions have been peeled away. */
-struct vect_unpromoted_value {
+class vect_unpromoted_value {
+public:
vect_unpromoted_value ();
void set_op (tree, vect_def_type, stmt_vec_info = NULL);
\f
/* For mapping simduid to vectorization factor. */
-struct simduid_to_vf : free_ptr_hash<simduid_to_vf>
+class simduid_to_vf : public free_ptr_hash<simduid_to_vf>
{
+public:
unsigned int simduid;
poly_uint64 vf;
/* SLP instance is a sequence of stmts in a loop that can be packed into
SIMD stmts. */
-typedef struct _slp_instance {
+typedef class _slp_instance {
+public:
/* The root of SLP tree. */
slp_tree root;
/* Records that vectorization is only possible if abs (EXPR) >= MIN_VALUE.
UNSIGNED_P is true if we can assume that abs (EXPR) == EXPR. */
-struct vec_lower_bound {
+class vec_lower_bound {
+public:
vec_lower_bound () {}
vec_lower_bound (tree e, bool u, poly_uint64 m)
: expr (e), unsigned_p (u), min_value (m) {}
/* Vectorizer state shared between different analyses like vector sizes
of the same CFG region. */
-struct vec_info_shared {
+class vec_info_shared {
+public:
vec_info_shared();
~vec_info_shared();
};
/* Vectorizer state common between loop and basic-block vectorization. */
-struct vec_info {
+class vec_info {
+public:
enum vec_kind { bb, loop };
vec_info (vec_kind, void *, vec_info_shared *);
/*-----------------------------------------------------------------*/
/* Info on vectorized loops. */
/*-----------------------------------------------------------------*/
-typedef struct _loop_vec_info : public vec_info {
+typedef class _loop_vec_info : public vec_info {
+public:
_loop_vec_info (struct loop *, vec_info_shared *);
~_loop_vec_info ();
return (loop_vec_info) loop->aux;
}
-typedef struct _bb_vec_info : public vec_info
+typedef class _bb_vec_info : public vec_info
{
+public:
_bb_vec_info (gimple_stmt_iterator, gimple_stmt_iterator, vec_info_shared *);
~_bb_vec_info ();
VMAT_GATHER_SCATTER
};
-struct dr_vec_info {
+class dr_vec_info {
+public:
/* The data reference itself. */
data_reference *dr;
/* The statement that contains the data reference. */
typedef struct data_reference *dr_p;
-struct _stmt_vec_info {
+class _stmt_vec_info {
+public:
enum stmt_vec_info_type type;
/* Data used when collecting DECLs and TYPEs for language data removal. */
-struct free_lang_data_d
+class free_lang_data_d
{
+public:
free_lang_data_d () : decls (100), types (100) {}
/* Worklist to avoid excessive recursion. */
/* Pointer type used to declare builtins before we have seen its real
declaration. */
-struct builtin_structptr_type
+class builtin_structptr_type
{
+public:
tree& node;
tree& base;
const char *str;
where it is not. */
-struct op_location_t
+class op_location_t
{
+public:
location_t m_operator_loc;
location_t m_combined_loc;
/* A class for counting ctor and dtor invocations. */
-struct stats
+class stats
{
+public:
stats () : ctor_count (0), dtor_count (0) {}
int ctor_count;
/* A struct for testing unique_ptr<T[]>. */
-struct has_default_ctor
+class has_default_ctor
{
+public:
has_default_ctor () : m_field (42) {}
int m_field;
};
/* Data for adjust_mems callback. */
-struct adjust_mem_data
+class adjust_mem_data
{
+public:
bool store;
machine_mode mem_mode;
HOST_WIDE_INT stack_adjust;
/* Structure for passing some other parameters to function
vt_expand_loc_callback. */
-struct expand_loc_callback_data
+class expand_loc_callback_data
{
+public:
/* The variables and values active at this point. */
variable_table_type *vars;
Store them both in the structure *VALUE.
EXP must be reducible. */
-struct addr_const {
+class addr_const {
+public:
rtx base;
poly_int64 offset;
};
return decl;
}
\f
-struct GTY((chain_next ("%h.next"), for_user)) constant_descriptor_rtx {
+class GTY((chain_next ("%h.next"), for_user)) constant_descriptor_rtx {
+public:
struct constant_descriptor_rtx *next;
rtx mem;
rtx sym;
vnull vNULL;
/* Vector memory usage. */
-struct vec_usage: public mem_usage
+class vec_usage: public mem_usage
{
+public:
/* Default constructor. */
vec_usage (): m_items (0), m_items_peak (0), m_element_size (0) {}
#ifndef GCC_WIDE_INT_BITMASK_H
#define GCC_WIDE_INT_BITMASK_H
-struct wide_int_bitmask
+class wide_int_bitmask
{
+public:
inline wide_int_bitmask ();
inline wide_int_bitmask (uint64_t l);
inline wide_int_bitmask (uint64_t l, uint64_t h);
{
/* Contains the components of a decomposed integer for easy, direct
access. */
- struct storage_ref
+ class storage_ref
{
+ public:
storage_ref () {}
storage_ref (const HOST_WIDE_INT *, unsigned int, unsigned int);
wide_int, with the optimization that VAL is normally a pointer to
another integer's storage, so that no array copy is needed. */
template <bool SE, bool HDP>
-struct wide_int_ref_storage : public wi::storage_ref
+class wide_int_ref_storage : public wi::storage_ref
{
private:
/* Scratch space that can be used when decomposing the original integer.
bytes beyond the sizeof need to be allocated. Use set_precision
to initialize the structure. */
template <int N>
-class GTY((user)) trailing_wide_ints
+struct GTY((user)) trailing_wide_ints
{
private:
/* The shared precision of each number. */
{
/* Stores HWI-sized integer VAL, treating it as having signedness SGN
and precision PRECISION. */
- struct hwi_with_prec
+ class hwi_with_prec
{
+ public:
hwi_with_prec () {}
hwi_with_prec (HOST_WIDE_INT, unsigned int, signop);
HOST_WIDE_INT val;
+2019-07-09 Martin Sebor <msebor@redhat.com>
+
+ * include/line-map.h: Change class-key from class to struct and vice
+ versa to match convention and avoid -Wclass-is-pod and -Wstruct-no-pod.
+ * mkdeps.c: Same.
+
2019-07-03 Martin Liska <mliska@suse.cz>
* line-map.c (linemap_get_expansion_filename): Remove
};
/* A set of chronological line_map structures. */
-struct GTY(()) line_maps {
+class GTY(()) line_maps {
+public:
~line_maps ();
of localized text, and a flag to determine if the caller should "free" the
buffer. */
-struct label_text
+class label_text
{
+public:
label_text ()
: m_buffer (NULL), m_caller_owned (false)
{}
/* Keep this structure local to this file, so clients don't find it
easy to start making assumptions. */
-struct mkdeps
+class mkdeps
{
public:
/* T has trivial cctor & dtor. */