GCC Middle and Back End API Reference
gensupport.cc File Reference
#include "bconfig.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "rtl.h"
#include "obstack.h"
#include "errors.h"
#include "read-md.h"
#include "gensupport.h"
#include "vec.h"
#include "optabs.def"
Include dependency graph for gensupport.cc:

Data Structures

class  queue_elem
 
class  conlist
 
class  gen_reader
 
struct  std_pred_table
 

Macros

#define INCLUDE_STRING
 
#define INCLUDE_VECTOR
 
#define MAX_OPERANDS   40
 
#define MNEMONIC_ATTR_NAME   "mnemonic"
 
#define MNEMONIC_HTAB_SIZE   1024
 
#define N   0
 
#define Y   1
 
#define I   2
 
#define TRISTATE_AND(a, b)
 
#define TRISTATE_OR(a, b)
 
#define TRISTATE_NOT(a)    ((a) == I ? I : !(a))
 
#define NUM_KNOWN_STD_PREDS   ARRAY_SIZE (std_preds)
 
#define NS   "NULL"
 
#define ZS   "'\\0'"
 
#define OPTAB_CL(o, p, c, b, l)   { #o, p, #b, ZS, #l, o, c, UNKNOWN, 1 },
 
#define OPTAB_CX(o, p)   { #o, p, NULL, NULL, NULL, o, UNKNOWN, UNKNOWN, 1 },
 
#define OPTAB_CD(o, p)   { #o, p, NS, ZS, NS, o, UNKNOWN, UNKNOWN, 2 },
 
#define OPTAB_NL(o, p, c, b, s, l)   { #o, p, #b, #s, #l, o, c, c, 3 },
 
#define OPTAB_NC(o, p, c)   { #o, p, NS, ZS, NS, o, c, c, 3 },
 
#define OPTAB_NX(o, p)   { #o, p, NULL, NULL, NULL, o, UNKNOWN, UNKNOWN, 3 },
 
#define OPTAB_VL(o, p, c, b, s, l)   { #o, p, #b, #s, #l, o, c, UNKNOWN, 3 },
 
#define OPTAB_VC(o, p, c)   { #o, p, NS, ZS, NS, o, c, UNKNOWN, 3 },
 
#define OPTAB_VX(o, p)   { #o, p, NULL, NULL, NULL, o, UNKNOWN, UNKNOWN, 3 },
 
#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 },
 

Typedefs

typedef const char *(* constraints_handler_t) (const char *, int)
 
typedef std::vector< conlistvec_conlist
 

Functions

static void remove_constraints (rtx)
 
static int is_predicable (class queue_elem *)
 
static void identify_predicable_attribute (void)
 
static int n_alternatives (const char *)
 
static void collect_insn_data (rtx, int *, int *)
 
static const charalter_test_for_insn (class queue_elem *, class queue_elem *)
 
static charshift_output_template (char *, const char *, int)
 
static const charalter_output_for_insn (class queue_elem *, class queue_elem *, int, int)
 
static void process_one_cond_exec (class queue_elem *)
 
static void process_define_cond_exec (void)
 
static void init_predicate_table (void)
 
static void record_insn_name (int, const char *)
 
static bool has_subst_attribute (class queue_elem *, class queue_elem *)
 
static const charalter_output_for_subst_insn (rtx, int)
 
static void alter_attrs_for_subst_insn (class queue_elem *, int)
 
static void process_substs_on_one_elem (class queue_elem *, class queue_elem *)
 
static rtx subst_dup (rtx, int, int)
 
static void process_define_subst (void)
 
static const charduplicate_alternatives (const char *, int)
 
static const charduplicate_each_alternative (const char *str, int n_dup)
 
static rtx alter_constraints (rtx, int, constraints_handler_t)
 
static rtx adjust_operands_numbers (rtx)
 
static rtx replace_duplicating_operands_in_pattern (rtx)
 
rtx gen_rtx_CONST_INT (machine_mode ARG_UNUSED(mode), HOST_WIDE_INT arg)
 
rtx add_implicit_parallel (rtvec vec)
 
void compute_test_codes (rtx exp, file_location loc, char *codes)
 
static bool valid_predicate_name_p (const char *name)
 
static void process_define_predicate (rtx desc, file_location loc)
 
unsigned int get_register_filter_id (const char *filter)
 
static void process_define_register_constraint (rtx desc, file_location loc)
 
static class queue_elemqueue_pattern (rtx pattern, class queue_elem ***list_tail, file_location loc)
 
static void remove_from_queue (class queue_elem *elem, class queue_elem **queue)
 
static void add_define_attr (const char *name)
 
static rtx replace_operands_with_dups (rtx x)
 
static rtvec gen_rewrite_sequence (rtvec vec)
 
static void add_constraints (rtx part, file_location loc, vec_conlist &cons)
 
static void add_attributes (rtx x, vec_conlist &attrs)
 
static void skip_spaces (const char **str)
 
static bool expect_char (const char **str, char c)
 
static void parse_section_layout (file_location loc, const char **templ, const char *label, vec_conlist &list, bool numeric)
 
static void parse_section (const char **templ, unsigned int n_elems, unsigned int alt_no, vec_conlist &list, file_location loc, const char *name)
 
static void preprocess_compact_syntax (file_location loc, int alt_no, std::string &line, std::string &last_line)
 
static void convert_syntax (rtx x, file_location loc)
 
static void process_rtx (rtx desc, file_location loc)
 
static void change_subst_attribute (class queue_elem *elem, class queue_elem *subst_elem, const char *new_value)
 
static bool subst_pattern_match (rtx x, rtx pt, file_location loc)
 
static int get_alternatives_number (rtx pattern, int *n_alt, file_location loc)
 
static rtx alter_predicate_for_insn (rtx pattern, int alt, int max_op, file_location loc)
 
static rtx modify_attr_enabled_ce (rtx val)
 
static void alter_attrs_for_insn (rtx insn)
 
static void mark_operands_from_match_dup (rtx pattern)
 
static void mark_operands_used_in_match_dup (rtx pattern)
 
static int find_first_unused_number_of_operand ()
 
static void renumerate_operands_in_pattern (rtx pattern)
 
static rtx generate_match_dup (int opno)
 
static void add_mnemonic_string (htab_t mnemonic_htab, const char *str, size_t len)
 
static void gen_mnemonic_setattr (htab_t mnemonic_htab, rtx insn)
 
static int mnemonic_htab_callback (void **slot, void *info)
 
static void gen_mnemonic_attr (void)
 
static void check_define_attr_duplicates ()
 
rtx_readerinit_rtx_reader_args_cb (int argc, const char **argv, bool(*parse_opt)(const char *))
 
rtx_readerinit_rtx_reader_args (int argc, const char **argv)
 
int count_patterns ()
 
bool read_md_rtx (md_rtx_info *info)
 
file_location get_file_location (rtx x)
 
unsigned int get_num_insn_codes ()
 
const charget_c_test (rtx x)
 
hashval_t hash_c_test (const void *x)
 
int cmp_c_test (const void *x, const void *y)
 
int maybe_eval_c_test (const char *expr)
 
void add_c_test (const char *expr, int value)
 
void traverse_c_tests (htab_trav callback, void *info)
 
static hashval_t hash_struct_pred_data (const void *ptr)
 
static int eq_struct_pred_data (const void *a, const void *b)
 
struct pred_datalookup_predicate (const char *name)
 
void add_predicate_code (struct pred_data *pred, enum rtx_code code)
 
void add_predicate (struct pred_data *pred)
 
const charget_insn_name (int code)
 
static void get_pattern_stats_1 (struct pattern_stats *stats, rtx x)
 
void get_pattern_stats (struct pattern_stats *stats, rtvec pattern)
 
const charget_emit_function (rtx x)
 
bool needs_barrier_p (rtx x)
 
static bool match_pattern (optab_pattern *p, const char *name, const char *pat)
 
bool find_optab (optab_pattern *p, const char *name)
 

Variables

static rtx operand_data [MAX_OPERANDS]
 
static rtx match_operand_entries_in_pattern [MAX_OPERANDS]
 
static char used_operands_numbers [MAX_OPERANDS]
 
hash_set< rtxcompact_syntax
 
int target_flags
 
int insn_elision = 1
 
static struct obstack obstack
 
struct obstackrtl_obstack = &obstack
 
static int insn_sequence_num
 
static int split_sequence_num
 
static int peephole2_sequence_num
 
static int predicable_default
 
static const charpredicable_true
 
static const charpredicable_false
 
static const charsubst_true = "yes"
 
static const charsubst_false = "no"
 
static htab_t condition_table
 
static class queue_elemdefine_attr_queue
 
static class queue_elem ** define_attr_tail = &define_attr_queue
 
static class queue_elemdefine_pred_queue
 
static class queue_elem ** define_pred_tail = &define_pred_queue
 
static class queue_elemdefine_insn_queue
 
static class queue_elem ** define_insn_tail = &define_insn_queue
 
static class queue_elemdefine_cond_exec_queue
 
static class queue_elem ** define_cond_exec_tail = &define_cond_exec_queue
 
static class queue_elemdefine_subst_queue
 
static class queue_elem ** define_subst_tail = &define_subst_queue
 
static class queue_elemother_queue
 
static class queue_elem ** other_tail = &other_queue
 
static class queue_elemdefine_subst_attr_queue
 
static class queue_elem ** define_subst_attr_tail = &define_subst_attr_queue
 
static hash_map< rtx, file_location > * rtx_locs
 
static char did_you_mean_codes [NUM_RTX_CODE]
 
static hash_map< nofree_string_hash, unsigned int > register_filter_map
 
vec< const char * > register_filters
 
static htab_t predicate_table
 
struct pred_datafirst_predicate
 
static struct pred_data ** last_predicate = &first_predicate
 
static const struct std_pred_table std_preds []
 
static char ** insn_name_ptr = 0
 
static int insn_name_ptr_size = 0
 
optab_def optabs []
 
unsigned int num_optabs = ARRAY_SIZE (optabs)
 

Macro Definition Documentation

◆ I

#define I   2

Referenced by compute_test_codes().

◆ INCLUDE_STRING

#define INCLUDE_STRING
Support routines for the various generation passes.
Copyright (C) 2000-2024 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/>.   

◆ INCLUDE_VECTOR

#define INCLUDE_VECTOR

◆ MAX_OPERANDS

◆ MNEMONIC_ATTR_NAME

#define MNEMONIC_ATTR_NAME   "mnemonic"

◆ MNEMONIC_HTAB_SIZE

#define MNEMONIC_HTAB_SIZE   1024

Referenced by gen_mnemonic_attr().

◆ N

#define N   0
Predicate handling.

We construct from the machine description a table mapping each
predicate to a list of the rtl codes it can possibly match.  The
function 'maybe_both_true' uses it to deduce that there are no
expressions that can be matches by certain pairs of tree nodes.
Also, if a predicate can match only one code, we can hardwire that
code into the node testing the predicate.

Some predicates are flagged as special.  validate_pattern will not
warn about modeless match_operand expressions if they have a
special predicate.  Predicates that allow only constants are also
treated as special, for this purpose.

validate_pattern will warn about predicates that allow non-lvalues
when they appear in destination operands.

Calculating the set of rtx codes that can possibly be accepted by a
predicate expression EXP requires a three-state logic: any given
subexpression may definitively accept a code C (Y), definitively
reject a code C (N), or may have an indeterminate effect (I).  N
and I is N; Y or I is Y; Y and I, N or I are both I.  Here are full
truth tables.

  a b  a&b  a|b
  Y Y   Y    Y
  N Y   N    Y
  N N   N    N
  I Y   I    Y
  I N   N    I
  I I   I    I

We represent Y with 1, N with 0, I with 2.  If any code is left in
an I state by the complete expression, we must assume that that
code can be accepted.   

Referenced by inchash::hash::add_poly_hwi(), inchash::hash::add_poly_int(), auto_vec< T, N >::auto_vec(), auto_vec< T, N >::auto_vec(), bitmap_tree_splay(), coeffs_in_range_p(), compute_test_codes(), wi::extended_tree< N >::extended_tree(), trailing_wide_ints< N >::extra_size(), FIXED_WIDE_INT(), FIXED_WIDE_INT(), fixed_wide_int_storage< N >::fixed_wide_int_storage(), poly_int< N, C >::force_shwi(), poly_int< N, C >::force_uhwi(), poly_int< N, C >::from(), poly_int< N, C >::from(), wi::int_traits< fixed_wide_int_storage< N > >::get_binary_precision(), wi::int_traits< widest_int_storage< N > >::get_binary_precision(), wi::extended_tree< N >::get_len(), wi::extended_tree< N >::get_precision(), fixed_wide_int_storage< N >::get_precision(), widest_int_storage< N >::get_precision(), poly_int< N, C >::is_constant(), make_item_for_dump_dec(), poly_int< N, C >::operator*=(), poly_int< N, C >::operator+=(), poly_int< N, C >::operator-=(), poly_int< N, C >::operator=(), poly_int< N, C >::operator=(), widest_int_storage< N >::operator=(), poly_int< N, C >::poly_int(), pp_wide_integer(), process_define_predicate(), fixed_wide_int_storage< N >::set_len(), widest_int_storage< N >::set_len(), trailing_wide_ints< N >::set_precision(), wi::shwi(), array_traits< T[N]>::size(), poly_int< N, C >::to_shwi(), poly_int< N, C >::to_uhwi(), wi::uhwi(), WIDEST_INT(), WIDEST_INT(), and widest_int_storage< N >::widest_int_storage().

◆ NS

#define NS   "NULL"

◆ NUM_KNOWN_STD_PREDS

#define NUM_KNOWN_STD_PREDS   ARRAY_SIZE (std_preds)

Referenced by init_predicate_table().

◆ OPTAB_CD

#define OPTAB_CD ( o,
p )   { #o, p, NS, ZS, NS, o, UNKNOWN, UNKNOWN, 2 },

◆ OPTAB_CL

#define OPTAB_CL ( o,
p,
c,
b,
l )   { #o, p, #b, ZS, #l, o, c, UNKNOWN, 1 },

◆ OPTAB_CX

#define OPTAB_CX ( o,
p )   { #o, p, NULL, NULL, NULL, o, UNKNOWN, UNKNOWN, 1 },

◆ OPTAB_D

#define OPTAB_D ( o,
p )   { #o, p, NS, ZS, NS, o, UNKNOWN, UNKNOWN, 4 },

◆ OPTAB_DC

#define OPTAB_DC ( o,
p,
c )   { #o, p, NS, ZS, NS, o, c, c, 4 },

◆ OPTAB_NC

#define OPTAB_NC ( o,
p,
c )   { #o, p, NS, ZS, NS, o, c, c, 3 },

◆ OPTAB_NL

#define OPTAB_NL ( o,
p,
c,
b,
s,
l )   { #o, p, #b, #s, #l, o, c, c, 3 },

◆ OPTAB_NX

#define OPTAB_NX ( o,
p )   { #o, p, NULL, NULL, NULL, o, UNKNOWN, UNKNOWN, 3 },

◆ OPTAB_VC

#define OPTAB_VC ( o,
p,
c )   { #o, p, NS, ZS, NS, o, c, UNKNOWN, 3 },

◆ OPTAB_VL

#define OPTAB_VL ( o,
p,
c,
b,
s,
l )   { #o, p, #b, #s, #l, o, c, UNKNOWN, 3 },

◆ OPTAB_VX

#define OPTAB_VX ( o,
p )   { #o, p, NULL, NULL, NULL, o, UNKNOWN, UNKNOWN, 3 },

◆ TRISTATE_AND

#define TRISTATE_AND ( a,
b )
Value:
((a) == I ? ((b) == N ? N : I) : \
(b) == I ? ((a) == N ? N : I) : \
(a) && (b))
#define N
Definition gensupport.cc:202
#define I
Definition gensupport.cc:204
Ca const poly_int< N, Cb > & b
Definition poly-int.h:767
Ca & a
Definition poly-int.h:766

Referenced by compute_test_codes().

◆ TRISTATE_NOT

#define TRISTATE_NOT ( a)     ((a) == I ? I : !(a))

Referenced by compute_test_codes().

◆ TRISTATE_OR

#define TRISTATE_OR ( a,
b )
Value:
((a) == I ? ((b) == Y ? Y : I) : \
(b) == I ? ((a) == Y ? Y : I) : \
(a) || (b))
#define Y
Definition gensupport.cc:203

Referenced by compute_test_codes().

◆ Y

#define Y   1

Referenced by compute_test_codes().

◆ ZS

#define ZS   "'\\0'"

Typedef Documentation

◆ constraints_handler_t

typedef const char *(* constraints_handler_t) (const char *, int)

◆ vec_conlist

Function Documentation

◆ add_attributes()

static void add_attributes ( rtx x,
vec_conlist & attrs )
static
Add ATTRS to definition X's attribute list.   

References rtvec_def::elem, GET_CODE, ggc_alloc(), i, rtvec_alloc(), rtx_alloc(), XSTR, XVEC, XVECEXP, and XVECLEN.

Referenced by convert_syntax().

◆ add_c_test()

void add_c_test ( const char * expr,
int value )
Record the C test expression EXPR in the condition_table, with
value VAL.  Duplicates clobber previous entries.   

References condition_table, c_test::expr, expr, ggc_alloc(), and c_test::value.

Referenced by main().

◆ add_constraints()

static void add_constraints ( rtx part,
file_location loc,
vec_conlist & cons )
static
Add constraints to an rtx.  This function is similar to remove_constraints.
Errors if adding the constraints would overwrite existing constraints.   

References add_constraints(), error_at(), GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, ggc_alloc(), i, NULL, NULL_RTX, XEXP, XINT, XSTR, XVEC, XVECEXP, and XVECLEN.

Referenced by add_constraints(), and convert_syntax().

◆ add_define_attr()

static void add_define_attr ( const char * name)
static
Build a define_attr for an binary attribute with name NAME and
possible values "yes" and "no", and queue it.   

References queue_elem::data, define_attr_queue, ggc_alloc(), queue_elem::loc, queue_elem::next, rtx_alloc(), XEXP, and XSTR.

Referenced by alter_attrs_for_insn().

◆ add_implicit_parallel()

rtx add_implicit_parallel ( rtvec vec)
Return the rtx pattern specified by the list of rtxes in a
define_insn or define_split.   

References GET_NUM_ELEM, ggc_alloc(), RTVEC_ELT, rtx_alloc(), and XVEC.

Referenced by gen_insn(), gen_rewrite_sequence(), main(), and process_one_cond_exec().

◆ add_mnemonic_string()

static void add_mnemonic_string ( htab_t mnemonic_htab,
const char * str,
size_t len )
static
Add mnemonic STR with length LEN to the mnemonic hash table
MNEMONIC_HTAB.  A trailing zero end character is appended to STR
and a permanent heap copy of STR is created.   

References alloca, and ggc_alloc().

Referenced by gen_mnemonic_attr(), and gen_mnemonic_setattr().

◆ add_predicate()

◆ add_predicate_code()

◆ adjust_operands_numbers()

static rtx adjust_operands_numbers ( rtx pattern)
static
If output pattern of define_subst contains MATCH_DUP, then this
expression would be replaced with the pattern, matched with
MATCH_OPERAND from input pattern.  This pattern could contain any
number of MATCH_OPERANDs, MATCH_OPERATORs etc., so it's possible
that a MATCH_OPERAND from output_pattern (if any) would have the
same number, as MATCH_OPERAND from copied pattern.  To avoid such
indexes overlapping, we assign new indexes to MATCH_OPERANDs,
laying in the output pattern outside of MATCH_DUPs.   

References mark_operands_used_in_match_dup(), and renumerate_operands_in_pattern().

Referenced by process_substs_on_one_elem().

◆ alter_attrs_for_insn()

static void alter_attrs_for_insn ( rtx insn)
static
Alter the attribute vector of INSN, which is a COND_EXEC variant created
from a define_insn pattern.  We must modify the "predicable" attribute
to be named "ce_enabled", and also change any "enabled" attribute that's
present so that it takes ce_enabled into account.
We rely on the fact that INSN was created with copy_rtx, and modify data
in-place.   

References add_define_attr(), queue_elem::data, define_attr_queue, gcc_unreachable, GET_CODE, GET_NUM_ELEM, ggc_alloc(), i, modify_attr_enabled_ce(), queue_elem::next, rtvec_alloc(), RTVEC_ELT, rtx_alloc(), SET, SET_DEST, SET_SRC, XEXP, XSTR, and XVEC.

Referenced by process_one_cond_exec().

◆ alter_attrs_for_subst_insn()

static void alter_attrs_for_subst_insn ( class queue_elem * elem,
int n_dup )
static
As number of constraints is changed after define_subst, we need to
process attributes as well - we need to duplicate them the same way
that we duplicated constraints in original pattern
ELEM is a queue element, containing our rtl-template,
N_DUP - multiplication factor.   

References queue_elem::data, duplicate_alternatives(), error_at(), gcc_unreachable, GET_CODE, GET_NUM_ELEM, ggc_alloc(), i, queue_elem::loc, NULL, RTVEC_ELT, SET, XSTR, and XVEC.

Referenced by process_substs_on_one_elem().

◆ alter_constraints()

static rtx alter_constraints ( rtx pattern,
int n_dup,
constraints_handler_t alter )
static
Duplicate constraints in PATTERN.  If pattern is from original
rtl-template, we need to duplicate each alternative - for that we
need to use duplicate_each_alternative () as a functor ALTER.
If pattern is from output-pattern of define_subst, we need to
duplicate constraints in another way - with duplicate_alternatives ().
N_DUP is multiplication factor.   

References alter_constraints(), GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, ggc_alloc(), i, NULL, r, XEXP, XSTR, XVECEXP, and XVECLEN.

Referenced by alter_constraints(), process_substs_on_one_elem(), and subst_dup().

◆ alter_output_for_insn()

static const char * alter_output_for_insn ( class queue_elem * ce_elem,
class queue_elem * insn_elem,
int alt,
int max_op )
static

◆ alter_output_for_subst_insn()

static const char * alter_output_for_subst_insn ( rtx insn,
int alt )
static
Alter the output of INSN whose pattern was modified by
DEFINE_SUBST.  We must replicate output strings according
to the new number of alternatives ALT in substituted pattern.
If ALT equals 1, output has one alternative or defined by C
code, then output is returned without any changes.   

References ggc_alloc(), and XTMPL.

Referenced by process_substs_on_one_elem().

◆ alter_predicate_for_insn()

◆ alter_test_for_insn()

static const char * alter_test_for_insn ( class queue_elem * ce_elem,
class queue_elem * insn_elem )
static

◆ change_subst_attribute()

static void change_subst_attribute ( class queue_elem * elem,
class queue_elem * subst_elem,
const char * new_value )
static
Find attribute SUBST in ELEM and assign NEW_VALUE to it.   

References queue_elem::data, GET_CODE, GET_NUM_ELEM, ggc_alloc(), i, RTVEC_ELT, XSTR, and XVEC.

Referenced by process_substs_on_one_elem().

◆ check_define_attr_duplicates()

static void check_define_attr_duplicates ( )
static
Check if there are DEFINE_ATTRs with the same name.   

References queue_elem::data, define_attr_queue, error_at(), ggc_alloc(), queue_elem::loc, queue_elem::next, NULL, and XSTR.

Referenced by init_rtx_reader_args_cb().

◆ cmp_c_test()

int cmp_c_test ( const void * x,
const void * y )
Compare two c_test expression structures.   

References a, b, ggc_alloc(), and y.

Referenced by init_rtx_reader_args_cb().

◆ collect_insn_data()

static void collect_insn_data ( rtx pattern,
int * palt,
int * pmax )
static
Determine how many alternatives there are in INSN, and how many
operands.   

References collect_insn_data(), gcc_unreachable, GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, ggc_alloc(), i, n_alternatives(), NULL, XEXP, XINT, XSTR, XVEC, XVECEXP, and XVECLEN.

Referenced by collect_insn_data(), and process_one_cond_exec().

◆ compute_test_codes()

void compute_test_codes ( rtx exp,
file_location loc,
char * codes )
Recursively calculate the set of rtx codes accepted by the
predicate expression EXP, writing the result to CODES.  LOC is
the .md file location of the directive containing EXP.   

References pred_data::codes, compute_test_codes(), did_you_mean_codes, error_at(), exp(), GET_CODE, GET_RTX_NAME, ggc_alloc(), I, i, queue_elem::loc, lookup_predicate(), message_at(), N, NUM_RTX_CODE, scan_comma_elt(), TRISTATE_AND, TRISTATE_NOT, TRISTATE_OR, XEXP, XSTR, and Y.

Referenced by add_constraint(), compute_test_codes(), and process_define_predicate().

◆ convert_syntax()

static void convert_syntax ( rtx x,
file_location loc )
static

◆ count_patterns()

int count_patterns ( )
Count the number of patterns in all queues and return the count.   

References count, queue_elem::data, define_attr_queue, define_insn_queue, define_pred_queue, get_c_test(), ggc_alloc(), insn_elision, maybe_eval_c_test(), queue_elem::next, and other_queue.

Referenced by main().

◆ duplicate_alternatives()

static const char * duplicate_alternatives ( const char * str,
int n_dup )
static
From string STR "a,b,c" produce "a,b,c,a,b,c,a,b,c", i.e. original
string, duplicated N_DUP times.   

References ggc_alloc(), and i.

Referenced by alter_attrs_for_subst_insn(), and subst_dup().

◆ duplicate_each_alternative()

static const char * duplicate_each_alternative ( const char * str,
int n_dup )
static
From string STR "a,b,c" produce "a,a,a,b,b,b,c,c,c", i.e. string where
each alternative from the original string is duplicated N_DUP times.   

References ggc_alloc(), i, and NULL.

Referenced by process_substs_on_one_elem().

◆ eq_struct_pred_data()

static int eq_struct_pred_data ( const void * a,
const void * b )
static

References a, b, ggc_alloc(), and pred_data::name.

Referenced by init_predicate_table().

◆ expect_char()

static bool expect_char ( const char ** str,
char c )
inlinestatic
Consumes the given character, if it's there.   

Referenced by convert_syntax().

◆ find_first_unused_number_of_operand()

static int find_first_unused_number_of_operand ( )
static
This is subroutine of renumerate_operands_in_pattern.
It finds first not-occupied operand-index.   

References i, MAX_OPERANDS, and used_operands_numbers.

Referenced by renumerate_operands_in_pattern().

◆ find_optab()

bool find_optab ( optab_pattern * p,
const char * name )
Return true if NAME is the name of an optab, describing it in P if so.   

References ggc_alloc(), optab_pattern::m1, optab_pattern::m2, match_pattern(), optab_pattern::name, pred_data::name, optab_def::op, optab_pattern::op, optabs, and optab_pattern::sort_num.

Referenced by gen_expand(), and gen_insn().

◆ gen_mnemonic_attr()

static void gen_mnemonic_attr ( void )
static
Generate (set_attr "mnemonic" "..") RTXs and append them to every
insn definition in case the back end requests it by defining the
mnemonic attribute.  The values for the attribute will be extracted
from the output patterns of the insn definitions as far as
possible.   

References add_mnemonic_string(), queue_elem::data, define_attr_queue, define_attr_tail, define_insn_queue, free(), gen_mnemonic_setattr(), GET_CODE, md_reader::get_string_obstack(), ggc_alloc(), have_error, i, MNEMONIC_ATTR_NAME, mnemonic_htab_callback(), MNEMONIC_HTAB_SIZE, queue_elem::next, NULL, obstack, rtx_reader_ptr, scan_comma_elt(), SET, SET_DEST, XSTR, XVEC, XVECEXP, and XVECLEN.

Referenced by init_rtx_reader_args_cb().

◆ gen_mnemonic_setattr()

static void gen_mnemonic_setattr ( htab_t mnemonic_htab,
rtx insn )
static
Scan INSN for mnemonic strings and add them to the mnemonic hash
table in MNEMONIC_HTAB.

The mnemonics cannot be found if they are emitted using C code.

If a mnemonic string contains ';' or a newline the string assumed
to consist of more than a single instruction.  The attribute value
will then be set to the user defined default value.   

References add_mnemonic_string(), md_reader::get_string_obstack(), ggc_alloc(), i, MNEMONIC_ATTR_NAME, obstack, rtvec_alloc(), RTVEC_ELT, rtx_alloc(), rtx_reader_ptr, XSTR, XTMPL, XVEC, XVECEXP, and XVECLEN.

Referenced by gen_mnemonic_attr().

◆ gen_rewrite_sequence()

static rtvec gen_rewrite_sequence ( rtvec vec)
static
Convert matching pattern VEC from a DEFINE_INSN_AND_REWRITE into
a sequence that should be generated by the splitter.   

References add_implicit_parallel(), ggc_alloc(), replace_operands_with_dups(), rtvec_alloc(), and RTVEC_ELT.

Referenced by process_rtx().

◆ gen_rtx_CONST_INT()

rtx gen_rtx_CONST_INT ( machine_mode ARG_UNUSEDmode,
HOST_WIDE_INT arg )
Make a version of gen_rtx_CONST_INT so that GEN_INT can be used in
the gensupport programs.   

References ggc_alloc(), rtx_alloc(), and XWINT.

◆ generate_match_dup()

static rtx generate_match_dup ( int opno)
static
Generate RTL expression
(match_dup OPNO)

References ggc_alloc(), PUT_CODE, rtx_alloc(), and XINT.

Referenced by replace_duplicating_operands_in_pattern().

◆ get_alternatives_number()

static int get_alternatives_number ( rtx pattern,
int * n_alt,
file_location loc )
static
The routine scans rtl PATTERN, find match_operand in it and counts
number of alternatives.  If PATTERN contains several match_operands
with different number of alternatives, error is emitted, and the
routine returns 0.  If all match_operands in PATTERN have the same
number of alternatives, it's stored in N_ALT, and the routine returns 1.
LOC is the location of PATTERN, for error reporting.   

References error_at(), gcc_unreachable, get_alternatives_number(), GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, ggc_alloc(), i, queue_elem::loc, n_alternatives(), NULL, XEXP, XINT, XSTR, XVEC, XVECEXP, and XVECLEN.

Referenced by get_alternatives_number(), and process_substs_on_one_elem().

◆ get_c_test()

const char * get_c_test ( rtx x)
Return the C test that says whether definition rtx DEF can be used,
or "" if it can be used unconditionally.   

References GET_CODE, ggc_alloc(), and XSTR.

Referenced by count_patterns(), main(), match_pattern_1(), read_md_rtx(), and validate_pattern().

◆ get_emit_function()

const char * get_emit_function ( rtx x)
Return the emit_* function that should be used for pattern X, or NULL
if we can't pick a particular type at compile time and should instead
fall back to "emit".   

References classify_insn(), gcc_unreachable, ggc_alloc(), and NULL.

Referenced by gen_emit_seq().

◆ get_file_location()

file_location get_file_location ( rtx x)
Return the file location of DEFINE_* rtx X, which was previously
returned by read_md_rtx.   

References gcc_assert, and rtx_locs.

Referenced by def_target_insn().

◆ get_insn_name()

◆ get_num_insn_codes()

unsigned int get_num_insn_codes ( )
Return the number of possible INSN_CODEs.  Only meaningful once the
whole file has been processed.   

References insn_sequence_num.

Referenced by main().

◆ get_pattern_stats()

void get_pattern_stats ( struct pattern_stats * stats,
rtvec pattern )
Make STATS describe the operands that appear in instruction pattern
PATTERN.   

References GET_NUM_ELEM, get_pattern_stats_1(), i, MAX, and RTVEC_ELT.

Referenced by def_target_insn(), gen_expand(), gen_expand(), gen_insn(), gen_insn(), gen_peephole(), gen_split(), handle_overloaded_gen(), and handle_overloaded_gen().

◆ get_pattern_stats_1()

static void get_pattern_stats_1 ( struct pattern_stats * stats,
rtx x )
static
Make STATS describe the operands that appear in rtx X.   

References GET_CODE, get_pattern_stats_1(), GET_RTX_FORMAT, GET_RTX_LENGTH, ggc_alloc(), i, MAX, MIN, NULL_RTX, RTX_CODE, XEXP, XINT, XVECEXP, and XVECLEN.

Referenced by get_pattern_stats(), and get_pattern_stats_1().

◆ get_register_filter_id()

unsigned int get_register_filter_id ( const char * filter)
Return the unique identifier for filter condition FILTER.  Identifiers
are assigned automatically when the define_register_constraint is
parsed.   

References gcc_assert, and register_filter_map.

Referenced by preprocess_constraints(), write_get_register_filter(), and write_get_register_filter_id().

◆ has_subst_attribute()

static bool has_subst_attribute ( class queue_elem * elem,
class queue_elem * subst_elem )
static
Return true if ELEM has the attribute with the name of DEFINE_SUBST
represented by SUBST_ELEM and this attribute has value SUBST_TRUE.
DEFINE_SUBST isn't applied to patterns without such attribute.  In other
words, we suppose the default value of the attribute to be 'no' since it is
always generated automatically in read-rtl.cc.   

References queue_elem::data, error_at(), gcc_unreachable, GET_CODE, GET_NUM_ELEM, ggc_alloc(), i, queue_elem::loc, RTVEC_ELT, SET, SET_DEST, SET_SRC, subst_false, subst_true, XSTR, and XVEC.

Referenced by process_substs_on_one_elem().

◆ hash_c_test()

hashval_t hash_c_test ( const void * x)
Helper functions for insn elision.   
Compute a hash function of a c_test structure, which is keyed
by its ->expr field.   

References a, c_test::expr, and ggc_alloc().

Referenced by init_rtx_reader_args_cb().

◆ hash_struct_pred_data()

static hashval_t hash_struct_pred_data ( const void * ptr)
static

References ggc_alloc(), and pred_data::name.

Referenced by init_predicate_table().

◆ identify_predicable_attribute()

static void identify_predicable_attribute ( void )
static
Examine the attribute "predicable"; discover its boolean values
and its default.   

References queue_elem::data, define_attr_queue, define_cond_exec_queue, error_at(), free(), GET_CODE, ggc_alloc(), queue_elem::loc, queue_elem::next, NULL, predicable_default, predicable_false, predicable_true, XEXP, and XSTR.

Referenced by process_define_cond_exec().

◆ init_predicate_table()

◆ init_rtx_reader_args()

rtx_reader * init_rtx_reader_args ( int argc,
const char ** argv )
Programs that don't have their own options can use this entry point
instead.   

References init_rtx_reader_args_cb().

Referenced by main(), and main().

◆ init_rtx_reader_args_cb()

◆ is_predicable()

static int is_predicable ( class queue_elem * elem)
static
Return true if attribute PREDICABLE is true for ELEM, which holds
a DEFINE_INSN.   

References queue_elem::data, error_at(), gcc_unreachable, GET_CODE, GET_NUM_ELEM, ggc_alloc(), i, queue_elem::loc, NULL, predicable_default, predicable_false, predicable_true, RTVEC_ELT, SET, SET_DEST, SET_SRC, XSTR, and XVEC.

Referenced by process_one_cond_exec().

◆ lookup_predicate()

◆ mark_operands_from_match_dup()

static void mark_operands_from_match_dup ( rtx pattern)
static
This is a subroutine of mark_operands_used_in_match_dup.
This routine is marks all MATCH_OPERANDs inside PATTERN as occupied.   

References gcc_assert, GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, ggc_alloc(), i, mark_operands_from_match_dup(), MAX_OPERANDS, used_operands_numbers, XEXP, XINT, XVECEXP, and XVECLEN.

Referenced by mark_operands_from_match_dup(), and mark_operands_used_in_match_dup().

◆ mark_operands_used_in_match_dup()

static void mark_operands_used_in_match_dup ( rtx pattern)
static
This is a subroutine of adjust_operands_numbers.
It goes through all expressions in PATTERN and when MATCH_DUP is
met, all MATCH_OPERANDs inside it is marked as occupied.  The
process of marking is done by routin mark_operands_from_match_dup.   

References gcc_assert, GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, ggc_alloc(), i, mark_operands_from_match_dup(), mark_operands_used_in_match_dup(), MAX_OPERANDS, XEXP, XINT, XVECEXP, and XVECLEN.

Referenced by adjust_operands_numbers(), and mark_operands_used_in_match_dup().

◆ match_pattern()

static bool match_pattern ( optab_pattern * p,
const char * name,
const char * pat )
static
Return true if instruction NAME matches pattern PAT, storing information
about the match in P if so.   

References gcc_unreachable, GET_MODE_NAME, ggc_alloc(), i, optab_pattern::m1, optab_pattern::m2, pred_data::name, and NULL.

Referenced by find_optab().

◆ maybe_eval_c_test()

int maybe_eval_c_test ( const char * expr)
Given a string representing a C test expression, look it up in the
condition_table and report whether or not its value is known
at compile time.  Returns a tristate: 1 for known true, 0 for
known false, -1 for unknown.   

References condition_table, c_test::expr, expr, ggc_alloc(), and c_test::value.

Referenced by count_patterns(), def_target_insn(), gen_insn(), gen_insn(), gen_proto(), match_pattern_1(), and read_md_rtx().

◆ mnemonic_htab_callback()

static int mnemonic_htab_callback ( void ** slot,
void * info )
static
This function is called for the elements in the mnemonic hashtable
and generates a comma separated list of the mnemonics.   

References md_reader::get_string_obstack(), ggc_alloc(), obstack, and rtx_reader_ptr.

Referenced by gen_mnemonic_attr().

◆ modify_attr_enabled_ce()

static rtx modify_attr_enabled_ce ( rtx val)
static
Modify VAL, which is an attribute expression for the "enabled" attribute,
to take "ce_enabled" into account.  Return the new expression.   

References ggc_alloc(), rtx_alloc(), XEXP, and XSTR.

Referenced by alter_attrs_for_insn().

◆ n_alternatives()

◆ needs_barrier_p()

bool needs_barrier_p ( rtx x)
Return true if we must emit a barrier after pattern X.   

References GET_CODE, ggc_alloc(), SET, SET_DEST, and SET_SRC.

Referenced by gen_emit_seq().

◆ parse_section()

static void parse_section ( const char ** templ,
unsigned int n_elems,
unsigned int alt_no,
vec_conlist & list,
file_location loc,
const char * name )
static
Parse a section, a section is defined as a named space separated list, e.g.

foo: a, b, c

is a section named "foo" with entries a, b and c.   

References fatal_at(), ggc_alloc(), and i.

Referenced by convert_syntax().

◆ parse_section_layout()

static void parse_section_layout ( file_location loc,
const char ** templ,
const char * label,
vec_conlist & list,
bool numeric )
static
Parses the section layout that follows a "{@" if using new syntax. Builds
a vector for a single section. E.g. if we have "attrs: length, arch]..."
then list will have two elements, the first for "length" and the second
for "arch".   

References fatal_at(), ggc_alloc(), and skip_spaces().

Referenced by convert_syntax().

◆ preprocess_compact_syntax()

static void preprocess_compact_syntax ( file_location loc,
int alt_no,
std::string & line,
std::string & last_line )
static
The compact syntax has more convience syntaxes.  As such we post process
the lines to get them back to something the normal syntax understands.   

References fatal_at(), ggc_alloc(), and skip_spaces().

Referenced by convert_syntax().

◆ process_define_cond_exec()

static void process_define_cond_exec ( void )
static
If we have any DEFINE_COND_EXEC patterns, expand the DEFINE_INSN
patterns appropriately.   

References define_cond_exec_queue, have_error, identify_predicable_attribute(), queue_elem::next, and process_one_cond_exec().

Referenced by init_rtx_reader_args_cb().

◆ process_define_predicate()

static void process_define_predicate ( rtx desc,
file_location loc )
static
Process define_predicate directive DESC, which appears at location LOC.
Compute the set of codes that can be matched, and record this as a known
predicate.   

References add_predicate(), add_predicate_code(), pred_data::c_block, pred_data::codes, compute_test_codes(), error_at(), pred_data::exp, GET_CODE, ggc_alloc(), i, N, pred_data::name, NUM_RTX_CODE, pred_data::special, valid_predicate_name_p(), XEXP, and XSTR.

Referenced by process_rtx().

◆ process_define_register_constraint()

static void process_define_register_constraint ( rtx desc,
file_location loc )
static
Process define_register_constraint directive DESC, at location LOC.   

References fatal_at(), ggc_alloc(), register_filter_map, register_filters, and XSTR.

Referenced by process_rtx().

◆ process_define_subst()

static void process_define_subst ( void )
static
If we have any DEFINE_SUBST patterns, expand DEFINE_INSN and
DEFINE_EXPAND patterns appropriately.   

References queue_elem::data, define_insn_queue, define_subst_attr_queue, define_subst_queue, error_at(), GET_CODE, ggc_alloc(), queue_elem::loc, queue_elem::next, other_queue, process_substs_on_one_elem(), and XSTR.

Referenced by init_rtx_reader_args_cb().

◆ process_one_cond_exec()

◆ process_rtx()

◆ process_substs_on_one_elem()

◆ queue_pattern()

static class queue_elem * queue_pattern ( rtx pattern,
class queue_elem *** list_tail,
file_location loc )
static
Queue PATTERN on LIST_TAIL.  Return the address of the new queue
element.   

References queue_elem::data, ggc_alloc(), queue_elem::loc, queue_elem::next, NULL, and queue_elem::split.

Referenced by process_one_cond_exec(), and process_rtx().

◆ read_md_rtx()

◆ record_insn_name()

static void record_insn_name ( int code,
const char * name )
static

◆ remove_constraints()

static void remove_constraints ( rtx part)
static
Recursively remove constraints from an rtx.   

References GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, ggc_alloc(), i, NULL, remove_constraints(), XEXP, XSTR, XVEC, XVECEXP, and XVECLEN.

Referenced by process_rtx(), process_substs_on_one_elem(), and remove_constraints().

◆ remove_from_queue()

static void remove_from_queue ( class queue_elem * elem,
class queue_elem ** queue )
static
Remove element ELEM from QUEUE.   

References queue_elem::next, NULL, and queue.

Referenced by process_substs_on_one_elem().

◆ renumerate_operands_in_pattern()

static void renumerate_operands_in_pattern ( rtx pattern)
static
This is subroutine of adjust_operands_numbers.
It visits all expressions in PATTERN and assigns not-occupied
operand indexes to MATCH_OPERANDs and MATCH_OPERATORs of this
PATTERN.   

References find_first_unused_number_of_operand(), gcc_assert, GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, ggc_alloc(), i, MAX_OPERANDS, renumerate_operands_in_pattern(), used_operands_numbers, XEXP, XINT, XVECEXP, and XVECLEN.

Referenced by adjust_operands_numbers(), and renumerate_operands_in_pattern().

◆ replace_duplicating_operands_in_pattern()

static rtx replace_duplicating_operands_in_pattern ( rtx pattern)
static
This routine checks all match_operands in PATTERN and if some of
have the same index, it replaces all of them except the first one  to
match_dup.
Usually, match_operands with the same indexes are forbidden, but
after define_subst copy an RTL-expression from original template,
indexes of existed and just-copied match_operands could coincide.
To fix it, we replace one of them with match_dup.   

References error(), gcc_assert, generate_match_dup(), GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, ggc_alloc(), i, match_operand_entries_in_pattern, MAX_OPERANDS, NULL, replace_duplicating_operands_in_pattern(), XEXP, XINT, XSTR, XVECEXP, and XVECLEN.

Referenced by process_substs_on_one_elem(), and replace_duplicating_operands_in_pattern().

◆ replace_operands_with_dups()

static rtx replace_operands_with_dups ( rtx x)
static
Recursively replace MATCH_OPERANDs with MATCH_DUPs and MATCH_OPERATORs
with MATCH_OP_DUPs in X.   

References GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, ggc_alloc(), i, NULL, replace_operands_with_dups(), rtvec_alloc(), rtx_alloc(), shallow_copy_rtx(), XEXP, XINT, XVEC, XVECEXP, and XVECLEN.

Referenced by gen_rewrite_sequence(), and replace_operands_with_dups().

◆ shift_output_template()

static char * shift_output_template ( char * dest,
const char * src,
int disp )
static
Adjust all of the operand numbers in SRC to match the shift they'll
get from an operand displacement of DISP.  Return a pointer after the
adjusted string.   

References ggc_alloc().

Referenced by alter_output_for_insn().

◆ skip_spaces()

static void skip_spaces ( const char ** str)
inlinestatic
Consumes spaces and tabs.   

References ggc_alloc().

Referenced by convert_syntax(), parse_section_layout(), and preprocess_compact_syntax().

◆ subst_dup()

static rtx subst_dup ( rtx pattern,
int n_alt,
int n_subst_alt )
static
The routine modifies given input PATTERN of define_subst, replacing
MATCH_DUP and MATCH_OP_DUP with operands from define_insn original
pattern, whose operands are stored in OPERAND_DATA array.
It also duplicates constraints in operands - constraints from
define_insn operands are duplicated N_SUBST_ALT times, constraints
from define_subst operands are duplicated N_ALT times.
After the duplication, returned output rtl-pattern contains every
combination of input constraints Vs constraints from define_subst
output.   

References alter_constraints(), copy_rtx(), duplicate_alternatives(), gcc_assert, gcc_unreachable, GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, ggc_alloc(), i, MAX_OPERANDS, NULL, subst_dup(), XEXP, XINT, XVEC, XVECEXP, and XVECLEN.

Referenced by process_substs_on_one_elem(), and subst_dup().

◆ subst_pattern_match()

static bool subst_pattern_match ( rtx x,
rtx pt,
file_location loc )
static
Compare RTL-template of original define_insn X to input RTL-template of
define_subst PT.  Return 1 if the templates match, 0 otherwise.
During the comparison, the routine also fills global_array OPERAND_DATA.   

References error_at(), gcc_assert, gcc_unreachable, GET_CODE, GET_MODE, GET_RTX_FORMAT, GET_RTX_LENGTH, GET_RTX_NAME, ggc_alloc(), i, lookup_predicate(), MAX_OPERANDS, RTX_CODE, subst_pattern_match(), XEXP, XINT, XSTR, XVECEXP, and XVECLEN.

Referenced by process_substs_on_one_elem(), and subst_pattern_match().

◆ traverse_c_tests()

void traverse_c_tests ( htab_trav callback,
void * info )
For every C test, call CALLBACK with two arguments: a pointer to
the condition structure and INFO.  Stops when CALLBACK returns zero.   

References condition_table, and ggc_alloc().

Referenced by write_conditions().

◆ valid_predicate_name_p()

static bool valid_predicate_name_p ( const char * name)
static
Return true if NAME is a valid predicate name.   

References ggc_alloc(), and pred_data::name.

Referenced by process_define_predicate().

Variable Documentation

◆ compact_syntax

hash_set<rtx> compact_syntax
List of entries which are part of the new syntax.   

Referenced by convert_syntax(), and gen_insn().

◆ condition_table

◆ define_attr_queue

◆ define_attr_tail

class queue_elem** define_attr_tail = &define_attr_queue
static

Referenced by gen_mnemonic_attr(), and process_rtx().

◆ define_cond_exec_queue

◆ define_cond_exec_tail

class queue_elem** define_cond_exec_tail = &define_cond_exec_queue
static

Referenced by process_rtx().

◆ define_insn_queue

◆ define_insn_tail

class queue_elem** define_insn_tail = &define_insn_queue
static

Referenced by process_rtx().

◆ define_pred_queue

class queue_elem* define_pred_queue
static

Referenced by count_patterns(), and read_md_rtx().

◆ define_pred_tail

class queue_elem** define_pred_tail = &define_pred_queue
static

Referenced by process_rtx().

◆ define_subst_attr_queue

class queue_elem* define_subst_attr_queue
static

Referenced by process_define_subst().

◆ define_subst_attr_tail

class queue_elem** define_subst_attr_tail = &define_subst_attr_queue
static

Referenced by process_rtx().

◆ define_subst_queue

◆ define_subst_tail

class queue_elem** define_subst_tail = &define_subst_queue
static

Referenced by process_rtx().

◆ did_you_mean_codes

char did_you_mean_codes[NUM_RTX_CODE]
static
0 means no warning about that code yet, 1 means warned.   

Referenced by compute_test_codes().

◆ first_predicate

struct pred_data* first_predicate

◆ insn_elision

int insn_elision = 1
Set this to 0 to disable automatic elision of insn patterns which
can never be used in this configuration.  See genconditions.cc.
Must be set before calling init_md_reader.   

Referenced by count_patterns(), main(), and read_md_rtx().

◆ insn_name_ptr

char** insn_name_ptr = 0
static
These functions allow linkage with print-rtl.cc.  Also, some generators
like to annotate their output with insn names.   
Holds an array of names indexed by insn_code_number.   

Referenced by get_insn_name(), and record_insn_name().

◆ insn_name_ptr_size

int insn_name_ptr_size = 0
static

Referenced by get_insn_name(), and record_insn_name().

◆ insn_sequence_num

int insn_sequence_num
static
Counter for named patterns and INSN_CODEs.   

Referenced by get_num_insn_codes(), init_rtx_reader_args_cb(), and read_md_rtx().

◆ last_predicate

◆ match_operand_entries_in_pattern

rtx match_operand_entries_in_pattern[MAX_OPERANDS]
static

◆ num_optabs

unsigned int num_optabs = ARRAY_SIZE (optabs)
The number of entries in optabs[].   

Referenced by main().

◆ obstack

struct obstack obstack
static

◆ operand_data

rtx operand_data[MAX_OPERANDS]
static

◆ optabs

optab_def optabs[]
Initial value:
= {
{ "unknown_optab", NULL, NS, ZS, NS, unknown_optab, UNKNOWN, UNKNOWN, 0 },
}
#define NS
Definition gensupport.cc:3759
#define ZS
Definition gensupport.cc:3760
@ unknown_optab
Definition gensupport.h:58
T * ggc_alloc(ALONE_CXX_MEM_STAT_INFO)
Definition ggc.h:184
#define NULL
Definition system.h:50
An array of all optabs.  Note that the same optab can appear more
than once, with a different pattern.   

Referenced by find_optab(), and main().

◆ other_queue

class queue_elem* other_queue
static

◆ other_tail

class queue_elem** other_tail = &other_queue
static

◆ peephole2_sequence_num

int peephole2_sequence_num
static
Counter for define_peephole2s.   

Referenced by init_rtx_reader_args_cb(), and read_md_rtx().

◆ predicable_default

int predicable_default
static

◆ predicable_false

const char* predicable_false
static

◆ predicable_true

const char* predicable_true
static

◆ predicate_table

htab_t predicate_table
static
Helper functions for define_predicate and define_special_predicate
processing.  Shared between genrecog.cc and genpreds.cc.   

Referenced by add_predicate(), init_predicate_table(), and lookup_predicate().

◆ register_filter_map

hash_map<nofree_string_hash, unsigned int> register_filter_map
static
Maps register filter conditions to the associated filter identifier.   

Referenced by get_register_filter_id(), and process_define_register_constraint().

◆ register_filters

◆ rtl_obstack

◆ rtx_locs

hash_map<rtx, file_location>* rtx_locs
static
Mapping from DEFINE_* rtxes to their location in the source file.   

Referenced by get_file_location(), and read_md_rtx().

◆ split_sequence_num

int split_sequence_num
static
Counter for define_splits.   

Referenced by init_rtx_reader_args_cb(), and read_md_rtx().

◆ std_preds

const struct std_pred_table std_preds[]
static

Referenced by init_predicate_table().

◆ subst_false

const char* subst_false = "no"
static

◆ subst_true

const char* subst_true = "yes"
static

Referenced by has_subst_attribute().

◆ target_flags

int target_flags
In case some macros used by files we include need it, define this here.   

Referenced by default_get_pch_validity(), default_pch_valid_p(), and option_affects_pch_p().

◆ used_operands_numbers