GCC Middle and Back End API Reference
rtl.h
Go to the documentation of this file.
1/* Register Transfer Language (RTL) definitions for GCC
2 Copyright (C) 1987-2025 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
19
20#ifndef GCC_RTL_H
21#define GCC_RTL_H
22
23/* This file is occasionally included by generator files which expect
24 machmode.h and other files to exist and would not normally have been
25 included by coretypes.h. */
26#ifdef GENERATOR_FILE
27#include "real.h"
28#include "fixed-value.h"
29#include "statistics.h"
30#include "vec.h"
31#include "hash-table.h"
32#include "hash-set.h"
33#include "input.h"
34#include "is-a.h"
35#endif /* GENERATOR_FILE */
36
37#include "hard-reg-set.h"
38
40
41/* Value used by some passes to "recognize" noop moves as valid
42 instructions. */
43#define NOOP_MOVE_INSN_CODE INT_MAX
44
45/* Register Transfer Language EXPRESSIONS CODES */
46
47#define RTX_CODE enum rtx_code
48enum rtx_code : unsigned {
49
50#define DEF_RTL_EXPR(ENUM, NAME, FORMAT, CLASS) ENUM ,
51#include "rtl.def" /* rtl expressions are documented here */
52#undef DEF_RTL_EXPR
53
54 LAST_AND_UNUSED_RTX_CODE}; /* A convenient way to get a value for
55 NUM_RTX_CODE.
56 Assumes default enum value assignment. */
57
58/* The cast here, saves many elsewhere. */
59#define NUM_RTX_CODE ((int) LAST_AND_UNUSED_RTX_CODE)
60
61/* Similar, but since generator files get more entries... */
62#ifdef GENERATOR_FILE
63# define NON_GENERATOR_NUM_RTX_CODE ((int) MATCH_OPERAND)
64#endif
65
66#define RTX_CODE_BITSIZE 8
67
68/* Register Transfer Language EXPRESSIONS CODE CLASSES */
69
71 /* We check bit 0-1 of some rtx class codes in the predicates below. */
72
73 /* Bit 0 = comparison if 0, arithmetic is 1
74 Bit 1 = 1 if commutative. */
75 RTX_COMPARE, /* 0 */
79
80 /* Must follow the four preceding values. */
81 RTX_UNARY, /* 4 */
82
86
87 /* Bit 0 = 1 if constant. */
88 RTX_OBJ, /* 8 */
90
94};
95
96#define RTX_OBJ_MASK (~1)
97#define RTX_OBJ_RESULT (RTX_OBJ & RTX_OBJ_MASK)
98#define RTX_COMPARE_MASK (~1)
99#define RTX_COMPARE_RESULT (RTX_COMPARE & RTX_COMPARE_MASK)
100#define RTX_ARITHMETIC_MASK (~1)
101#define RTX_ARITHMETIC_RESULT (RTX_COMM_ARITH & RTX_ARITHMETIC_MASK)
102#define RTX_BINARY_MASK (~3)
103#define RTX_BINARY_RESULT (RTX_COMPARE & RTX_BINARY_MASK)
104#define RTX_COMMUTATIVE_MASK (~2)
105#define RTX_COMMUTATIVE_RESULT (RTX_COMM_COMPARE & RTX_COMMUTATIVE_MASK)
106#define RTX_NON_COMMUTATIVE_RESULT (RTX_COMPARE & RTX_COMMUTATIVE_MASK)
107
108extern const unsigned char rtx_length[NUM_RTX_CODE];
109#define GET_RTX_LENGTH(CODE) (rtx_length[(int) (CODE)])
110
111extern const char * const rtx_name[NUM_RTX_CODE];
112#define GET_RTX_NAME(CODE) (rtx_name[(int) (CODE)])
113
114extern const char * const rtx_format[NUM_RTX_CODE];
115#define GET_RTX_FORMAT(CODE) (rtx_format[(int) (CODE)])
116
117extern const enum rtx_class rtx_class[NUM_RTX_CODE];
118#define GET_RTX_CLASS(CODE) (rtx_class[(int) (CODE)])
119
120/* True if CODE is part of the insn chain (i.e. has INSN_UID, PREV_INSN
121 and NEXT_INSN fields). */
122#define INSN_CHAIN_CODE_P(CODE) IN_RANGE (CODE, DEBUG_INSN, NOTE)
123
124extern const unsigned char rtx_code_size[NUM_RTX_CODE];
125extern const unsigned char rtx_next[NUM_RTX_CODE];
126
127/* The flags and bitfields of an ADDR_DIFF_VEC. BASE is the base label
128 relative to which the offsets are calculated, as explained in rtl.def. */
130{
131 /* Set at the start of shorten_branches - ONLY WHEN OPTIMIZING - : */
132 unsigned min_align: 8;
133 /* Flags: */
134 unsigned base_after_vec: 1; /* BASE is after the ADDR_DIFF_VEC. */
135 unsigned min_after_vec: 1; /* minimum address target label is
136 after the ADDR_DIFF_VEC. */
137 unsigned max_after_vec: 1; /* maximum address target label is
138 after the ADDR_DIFF_VEC. */
139 unsigned min_after_base: 1; /* minimum address target label is
140 after BASE. */
141 unsigned max_after_base: 1; /* maximum address target label is
142 after BASE. */
143 /* Set by the actual branch shortening process - ONLY WHEN OPTIMIZING - : */
144 unsigned offset_unsigned: 1; /* offsets have to be treated as unsigned. */
145 unsigned : 2;
146 unsigned scale : 8;
147};
148
149/* Structure used to describe the attributes of a MEM. These are hashed
150 so MEMs that the same attributes share a data structure. This means
151 they cannot be modified in place. */
152class GTY(()) mem_attrs
153{
154public:
155 mem_attrs ();
156
157 /* The expression that the MEM accesses, or null if not known.
158 This expression might be larger than the memory reference itself.
159 (In other words, the MEM might access only part of the object.) */
161
162 /* The offset of the memory reference from the start of EXPR.
163 Only valid if OFFSET_KNOWN_P. */
165
166 /* The size of the memory reference in bytes. Only valid if
167 SIZE_KNOWN_P. */
169
170 /* The alias set of the memory reference. */
172
173 /* The alignment of the reference in bits. Always a multiple of
174 BITS_PER_UNIT. Note that EXPR may have a stricter alignment
175 than the memory reference itself. */
176 unsigned int align;
177
178 /* The address space that the memory reference uses. */
179 unsigned char addrspace;
180
181 /* True if OFFSET is known. */
183
184 /* True if SIZE is known. */
186};
187
188/* Structure used to describe the attributes of a REG in similar way as
189 mem_attrs does for MEM above. Note that the OFFSET field is calculated
190 in the same way as for mem_attrs, rather than in the same way as a
191 SUBREG_BYTE. For example, if a big-endian target stores a byte
192 object in the low part of a 4-byte register, the OFFSET field
193 will be -3 rather than 0. */
194
195class GTY((for_user)) reg_attrs {
196public:
197 tree decl; /* decl corresponding to REG. */
198 poly_int64 offset; /* Offset from start of DECL. */
199};
200
201/* Common union for an element of an rtx. */
202
221
222/* Describes the properties of a REG. */
223struct GTY(()) reg_info {
224 /* The value of REGNO. */
225 unsigned int regno;
226
227 /* The value of REG_NREGS. */
228 unsigned int nregs : 8;
229 unsigned int unused : 24;
230
231 /* The value of REG_ATTRS. */
233};
234
235/* This structure remembers the position of a SYMBOL_REF within an
236 object_block structure. A SYMBOL_REF only provides this information
237 if SYMBOL_REF_HAS_BLOCK_INFO_P is true. */
238struct GTY(()) block_symbol {
239 /* The usual SYMBOL_REF fields. */
240 rtunion GTY ((skip)) fld[2];
241
242 /* The block that contains this object. */
244
245 /* The offset of this object from the start of its block. It is negative
246 if the symbol has not yet been assigned an offset. */
247 HOST_WIDE_INT offset;
248};
249
250/* Describes a group of objects that are to be placed together in such
251 a way that their relative positions are known. */
252struct GTY((for_user)) object_block {
253 /* The section in which these objects should be placed. */
255
256 /* The alignment of the first object, measured in bits. */
257 unsigned int alignment;
258
259 /* The total size of the objects, measured in bytes. */
260 HOST_WIDE_INT size;
261
262 /* The SYMBOL_REFs for each object. The vector is sorted in
263 order of increasing offset and the following conditions will
264 hold for each element X:
265
266 SYMBOL_REF_HAS_BLOCK_INFO_P (X)
267 !SYMBOL_REF_ANCHOR_P (X)
268 SYMBOL_REF_BLOCK (X) == [address of this structure]
269 SYMBOL_REF_BLOCK_OFFSET (X) >= 0. */
271
272 /* All the anchor SYMBOL_REFs used to address these objects, sorted
273 in order of increasing offset, and then increasing TLS model.
274 The following conditions will hold for each element X in this vector:
275
276 SYMBOL_REF_HAS_BLOCK_INFO_P (X)
277 SYMBOL_REF_ANCHOR_P (X)
278 SYMBOL_REF_BLOCK (X) == [address of this structure]
279 SYMBOL_REF_BLOCK_OFFSET (X) >= 0. */
281};
282
284 HOST_WIDE_INT elem[1];
285};
286
287/* Number of elements of the HWIVEC if RTX is a CONST_WIDE_INT. */
288#define CWI_GET_NUM_ELEM(RTX) \
289 ((int)RTL_FLAG_CHECK1("CWI_GET_NUM_ELEM", (RTX), CONST_WIDE_INT)->u2.num_elem)
290#define CWI_PUT_NUM_ELEM(RTX, NUM) \
291 (RTL_FLAG_CHECK1("CWI_PUT_NUM_ELEM", (RTX), CONST_WIDE_INT)->u2.num_elem = (NUM))
292
296
297/* RTL expression ("rtx"). */
298
299/* The GTY "desc" and "tag" options below are a kludge: we need a desc
300 field for gengtype to recognize that inheritance is occurring,
301 so that all subclasses are redirected to the traversal hook for the
302 base class.
303 However, all of the fields are in the base class, and special-casing
304 is at work. Hence we use desc and tag of 0, generating a switch
305 statement of the form:
306 switch (0)
307 {
308 case 0: // all the work happens here
309 }
310 in order to work with the existing special-casing in gengtype. */
311
312struct GTY((desc("0"), tag("0"),
313 chain_next ("RTX_NEXT (&%h)"),
314 chain_prev ("RTX_PREV (&%h)"))) rtx_def {
315 /* The kind of value the expression has. */
316 ENUM_BITFIELD(machine_mode) mode : MACHINE_MODE_BITSIZE;
318 /* The kind of expression this is. */
319 ENUM_BITFIELD(rtx_code) code: RTX_CODE_BITSIZE;
320
321 /* 1 in a MEM if we should keep the alias set for this mem unchanged
322 when we access a component.
323 1 in a JUMP_INSN if it is a crossing jump.
324 1 in a CALL_INSN if it is a sibling call.
325 1 in a SET that is for a return.
326 In a CODE_LABEL, part of the two-bit alternate entry field.
327 1 in a CONCAT is VAL_EXPR_IS_COPIED in var-tracking.cc.
328 1 in a VALUE is SP_BASED_VALUE_P in cselib.cc.
329 1 in a SUBREG generated by LRA for reload insns.
330 1 in a REG if this is a static chain register.
331 Dumped as "/j" in RTL dumps. */
332 unsigned int jump : 1;
333 /* In a CODE_LABEL, part of the two-bit alternate entry field.
334 1 in a MEM if it cannot trap.
335 1 in a CALL_INSN logically equivalent to
336 ECF_LOOPING_CONST_OR_PURE and DECL_LOOPING_CONST_OR_PURE_P.
337 1 in a VALUE is SP_DERIVED_VALUE_P in cselib.cc.
338 Dumped as "/c" in RTL dumps. */
339 unsigned int call : 1;
340 /* 1 in a REG, MEM, or CONCAT if the value is set at most once, anywhere.
341 1 in a SUBREG used for SUBREG_PROMOTED_UNSIGNED_P.
342 1 in a SYMBOL_REF if it addresses something in the per-function
343 constants pool.
344 1 in a CALL_INSN logically equivalent to ECF_CONST and TREE_READONLY.
345 1 in a NOTE, or EXPR_LIST for a const call.
346 1 in a JUMP_INSN of an annulling branch.
347 1 in a CONCAT is VAL_EXPR_IS_CLOBBERED in var-tracking.cc.
348 1 in a preserved VALUE is PRESERVED_VALUE_P in cselib.cc.
349 1 in a clobber temporarily created for LRA.
350 Dumped as "/u" in RTL dumps. */
351 unsigned int unchanging : 1;
352 /* 1 in a MEM or ASM_OPERANDS expression if the memory reference is volatile.
353 1 in an INSN, CALL_INSN, JUMP_INSN, CODE_LABEL, BARRIER, or NOTE
354 if it has been deleted.
355 1 in a REG expression if corresponds to a variable declared by the user,
356 0 for an internally generated temporary.
357 1 in a SUBREG used for SUBREG_PROMOTED_UNSIGNED_P.
358 1 in a LABEL_REF, REG_LABEL_TARGET or REG_LABEL_OPERAND note for a
359 non-local label.
360 In a SYMBOL_REF, this flag is used for machine-specific purposes.
361 In a PREFETCH, this flag indicates that it should be considered a
362 scheduling barrier.
363 1 in a CONCAT is VAL_NEEDS_RESOLUTION in var-tracking.cc.
364 Dumped as "/v" in RTL dumps. */
365 unsigned int volatil : 1;
366 /* 1 in a REG if the register is used only in exit code a loop.
367 1 in a SUBREG expression if was generated from a variable with a
368 promoted mode.
369 1 in a CODE_LABEL if the label is used for nonlocal gotos
370 and must not be deleted even if its count is zero.
371 1 in an INSN, JUMP_INSN or CALL_INSN if this insn must be scheduled
372 together with the preceding insn. Valid only within sched.
373 1 in an INSN, JUMP_INSN, or CALL_INSN if insn is in a delay slot and
374 from the target of a branch. Valid from reorg until end of compilation;
375 cleared before used.
376
377 The name of the field is historical. It used to be used in MEMs
378 to record whether the MEM accessed part of a structure.
379 Dumped as "/s" in RTL dumps. */
380 unsigned int in_struct : 1;
381 /* At the end of RTL generation, 1 if this rtx is used. This is used for
382 copying shared structure. See `unshare_all_rtl'.
383 In a REG, this is not needed for that purpose, and used instead
384 in `leaf_renumber_regs_insn'.
385 1 in a SYMBOL_REF, means that emit_library_call
386 has used it as the function.
387 1 in a CONCAT is VAL_HOLDS_TRACK_EXPR in var-tracking.cc.
388 1 in a VALUE or DEBUG_EXPR is VALUE_RECURSED_INTO in var-tracking.cc. */
389 unsigned int used : 1;
390 /* 1 in an INSN or a SET if this rtx is related to the call frame,
391 either changing how we compute the frame address or saving and
392 restoring registers in the prologue and epilogue.
393 1 in a REG or MEM if it is a pointer.
394 1 in a SYMBOL_REF if it addresses something in the per-function
395 constant string pool.
396 1 in a VALUE is VALUE_CHANGED in var-tracking.cc.
397 Dumped as "/f" in RTL dumps. */
398 unsigned frame_related : 1;
399 /* 1 in a REG or PARALLEL that is the current function's return value.
400 1 in a SYMBOL_REF for a weak symbol.
401 1 in a CALL_INSN logically equivalent to ECF_PURE and DECL_PURE_P.
402 1 in a CONCAT is VAL_EXPR_HAS_REVERSE in var-tracking.cc.
403 1 in a VALUE or DEBUG_EXPR is NO_LOC_P in var-tracking.cc.
404 Dumped as "/i" in RTL dumps. */
405 unsigned return_val : 1;
406
407 union {
408 /* The final union field is aligned to 64 bits on LP64 hosts,
409 giving a 32-bit gap after the fields above. We optimize the
410 layout for that case and use the gap for extra code-specific
411 information. */
413 /* The ORIGINAL_REGNO of a REG. */
414 unsigned int original_regno;
416 /* The INSN_UID of an RTX_INSN-class code. */
417 int insn_uid;
419 /* The SYMBOL_REF_FLAGS of a SYMBOL_REF. */
420 unsigned int symbol_ref_flags;
422 /* The PAT_VAR_LOCATION_STATUS of a VAR_LOCATION. */
424
425 /* In a CONST_WIDE_INT (aka hwivec_def), this is the number of
426 HOST_WIDE_INTs in the hwivec_def. */
427 unsigned int num_elem;
428
429 /* Information about a CONST_VECTOR. */
430 struct
432 /* The value of CONST_VECTOR_NPATTERNS. */
433 unsigned int npatterns : 16;
435 /* The value of CONST_VECTOR_NELTS_PER_PATTERN. */
436 unsigned int nelts_per_pattern : 8;
438 /* For future expansion. */
439 unsigned int unused : 8;
440 } const_vector;
441 } GTY ((skip)) u2;
442
443 /* The first element of the operands of this rtx.
444 The number of operands and their types are controlled
445 by the `code' field, according to rtl.def. */
446 union u {
448 HOST_WIDE_INT hwint[1];
449 struct reg_info reg;
453 struct hwivec_def hwiv;
454 struct const_poly_int_def cpi;
455 } GTY ((special ("rtx_def"), desc ("GET_CODE (&%0)"))) u;
456};
457
458/* A node for constructing singly-linked lists of rtx. */
459
460struct GTY(()) rtx_expr_list : public rtx_def
461{
462private:
463 /* No extra fields, but adds invariant: (GET_CODE (X) == EXPR_LIST). */
464
465public:
466 /* Get next in list. */
467 rtx_expr_list *next () const;
468
469 /* Get at the underlying rtx. */
470 rtx element () const;
471};
472
473template <>
474template <>
475inline bool
477{
478 return rt->code == EXPR_LIST;
480
481struct GTY(()) rtx_insn_list : public rtx_def
482{
483private:
484 /* No extra fields, but adds invariant: (GET_CODE (X) == INSN_LIST).
485
486 This is an instance of:
487
488 DEF_RTL_EXPR(INSN_LIST, "insn_list", "ue", RTX_EXTRA)
489
490 i.e. a node for constructing singly-linked lists of rtx_insn *, where
491 the list is "external" to the insn (as opposed to the doubly-linked
492 list embedded within rtx_insn itself). */
493
494public:
495 /* Get next in list. */
496 rtx_insn_list *next () const;
497
498 /* Get at the underlying instruction. */
499 rtx_insn *insn () const;
500
501};
502
503template <>
504template <>
505inline bool
507{
508 return rt->code == INSN_LIST;
509}
510
511/* A node with invariant GET_CODE (X) == SEQUENCE i.e. a vector of rtx,
512 typically (but not always) of rtx_insn *, used in the late passes. */
513
514struct GTY(()) rtx_sequence : public rtx_def
515{
516private:
517 /* No extra fields, but adds invariant: (GET_CODE (X) == SEQUENCE). */
518
519public:
520 /* Get number of elements in sequence. */
521 int len () const;
522
523 /* Get i-th element of the sequence. */
524 rtx element (int index) const;
525
526 /* Get i-th element of the sequence, with a checked cast to
527 rtx_insn *. */
528 rtx_insn *insn (int index) const;
529};
530
531template <>
532template <>
533inline bool
535{
536 return rt->code == SEQUENCE;
537}
538
539template <>
540template <>
541inline bool
543{
544 return rt->code == SEQUENCE;
546
547struct GTY(()) rtx_insn : public rtx_def
548{
549public:
550 /* No extra fields, but adds the invariant:
551
552 (INSN_P (X)
553 || NOTE_P (X)
554 || JUMP_TABLE_DATA_P (X)
555 || BARRIER_P (X)
556 || LABEL_P (X))
557
558 i.e. that we must be able to use the following:
559 INSN_UID ()
560 NEXT_INSN ()
561 PREV_INSN ()
562 i.e. we have an rtx that has an INSN_UID field and can be part of
563 a linked list of insns.
564 */
565
566 /* Returns true if this insn has been deleted. */
567
568 bool deleted () const { return volatil; }
569
570 /* Mark this insn as deleted. */
571
572 void set_deleted () { volatil = true; }
573
574 /* Mark this insn as not deleted. */
575
576 void set_undeleted () { volatil = false; }
577};
578
579/* Subclasses of rtx_insn. */
580
581struct GTY(()) rtx_debug_insn : public rtx_insn
582{
583 /* No extra fields, but adds the invariant:
584 DEBUG_INSN_P (X) aka (GET_CODE (X) == DEBUG_INSN)
585 i.e. an annotation for tracking variable assignments.
586
587 This is an instance of:
588 DEF_RTL_EXPR(DEBUG_INSN, "debug_insn", "uuBeLie", RTX_INSN)
589 from rtl.def. */
591
592struct GTY(()) rtx_nonjump_insn : public rtx_insn
593{
594 /* No extra fields, but adds the invariant:
595 NONJUMP_INSN_P (X) aka (GET_CODE (X) == INSN)
596 i.e an instruction that cannot jump.
597
598 This is an instance of:
599 DEF_RTL_EXPR(INSN, "insn", "uuBeLie", RTX_INSN)
600 from rtl.def. */
602
603struct GTY(()) rtx_jump_insn : public rtx_insn
604{
605public:
606 /* No extra fields, but adds the invariant:
607 JUMP_P (X) aka (GET_CODE (X) == JUMP_INSN)
608 i.e. an instruction that can possibly jump.
609
610 This is an instance of:
611 DEF_RTL_EXPR(JUMP_INSN, "jump_insn", "uuBeLie0", RTX_INSN)
612 from rtl.def. */
613
614 /* Returns jump target of this instruction. The returned value is not
615 necessarily a code label: it may also be a RETURN or SIMPLE_RETURN
616 expression. Also, when the code label is marked "deleted", it is
617 replaced by a NOTE. In some cases the value is NULL_RTX. */
618
619 inline rtx jump_label () const;
620
621 /* Returns jump target cast to rtx_code_label *. */
622
623 inline rtx_code_label *jump_target () const;
624
625 /* Set jump target. */
626
627 inline void set_jump_target (rtx_code_label *);
629
630struct GTY(()) rtx_call_insn : public rtx_insn
631{
632 /* No extra fields, but adds the invariant:
633 CALL_P (X) aka (GET_CODE (X) == CALL_INSN)
634 i.e. an instruction that can possibly call a subroutine
635 but which will not change which instruction comes next
636 in the current function.
637
638 This is an instance of:
639 DEF_RTL_EXPR(CALL_INSN, "call_insn", "uuBeLiee", RTX_INSN)
640 from rtl.def. */
642
643struct GTY(()) rtx_jump_table_data : public rtx_insn
644{
645 /* No extra fields, but adds the invariant:
646 JUMP_TABLE_DATA_P (X) aka (GET_CODE (INSN) == JUMP_TABLE_DATA)
647 i.e. a data for a jump table, considered an instruction for
648 historical reasons.
649
650 This is an instance of:
651 DEF_RTL_EXPR(JUMP_TABLE_DATA, "jump_table_data", "uuBe0000", RTX_INSN)
652 from rtl.def. */
653
654 /* This can be either:
655
656 (a) a table of absolute jumps, in which case PATTERN (this) is an
657 ADDR_VEC with arg 0 a vector of labels, or
658
659 (b) a table of relative jumps (e.g. for -fPIC), in which case
660 PATTERN (this) is an ADDR_DIFF_VEC, with arg 0 a LABEL_REF and
661 arg 1 the vector of labels.
662
663 This method gets the underlying vec. */
664
665 inline rtvec get_labels () const;
666 inline scalar_int_mode get_data_mode () const;
668
669struct GTY(()) rtx_barrier : public rtx_insn
670{
671 /* No extra fields, but adds the invariant:
672 BARRIER_P (X) aka (GET_CODE (X) == BARRIER)
673 i.e. a marker that indicates that control will not flow through.
674
675 This is an instance of:
676 DEF_RTL_EXPR(BARRIER, "barrier", "uu00000", RTX_EXTRA)
677 from rtl.def. */
679
680struct GTY(()) rtx_code_label : public rtx_insn
681{
682 /* No extra fields, but adds the invariant:
683 LABEL_P (X) aka (GET_CODE (X) == CODE_LABEL)
684 i.e. a label in the assembler.
685
686 This is an instance of:
687 DEF_RTL_EXPR(CODE_LABEL, "code_label", "uuB00is", RTX_EXTRA)
688 from rtl.def. */
690
691struct GTY(()) rtx_note : public rtx_insn
692{
693 /* No extra fields, but adds the invariant:
694 NOTE_P(X) aka (GET_CODE (X) == NOTE)
695 i.e. a note about the corresponding source code.
696
697 This is an instance of:
698 DEF_RTL_EXPR(NOTE, "note", "uuB0ni", RTX_EXTRA)
699 from rtl.def. */
700};
702/* The size in bytes of an rtx header (code, mode and flags). */
703#define RTX_HDR_SIZE offsetof (struct rtx_def, u)
705/* The size in bytes of an rtx with code CODE. */
706#define RTX_CODE_SIZE(CODE) rtx_code_size[CODE]
707
708#define NULL_RTX (rtx) 0
709
710/* The "next" and "previous" RTX, relative to this one. */
711
712#define RTX_NEXT(X) (rtx_next[GET_CODE (X)] == 0 ? NULL \
713 : *(rtx *)(((char *)X) + rtx_next[GET_CODE (X)]))
714
715/* FIXME: the "NEXT_INSN (PREV_INSN (X)) == X" condition shouldn't be needed.
716 */
717#define RTX_PREV(X) ((INSN_P (X) \
718 || NOTE_P (X) \
719 || JUMP_TABLE_DATA_P (X) \
720 || BARRIER_P (X) \
721 || LABEL_P (X)) \
722 && PREV_INSN (as_a <rtx_insn *> (X)) != NULL \
723 && NEXT_INSN (PREV_INSN (as_a <rtx_insn *> (X))) == X \
724 ? PREV_INSN (as_a <rtx_insn *> (X)) : NULL)
725
726/* Define macros to access the `code' field of the rtx. */
728#define GET_CODE(RTX) ((enum rtx_code) (RTX)->code)
729#define PUT_CODE(RTX, CODE) ((RTX)->code = (CODE))
731#define GET_MODE(RTX) ((machine_mode) (RTX)->mode)
732#define PUT_MODE_RAW(RTX, MODE) ((RTX)->mode = (MODE))
733
734/* RTL vector. These appear inside RTX's when there is a need
735 for a variable number of things. The principle use is inside
736 PARALLEL expressions. */
738struct GTY(()) rtvec_def {
739 int num_elem; /* number of elements */
740 rtx GTY ((length ("%h.num_elem"))) elem[1];
742
743#define NULL_RTVEC (rtvec) 0
745#define GET_NUM_ELEM(RTVEC) ((RTVEC)->num_elem)
746#define PUT_NUM_ELEM(RTVEC, NUM) ((RTVEC)->num_elem = (NUM))
748/* Predicate yielding nonzero iff X is an rtx for a register. */
749#define REG_P(X) (GET_CODE (X) == REG)
751/* Predicate yielding nonzero iff X is an rtx for a memory location. */
752#define MEM_P(X) (GET_CODE (X) == MEM)
753
754#if TARGET_SUPPORTS_WIDE_INT
755
756/* Match CONST_*s that can represent compile-time constant integers. */
757#define CASE_CONST_SCALAR_INT \
758 case CONST_INT: \
759 case CONST_WIDE_INT
760
761/* Match CONST_*s for which pointer equality corresponds to value
762 equality. */
763#define CASE_CONST_UNIQUE \
764 case CONST_INT: \
765 case CONST_WIDE_INT: \
766 case CONST_POLY_INT: \
767 case CONST_DOUBLE: \
768 case CONST_FIXED
769
770/* Match all CONST_* rtxes. */
771#define CASE_CONST_ANY \
772 case CONST_INT: \
773 case CONST_WIDE_INT: \
774 case CONST_POLY_INT: \
775 case CONST_DOUBLE: \
776 case CONST_FIXED: \
777 case CONST_VECTOR
778
779#else
781/* Match CONST_*s that can represent compile-time constant integers. */
782#define CASE_CONST_SCALAR_INT \
783 case CONST_INT: \
784 case CONST_DOUBLE
785
786/* Match CONST_*s for which pointer equality corresponds to value
787 equality. */
788#define CASE_CONST_UNIQUE \
789 case CONST_INT: \
790 case CONST_DOUBLE: \
791 case CONST_FIXED
793/* Match all CONST_* rtxes. */
794#define CASE_CONST_ANY \
795 case CONST_INT: \
796 case CONST_DOUBLE: \
797 case CONST_FIXED: \
798 case CONST_VECTOR
799#endif
801/* Predicate yielding nonzero iff X is an rtx for a constant integer. */
802#define CONST_INT_P(X) (GET_CODE (X) == CONST_INT)
804/* Predicate yielding nonzero iff X is an rtx for a constant integer. */
805#define CONST_WIDE_INT_P(X) (GET_CODE (X) == CONST_WIDE_INT)
806
807/* Predicate yielding nonzero iff X is an rtx for a polynomial constant
808 integer. */
809#define CONST_POLY_INT_P(X) \
810 (NUM_POLY_INT_COEFFS > 1 && GET_CODE (X) == CONST_POLY_INT)
812/* Predicate yielding nonzero iff X is an rtx for a constant fixed-point. */
813#define CONST_FIXED_P(X) (GET_CODE (X) == CONST_FIXED)
814
815/* Predicate yielding true iff X is an rtx for a double-int
816 or floating point constant. */
817#define CONST_DOUBLE_P(X) (GET_CODE (X) == CONST_DOUBLE)
819/* Predicate yielding true iff X is an rtx for a double-int. */
820#define CONST_DOUBLE_AS_INT_P(X) \
821 (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == VOIDmode)
822
823/* Predicate yielding true iff X is an rtx for a integer const. */
824#if TARGET_SUPPORTS_WIDE_INT
825#define CONST_SCALAR_INT_P(X) \
826 (CONST_INT_P (X) || CONST_WIDE_INT_P (X))
827#else
828#define CONST_SCALAR_INT_P(X) \
829 (CONST_INT_P (X) || CONST_DOUBLE_AS_INT_P (X))
830#endif
832/* Predicate yielding true iff X is an rtx for a double-int. */
833#define CONST_DOUBLE_AS_FLOAT_P(X) \
834 (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) != VOIDmode)
836/* Predicate yielding nonzero iff X is an rtx for a constant vector. */
837#define CONST_VECTOR_P(X) (GET_CODE (X) == CONST_VECTOR)
839/* Predicate yielding nonzero iff X is a label insn. */
840#define LABEL_P(X) (GET_CODE (X) == CODE_LABEL)
842/* Predicate yielding nonzero iff X is a jump insn. */
843#define JUMP_P(X) (GET_CODE (X) == JUMP_INSN)
845/* Predicate yielding nonzero iff X is a call insn. */
846#define CALL_P(X) (GET_CODE (X) == CALL_INSN)
847
848/* 1 if RTX is a call_insn for a fake call.
849 CALL_INSN use "used" flag to indicate it's a fake call. */
850#define FAKE_CALL_P(RTX) \
851 (RTL_FLAG_CHECK1 ("FAKE_CALL_P", (RTX), CALL_INSN)->used)
853/* Predicate yielding nonzero iff X is an insn that cannot jump. */
854#define NONJUMP_INSN_P(X) (GET_CODE (X) == INSN)
856/* Predicate yielding nonzero iff X is a debug note/insn. */
857#define DEBUG_INSN_P(X) (GET_CODE (X) == DEBUG_INSN)
859/* Predicate yielding nonzero iff X is an insn that is not a debug insn. */
860#define NONDEBUG_INSN_P(X) (NONJUMP_INSN_P (X) || JUMP_P (X) || CALL_P (X))
862/* Nonzero if DEBUG_MARKER_INSN_P may possibly hold. */
863#define MAY_HAVE_DEBUG_MARKER_INSNS debug_nonbind_markers_p
864/* Nonzero if DEBUG_BIND_INSN_P may possibly hold. */
865#define MAY_HAVE_DEBUG_BIND_INSNS flag_var_tracking_assignments
866/* Nonzero if DEBUG_INSN_P may possibly hold. */
867#define MAY_HAVE_DEBUG_INSNS \
868 (MAY_HAVE_DEBUG_MARKER_INSNS || MAY_HAVE_DEBUG_BIND_INSNS)
870/* Predicate yielding nonzero iff X is a real insn. */
871#define INSN_P(X) (NONDEBUG_INSN_P (X) || DEBUG_INSN_P (X))
873/* Predicate yielding nonzero iff X is a note insn. */
874#define NOTE_P(X) (GET_CODE (X) == NOTE)
876/* Predicate yielding nonzero iff X is a barrier insn. */
877#define BARRIER_P(X) (GET_CODE (X) == BARRIER)
879/* Predicate yielding nonzero iff X is a data for a jump table. */
880#define JUMP_TABLE_DATA_P(INSN) (GET_CODE (INSN) == JUMP_TABLE_DATA)
882/* Predicate yielding nonzero iff RTX is a subreg. */
883#define SUBREG_P(RTX) (GET_CODE (RTX) == SUBREG)
885/* Predicate yielding true iff RTX is a symbol ref. */
886#define SYMBOL_REF_P(RTX) (GET_CODE (RTX) == SYMBOL_REF)
887
888template <>
889template <>
890inline bool
892{
893 return (INSN_P (rt)
894 || NOTE_P (rt)
895 || JUMP_TABLE_DATA_P (rt)
896 || BARRIER_P (rt)
897 || LABEL_P (rt));
898}
899
900template <>
901template <>
902inline bool
904{
905 return (INSN_P (rt)
906 || NOTE_P (rt)
907 || JUMP_TABLE_DATA_P (rt)
908 || BARRIER_P (rt)
909 || LABEL_P (rt));
910}
911
912template <>
913template <>
914inline bool
916{
917 return DEBUG_INSN_P (rt);
918}
919
920template <>
921template <>
922inline bool
924{
925 return NONJUMP_INSN_P (rt);
926}
927
928template <>
929template <>
930inline bool
932{
933 return JUMP_P (rt);
934}
935
936template <>
937template <>
938inline bool
940{
941 return JUMP_P (insn);
942}
943
944template <>
945template <>
946inline bool
948{
949 return CALL_P (rt);
950}
951
952template <>
953template <>
954inline bool
956{
957 return CALL_P (insn);
958}
959
960template <>
961template <>
962inline bool
964{
965 return JUMP_TABLE_DATA_P (rt);
966}
967
968template <>
969template <>
970inline bool
972{
973 return JUMP_TABLE_DATA_P (insn);
974}
975
976template <>
977template <>
978inline bool
980{
981 return BARRIER_P (rt);
982}
983
984template <>
985template <>
986inline bool
988{
989 return LABEL_P (rt);
990}
991
992template <>
993template <>
994inline bool
996{
997 return LABEL_P (insn);
998}
999
1000template <>
1001template <>
1002inline bool
1004{
1005 return NOTE_P (rt);
1006}
1007
1008template <>
1009template <>
1010inline bool
1012{
1013 return NOTE_P (insn);
1014}
1016/* Predicate yielding nonzero iff X is a return or simple_return. */
1017#define ANY_RETURN_P(X) \
1018 (GET_CODE (X) == RETURN || GET_CODE (X) == SIMPLE_RETURN)
1019
1020/* 1 if X is a unary operator. */
1021
1022#define UNARY_P(X) \
1023 (GET_RTX_CLASS (GET_CODE (X)) == RTX_UNARY)
1024
1025/* 1 if X is a binary operator. */
1026
1027#define BINARY_P(X) \
1028 ((GET_RTX_CLASS (GET_CODE (X)) & RTX_BINARY_MASK) == RTX_BINARY_RESULT)
1029
1030/* 1 if X is an arithmetic operator. */
1031
1032#define ARITHMETIC_P(X) \
1033 ((GET_RTX_CLASS (GET_CODE (X)) & RTX_ARITHMETIC_MASK) \
1034 == RTX_ARITHMETIC_RESULT)
1035
1036/* 1 if X is an arithmetic operator. */
1037
1038#define COMMUTATIVE_ARITH_P(X) \
1039 (GET_RTX_CLASS (GET_CODE (X)) == RTX_COMM_ARITH)
1040
1041/* 1 if X is a commutative arithmetic operator or a comparison operator.
1042 These two are sometimes selected together because it is possible to
1043 swap the two operands. */
1044
1045#define SWAPPABLE_OPERANDS_P(X) \
1046 ((1 << GET_RTX_CLASS (GET_CODE (X))) \
1047 & ((1 << RTX_COMM_ARITH) | (1 << RTX_COMM_COMPARE) \
1048 | (1 << RTX_COMPARE)))
1049
1050/* 1 if X is a non-commutative operator. */
1051
1052#define NON_COMMUTATIVE_P(X) \
1053 ((GET_RTX_CLASS (GET_CODE (X)) & RTX_COMMUTATIVE_MASK) \
1054 == RTX_NON_COMMUTATIVE_RESULT)
1055
1056/* 1 if X is a commutative operator on integers. */
1057
1058#define COMMUTATIVE_P(X) \
1059 ((GET_RTX_CLASS (GET_CODE (X)) & RTX_COMMUTATIVE_MASK) \
1060 == RTX_COMMUTATIVE_RESULT)
1061
1062/* 1 if X is a relational operator. */
1063
1064#define COMPARISON_P(X) \
1065 ((GET_RTX_CLASS (GET_CODE (X)) & RTX_COMPARE_MASK) == RTX_COMPARE_RESULT)
1066
1067/* 1 if X is a constant value that is an integer. */
1068
1069#define CONSTANT_P(X) \
1070 (GET_RTX_CLASS (GET_CODE (X)) == RTX_CONST_OBJ)
1072/* 1 if X is a LABEL_REF. */
1073#define LABEL_REF_P(X) \
1074 (GET_CODE (X) == LABEL_REF)
1076/* 1 if X can be used to represent an object. */
1077#define OBJECT_P(X) \
1078 ((GET_RTX_CLASS (GET_CODE (X)) & RTX_OBJ_MASK) == RTX_OBJ_RESULT)
1079
1080/* General accessor macros for accessing the fields of an rtx. */
1081
1082#if defined ENABLE_RTL_CHECKING && (GCC_VERSION >= 2007)
1083/* The bit with a star outside the statement expr and an & inside is
1084 so that N can be evaluated only once. */
1085#define RTL_CHECK1(RTX, N, C1) __extension__ \
1086(*({ __typeof (RTX) const _rtx = (RTX); const int _n = (N); \
1087 const enum rtx_code _code = GET_CODE (_rtx); \
1088 if (_n < 0 || _n >= GET_RTX_LENGTH (_code)) \
1089 rtl_check_failed_bounds (_rtx, _n, __FILE__, __LINE__, \
1090 __FUNCTION__); \
1091 if (GET_RTX_FORMAT (_code)[_n] != C1) \
1092 rtl_check_failed_type1 (_rtx, _n, C1, __FILE__, __LINE__, \
1093 __FUNCTION__); \
1094 &_rtx->u.fld[_n]; }))
1095
1096#define RTL_CHECK2(RTX, N, C1, C2) __extension__ \
1097(*({ __typeof (RTX) const _rtx = (RTX); const int _n = (N); \
1098 const enum rtx_code _code = GET_CODE (_rtx); \
1099 if (_n < 0 || _n >= GET_RTX_LENGTH (_code)) \
1100 rtl_check_failed_bounds (_rtx, _n, __FILE__, __LINE__, \
1101 __FUNCTION__); \
1102 if (GET_RTX_FORMAT (_code)[_n] != C1 \
1103 && GET_RTX_FORMAT (_code)[_n] != C2) \
1104 rtl_check_failed_type2 (_rtx, _n, C1, C2, __FILE__, __LINE__, \
1105 __FUNCTION__); \
1106 &_rtx->u.fld[_n]; }))
1107
1108#define RTL_CHECKC1(RTX, N, C) __extension__ \
1109(*({ __typeof (RTX) const _rtx = (RTX); const int _n = (N); \
1110 if (GET_CODE (_rtx) != (C)) \
1111 rtl_check_failed_code1 (_rtx, (C), __FILE__, __LINE__, \
1112 __FUNCTION__); \
1113 &_rtx->u.fld[_n]; }))
1114
1115#define RTL_CHECKC2(RTX, N, C1, C2) __extension__ \
1116(*({ __typeof (RTX) const _rtx = (RTX); const int _n = (N); \
1117 const enum rtx_code _code = GET_CODE (_rtx); \
1118 if (_code != (C1) && _code != (C2)) \
1119 rtl_check_failed_code2 (_rtx, (C1), (C2), __FILE__, __LINE__, \
1120 __FUNCTION__); \
1121 &_rtx->u.fld[_n]; }))
1122
1123#define RTL_CHECKC3(RTX, N, C1, C2, C3) __extension__ \
1124(*({ __typeof (RTX) const _rtx = (RTX); const int _n = (N); \
1125 const enum rtx_code _code = GET_CODE (_rtx); \
1126 if (_code != (C1) && _code != (C2) && _code != (C3)) \
1127 rtl_check_failed_code3 (_rtx, (C1), (C2), (C3), __FILE__, \
1128 __LINE__, __FUNCTION__); \
1129 &_rtx->u.fld[_n]; }))
1130
1131#define RTVEC_ELT(RTVEC, I) __extension__ \
1132(*({ __typeof (RTVEC) const _rtvec = (RTVEC); const int _i = (I); \
1133 if (_i < 0 || _i >= GET_NUM_ELEM (_rtvec)) \
1134 rtvec_check_failed_bounds (_rtvec, _i, __FILE__, __LINE__, \
1135 __FUNCTION__); \
1136 &_rtvec->elem[_i]; }))
1137
1138#define XWINT(RTX, N) __extension__ \
1139(*({ __typeof (RTX) const _rtx = (RTX); const int _n = (N); \
1140 const enum rtx_code _code = GET_CODE (_rtx); \
1141 if (_n < 0 || _n >= GET_RTX_LENGTH (_code)) \
1142 rtl_check_failed_bounds (_rtx, _n, __FILE__, __LINE__, \
1143 __FUNCTION__); \
1144 if (GET_RTX_FORMAT (_code)[_n] != 'w') \
1145 rtl_check_failed_type1 (_rtx, _n, 'w', __FILE__, __LINE__, \
1146 __FUNCTION__); \
1147 &_rtx->u.hwint[_n]; }))
1148
1149#define CWI_ELT(RTX, I) __extension__ \
1150(*({ __typeof (RTX) const _cwi = (RTX); \
1151 int _max = CWI_GET_NUM_ELEM (_cwi); \
1152 const int _i = (I); \
1153 if (_i < 0 || _i >= _max) \
1154 cwi_check_failed_bounds (_cwi, _i, __FILE__, __LINE__, \
1155 __FUNCTION__); \
1156 &_cwi->u.hwiv.elem[_i]; }))
1157
1158#define XCWINT(RTX, N, C) __extension__ \
1159(*({ __typeof (RTX) const _rtx = (RTX); \
1160 if (GET_CODE (_rtx) != (C)) \
1161 rtl_check_failed_code1 (_rtx, (C), __FILE__, __LINE__, \
1162 __FUNCTION__); \
1163 &_rtx->u.hwint[N]; }))
1164
1165#define XCMWINT(RTX, N, C, M) __extension__ \
1166(*({ __typeof (RTX) const _rtx = (RTX); \
1167 if (GET_CODE (_rtx) != (C) || GET_MODE (_rtx) != (M)) \
1168 rtl_check_failed_code_mode (_rtx, (C), (M), false, __FILE__, \
1169 __LINE__, __FUNCTION__); \
1170 &_rtx->u.hwint[N]; }))
1171
1172#define XCNMPRV(RTX, C, M) __extension__ \
1173({ __typeof (RTX) const _rtx = (RTX); \
1174 if (GET_CODE (_rtx) != (C) || GET_MODE (_rtx) == (M)) \
1175 rtl_check_failed_code_mode (_rtx, (C), (M), true, __FILE__, \
1176 __LINE__, __FUNCTION__); \
1177 &_rtx->u.rv; })
1178
1179#define XCNMPFV(RTX, C, M) __extension__ \
1180({ __typeof (RTX) const _rtx = (RTX); \
1181 if (GET_CODE (_rtx) != (C) || GET_MODE (_rtx) == (M)) \
1182 rtl_check_failed_code_mode (_rtx, (C), (M), true, __FILE__, \
1183 __LINE__, __FUNCTION__); \
1184 &_rtx->u.fv; })
1185
1186#define REG_CHECK(RTX) __extension__ \
1187({ __typeof (RTX) const _rtx = (RTX); \
1188 if (GET_CODE (_rtx) != REG) \
1189 rtl_check_failed_code1 (_rtx, REG, __FILE__, __LINE__, \
1190 __FUNCTION__); \
1191 &_rtx->u.reg; })
1192
1193#define BLOCK_SYMBOL_CHECK(RTX) __extension__ \
1194({ __typeof (RTX) const _symbol = (RTX); \
1195 const unsigned int flags = SYMBOL_REF_FLAGS (_symbol); \
1196 if ((flags & SYMBOL_FLAG_HAS_BLOCK_INFO) == 0) \
1197 rtl_check_failed_block_symbol (__FILE__, __LINE__, \
1198 __FUNCTION__); \
1199 &_symbol->u.block_sym; })
1200
1201#define HWIVEC_CHECK(RTX,C) __extension__ \
1202({ __typeof (RTX) const _symbol = (RTX); \
1203 RTL_CHECKC1 (_symbol, 0, C); \
1204 &_symbol->u.hwiv; })
1205
1206extern void rtl_check_failed_bounds (const_rtx, int, const char *, int,
1207 const char *)
1208 ATTRIBUTE_NORETURN ATTRIBUTE_COLD;
1209extern void rtl_check_failed_type1 (const_rtx, int, int, const char *, int,
1210 const char *)
1211 ATTRIBUTE_NORETURN ATTRIBUTE_COLD;
1212extern void rtl_check_failed_type2 (const_rtx, int, int, int, const char *,
1213 int, const char *)
1214 ATTRIBUTE_NORETURN ATTRIBUTE_COLD;
1215extern void rtl_check_failed_code1 (const_rtx, enum rtx_code, const char *,
1216 int, const char *)
1217 ATTRIBUTE_NORETURN ATTRIBUTE_COLD;
1218extern void rtl_check_failed_code2 (const_rtx, enum rtx_code, enum rtx_code,
1219 const char *, int, const char *)
1220 ATTRIBUTE_NORETURN ATTRIBUTE_COLD;
1221extern void rtl_check_failed_code3 (const_rtx, enum rtx_code, enum rtx_code,
1222 enum rtx_code, const char *, int,
1223 const char *)
1224 ATTRIBUTE_NORETURN ATTRIBUTE_COLD;
1225extern void rtl_check_failed_code_mode (const_rtx, enum rtx_code, machine_mode,
1226 bool, const char *, int, const char *)
1227 ATTRIBUTE_NORETURN ATTRIBUTE_COLD;
1228extern void rtl_check_failed_block_symbol (const char *, int, const char *)
1229 ATTRIBUTE_NORETURN ATTRIBUTE_COLD;
1230extern void cwi_check_failed_bounds (const_rtx, int, const char *, int,
1231 const char *)
1232 ATTRIBUTE_NORETURN ATTRIBUTE_COLD;
1233extern void rtvec_check_failed_bounds (const_rtvec, int, const char *, int,
1234 const char *)
1235 ATTRIBUTE_NORETURN ATTRIBUTE_COLD;
1236
1237#else /* not ENABLE_RTL_CHECKING */
1239#define RTL_CHECK1(RTX, N, C1) ((RTX)->u.fld[N])
1240#define RTL_CHECK2(RTX, N, C1, C2) ((RTX)->u.fld[N])
1241#define RTL_CHECKC1(RTX, N, C) ((RTX)->u.fld[N])
1242#define RTL_CHECKC2(RTX, N, C1, C2) ((RTX)->u.fld[N])
1243#define RTL_CHECKC3(RTX, N, C1, C2, C3) ((RTX)->u.fld[N])
1244#define RTVEC_ELT(RTVEC, I) ((RTVEC)->elem[I])
1245#define XWINT(RTX, N) ((RTX)->u.hwint[N])
1246#define CWI_ELT(RTX, I) ((RTX)->u.hwiv.elem[I])
1247#define XCWINT(RTX, N, C) ((RTX)->u.hwint[N])
1248#define XCMWINT(RTX, N, C, M) ((RTX)->u.hwint[N])
1249#define XCNMWINT(RTX, N, C, M) ((RTX)->u.hwint[N])
1250#define XCNMPRV(RTX, C, M) (&(RTX)->u.rv)
1251#define XCNMPFV(RTX, C, M) (&(RTX)->u.fv)
1252#define REG_CHECK(RTX) (&(RTX)->u.reg)
1253#define BLOCK_SYMBOL_CHECK(RTX) (&(RTX)->u.block_sym)
1254#define HWIVEC_CHECK(RTX,C) (&(RTX)->u.hwiv)
1255
1256#endif
1257
1258/* General accessor macros for accessing the flags of an rtx. */
1260/* Access an individual rtx flag, with no checking of any kind. */
1261#define RTX_FLAG(RTX, FLAG) ((RTX)->FLAG)
1262
1263#if defined ENABLE_RTL_FLAG_CHECKING && (GCC_VERSION >= 2007)
1264#define RTL_FLAG_CHECK1(NAME, RTX, C1) __extension__ \
1265({ __typeof (RTX) const _rtx = (RTX); \
1266 if (GET_CODE (_rtx) != C1) \
1267 rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
1268 __FUNCTION__); \
1269 _rtx; })
1270
1271#define RTL_FLAG_CHECK2(NAME, RTX, C1, C2) __extension__ \
1272({ __typeof (RTX) const _rtx = (RTX); \
1273 if (GET_CODE (_rtx) != C1 && GET_CODE(_rtx) != C2) \
1274 rtl_check_failed_flag (NAME,_rtx, __FILE__, __LINE__, \
1275 __FUNCTION__); \
1276 _rtx; })
1277
1278#define RTL_FLAG_CHECK3(NAME, RTX, C1, C2, C3) __extension__ \
1279({ __typeof (RTX) const _rtx = (RTX); \
1280 if (GET_CODE (_rtx) != C1 && GET_CODE(_rtx) != C2 \
1281 && GET_CODE (_rtx) != C3) \
1282 rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
1283 __FUNCTION__); \
1284 _rtx; })
1285
1286#define RTL_FLAG_CHECK4(NAME, RTX, C1, C2, C3, C4) __extension__ \
1287({ __typeof (RTX) const _rtx = (RTX); \
1288 if (GET_CODE (_rtx) != C1 && GET_CODE(_rtx) != C2 \
1289 && GET_CODE (_rtx) != C3 && GET_CODE(_rtx) != C4) \
1290 rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
1291 __FUNCTION__); \
1292 _rtx; })
1293
1294#define RTL_FLAG_CHECK5(NAME, RTX, C1, C2, C3, C4, C5) __extension__ \
1295({ __typeof (RTX) const _rtx = (RTX); \
1296 if (GET_CODE (_rtx) != C1 && GET_CODE (_rtx) != C2 \
1297 && GET_CODE (_rtx) != C3 && GET_CODE (_rtx) != C4 \
1298 && GET_CODE (_rtx) != C5) \
1299 rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
1300 __FUNCTION__); \
1301 _rtx; })
1302
1303#define RTL_FLAG_CHECK6(NAME, RTX, C1, C2, C3, C4, C5, C6) \
1304 __extension__ \
1305({ __typeof (RTX) const _rtx = (RTX); \
1306 if (GET_CODE (_rtx) != C1 && GET_CODE (_rtx) != C2 \
1307 && GET_CODE (_rtx) != C3 && GET_CODE (_rtx) != C4 \
1308 && GET_CODE (_rtx) != C5 && GET_CODE (_rtx) != C6) \
1309 rtl_check_failed_flag (NAME,_rtx, __FILE__, __LINE__, \
1310 __FUNCTION__); \
1311 _rtx; })
1312
1313#define RTL_FLAG_CHECK7(NAME, RTX, C1, C2, C3, C4, C5, C6, C7) \
1314 __extension__ \
1315({ __typeof (RTX) const _rtx = (RTX); \
1316 if (GET_CODE (_rtx) != C1 && GET_CODE (_rtx) != C2 \
1317 && GET_CODE (_rtx) != C3 && GET_CODE (_rtx) != C4 \
1318 && GET_CODE (_rtx) != C5 && GET_CODE (_rtx) != C6 \
1319 && GET_CODE (_rtx) != C7) \
1320 rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
1321 __FUNCTION__); \
1322 _rtx; })
1323
1324#define RTL_INSN_CHAIN_FLAG_CHECK(NAME, RTX) \
1325 __extension__ \
1326({ __typeof (RTX) const _rtx = (RTX); \
1327 if (!INSN_CHAIN_CODE_P (GET_CODE (_rtx))) \
1328 rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \
1329 __FUNCTION__); \
1330 _rtx; })
1331
1332extern void rtl_check_failed_flag (const char *, const_rtx, const char *,
1333 int, const char *)
1334 ATTRIBUTE_NORETURN ATTRIBUTE_COLD
1335 ;
1336
1337#else /* not ENABLE_RTL_FLAG_CHECKING */
1339#define RTL_FLAG_CHECK1(NAME, RTX, C1) (RTX)
1340#define RTL_FLAG_CHECK2(NAME, RTX, C1, C2) (RTX)
1341#define RTL_FLAG_CHECK3(NAME, RTX, C1, C2, C3) (RTX)
1342#define RTL_FLAG_CHECK4(NAME, RTX, C1, C2, C3, C4) (RTX)
1343#define RTL_FLAG_CHECK5(NAME, RTX, C1, C2, C3, C4, C5) (RTX)
1344#define RTL_FLAG_CHECK6(NAME, RTX, C1, C2, C3, C4, C5, C6) (RTX)
1345#define RTL_FLAG_CHECK7(NAME, RTX, C1, C2, C3, C4, C5, C6, C7) (RTX)
1346#define RTL_INSN_CHAIN_FLAG_CHECK(NAME, RTX) (RTX)
1347#endif
1349#define XINT(RTX, N) (RTL_CHECK2 (RTX, N, 'i', 'n').rt_int)
1350#define XUINT(RTX, N) (RTL_CHECK2 (RTX, N, 'i', 'n').rt_uint)
1351#define XLOC(RTX, N) (RTL_CHECK1 (RTX, N, 'L').rt_loc)
1352#define XSTR(RTX, N) (RTL_CHECK2 (RTX, N, 's', 'S').rt_str)
1353#define XEXP(RTX, N) (RTL_CHECK2 (RTX, N, 'e', 'u').rt_rtx)
1354#define XVEC(RTX, N) (RTL_CHECK2 (RTX, N, 'E', 'V').rt_rtvec)
1355#define XMODE(RTX, N) (RTL_CHECK1 (RTX, N, 'M').rt_type)
1356#define XTREE(RTX, N) (RTL_CHECK1 (RTX, N, 't').rt_tree)
1357#define XBBDEF(RTX, N) (RTL_CHECK1 (RTX, N, 'B').rt_bb)
1358#define XTMPL(RTX, N) (RTL_CHECK1 (RTX, N, 'T').rt_str)
1359#define XCFI(RTX, N) (RTL_CHECK1 (RTX, N, 'C').rt_cfi)
1361#define XVECEXP(RTX, N, M) RTVEC_ELT (XVEC (RTX, N), M)
1362#define XVECLEN(RTX, N) GET_NUM_ELEM (XVEC (RTX, N))
1363
1364/* These are like XINT, etc. except that they expect a '0' field instead
1365 of the normal type code. */
1367#define X0INT(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_int)
1368#define X0UINT(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_uint)
1369#define X0LOC(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_loc)
1370#define X0STR(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_str)
1371#define X0EXP(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_rtx)
1372#define X0VEC(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_rtvec)
1373#define X0MODE(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_type)
1374#define X0TREE(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_tree)
1375#define X0BBDEF(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_bb)
1376#define X0ADVFLAGS(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_addr_diff_vec_flags)
1377#define X0CSELIB(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_cselib)
1378#define X0MEMATTR(RTX, N) (RTL_CHECKC1 (RTX, N, MEM).rt_mem)
1379#define X0CONSTANT(RTX, N) (RTL_CHECK1 (RTX, N, '0').rt_constant)
1381/* Access a '0' field with any type. */
1382#define X0ANY(RTX, N) RTL_CHECK1 (RTX, N, '0')
1384#define XCINT(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_int)
1385#define XCUINT(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_uint)
1386#define XCLOC(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_loc)
1387#define XCSUBREG(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_subreg)
1388#define XCSTR(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_str)
1389#define XCEXP(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_rtx)
1390#define XCVEC(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_rtvec)
1391#define XCMODE(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_type)
1392#define XCTREE(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_tree)
1393#define XCBBDEF(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_bb)
1394#define XCCFI(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_cfi)
1395#define XCCSELIB(RTX, N, C) (RTL_CHECKC1 (RTX, N, C).rt_cselib)
1397#define XCVECEXP(RTX, N, M, C) RTVEC_ELT (XCVEC (RTX, N, C), M)
1398#define XCVECLEN(RTX, N, C) GET_NUM_ELEM (XCVEC (RTX, N, C))
1400#define XC2EXP(RTX, N, C1, C2) (RTL_CHECKC2 (RTX, N, C1, C2).rt_rtx)
1401#define XC3EXP(RTX, N, C1, C2, C3) (RTL_CHECKC3 (RTX, N, C1, C2, C3).rt_rtx)
1402
1403
1404/* Methods of rtx_expr_list. */
1405
1406inline rtx_expr_list *rtx_expr_list::next () const
1407{
1408 rtx tmp = XEXP (this, 1);
1409 return safe_as_a <rtx_expr_list *> (tmp);
1411
1412inline rtx rtx_expr_list::element () const
1413{
1414 return XEXP (this, 0);
1415}
1416
1417/* Methods of rtx_insn_list. */
1418
1419inline rtx_insn_list *rtx_insn_list::next () const
1420{
1421 rtx tmp = XEXP (this, 1);
1422 return safe_as_a <rtx_insn_list *> (tmp);
1424
1425inline rtx_insn *rtx_insn_list::insn () const
1426{
1427 rtx tmp = XEXP (this, 0);
1428 return safe_as_a <rtx_insn *> (tmp);
1429}
1430
1431/* Methods of rtx_sequence. */
1433inline int rtx_sequence::len () const
1434{
1435 return XVECLEN (this, 0);
1437
1438inline rtx rtx_sequence::element (int index) const
1439{
1440 return XVECEXP (this, 0, index);
1442
1443inline rtx_insn *rtx_sequence::insn (int index) const
1444{
1445 return as_a <rtx_insn *> (XVECEXP (this, 0, index));
1446}
1447
1448/* ACCESS MACROS for particular fields of insns. */
1449
1450/* Holds a unique number for each insn.
1451 These are not necessarily sequentially increasing. */
1452inline int INSN_UID (const_rtx insn)
1453{
1454 return RTL_INSN_CHAIN_FLAG_CHECK ("INSN_UID",
1455 (insn))->u2.insn_uid;
1456}
1457inline int& INSN_UID (rtx insn)
1458{
1459 return RTL_INSN_CHAIN_FLAG_CHECK ("INSN_UID",
1460 (insn))->u2.insn_uid;
1461}
1462
1463/* Chain insns together in sequence. */
1464
1465/* For now these are split in two: an rvalue form:
1466 PREV_INSN/NEXT_INSN
1467 and an lvalue form:
1468 SET_NEXT_INSN/SET_PREV_INSN. */
1469
1470inline rtx_insn *PREV_INSN (const rtx_insn *insn)
1471{
1472 rtx prev = XEXP (insn, 0);
1473 return safe_as_a <rtx_insn *> (prev);
1475
1476inline rtx& SET_PREV_INSN (rtx_insn *insn)
1477{
1478 return XEXP (insn, 0);
1480
1481inline rtx_insn *NEXT_INSN (const rtx_insn *insn)
1482{
1483 rtx next = XEXP (insn, 1);
1484 return safe_as_a <rtx_insn *> (next);
1486
1487inline rtx& SET_NEXT_INSN (rtx_insn *insn)
1488{
1489 return XEXP (insn, 1);
1491
1493{
1494 return XBBDEF (insn, 2);
1495}
1496
1497inline basic_block& BLOCK_FOR_INSN (rtx insn)
1498{
1499 return XBBDEF (insn, 2);
1501
1502inline void set_block_for_insn (rtx_insn *insn, basic_block bb)
1503{
1504 BLOCK_FOR_INSN (insn) = bb;
1505}
1507/* The body of an insn. */
1508inline rtx PATTERN (const_rtx insn)
1509{
1510 return XEXP (insn, 3);
1511}
1512
1513inline rtx& PATTERN (rtx insn)
1514{
1515 return XEXP (insn, 3);
1517
1518inline location_t INSN_LOCATION (const rtx_insn *insn)
1519{
1520 return XLOC (insn, 4);
1522
1523inline location_t& INSN_LOCATION (rtx_insn *insn)
1524{
1525 return XLOC (insn, 4);
1527
1528inline bool INSN_HAS_LOCATION (const rtx_insn *insn)
1529{
1531}
1533/* LOCATION of an RTX if relevant. */
1534#define RTL_LOCATION(X) (INSN_P (X) ? \
1535 INSN_LOCATION (as_a <rtx_insn *> (X)) \
1536 : UNKNOWN_LOCATION)
1537
1538/* Code number of instruction, from when it was recognized.
1539 -1 means this instruction has not been recognized yet. */
1540#define INSN_CODE(INSN) XINT (INSN, 5)
1541
1543{
1544 rtx pat = PATTERN (this);
1545 if (GET_CODE (pat) == ADDR_VEC)
1546 return XVEC (pat, 0);
1547 else
1548 return XVEC (pat, 1); /* presumably an ADDR_DIFF_VEC */
1549}
1550
1551/* Return the mode of the data in the table, which is always a scalar
1552 integer. */
1557 return as_a <scalar_int_mode> (GET_MODE (PATTERN (this)));
1558}
1559
1560/* If LABEL is followed by a jump table, return the table, otherwise
1561 return null. */
1563inline rtx_jump_table_data *
1565{
1568
1569#define RTX_FRAME_RELATED_P(RTX) \
1570 (RTL_FLAG_CHECK6 ("RTX_FRAME_RELATED_P", (RTX), DEBUG_INSN, INSN, \
1571 CALL_INSN, JUMP_INSN, BARRIER, SET)->frame_related)
1573/* 1 if JUMP RTX is a crossing jump. */
1574#define CROSSING_JUMP_P(RTX) \
1575 (RTL_FLAG_CHECK1 ("CROSSING_JUMP_P", (RTX), JUMP_INSN)->jump)
1576
1577/* 1 if RTX is a call to a const function. Built from ECF_CONST and
1578 TREE_READONLY. */
1579#define RTL_CONST_CALL_P(RTX) \
1580 (RTL_FLAG_CHECK1 ("RTL_CONST_CALL_P", (RTX), CALL_INSN)->unchanging)
1581
1582/* 1 if RTX is a call to a pure function. Built from ECF_PURE and
1583 DECL_PURE_P. */
1584#define RTL_PURE_CALL_P(RTX) \
1585 (RTL_FLAG_CHECK1 ("RTL_PURE_CALL_P", (RTX), CALL_INSN)->return_val)
1587/* 1 if RTX is a call to a const or pure function. */
1588#define RTL_CONST_OR_PURE_CALL_P(RTX) \
1589 (RTL_CONST_CALL_P (RTX) || RTL_PURE_CALL_P (RTX))
1590
1591/* 1 if RTX is a call to a looping const or pure function. Built from
1592 ECF_LOOPING_CONST_OR_PURE and DECL_LOOPING_CONST_OR_PURE_P. */
1593#define RTL_LOOPING_CONST_OR_PURE_CALL_P(RTX) \
1594 (RTL_FLAG_CHECK1 ("CONST_OR_PURE_CALL_P", (RTX), CALL_INSN)->call)
1596/* 1 if RTX is a call_insn for a sibling call. */
1597#define SIBLING_CALL_P(RTX) \
1598 (RTL_FLAG_CHECK1 ("SIBLING_CALL_P", (RTX), CALL_INSN)->jump)
1600/* 1 if RTX is a jump_insn, call_insn, or insn that is an annulling branch. */
1601#define INSN_ANNULLED_BRANCH_P(RTX) \
1602 (RTL_FLAG_CHECK1 ("INSN_ANNULLED_BRANCH_P", (RTX), JUMP_INSN)->unchanging)
1603
1604/* 1 if RTX is an insn in a delay slot and is from the target of the branch.
1605 If the branch insn has INSN_ANNULLED_BRANCH_P set, this insn should only be
1606 executed if the branch is taken. For annulled branches with this bit
1607 clear, the insn should be executed only if the branch is not taken. */
1608#define INSN_FROM_TARGET_P(RTX) \
1609 (RTL_FLAG_CHECK3 ("INSN_FROM_TARGET_P", (RTX), INSN, JUMP_INSN, \
1610 CALL_INSN)->in_struct)
1611
1612/* In an ADDR_DIFF_VEC, the flags for RTX for use by branch shortening.
1613 See the comments for ADDR_DIFF_VEC in rtl.def. */
1614#define ADDR_DIFF_VEC_FLAGS(RTX) X0ADVFLAGS (RTX, 4)
1615
1616/* In a VALUE, the value cselib has assigned to RTX.
1617 This is a "struct cselib_val", see cselib.h. */
1618#define CSELIB_VAL_PTR(RTX) X0CSELIB (RTX, 0)
1619
1620/* Holds a list of notes on what this insn does to various REGs.
1621 It is a chain of EXPR_LIST rtx's, where the second operand is the
1622 chain pointer and the first operand is the REG being described.
1623 The mode field of the EXPR_LIST contains not a real machine mode
1624 but a value from enum reg_note. */
1625#define REG_NOTES(INSN) XEXP(INSN, 6)
1626
1627/* In an ENTRY_VALUE this is the DECL_INCOMING_RTL of the argument in
1628 question. */
1629#define ENTRY_VALUE_EXP(RTX) (RTL_CHECKC1 (RTX, 0, ENTRY_VALUE).rt_rtx)
1630
1632{
1633#define DEF_REG_NOTE(NAME) NAME,
1634#include "reg-notes.def"
1635#undef DEF_REG_NOTE
1637};
1639/* Define macros to extract and insert the reg-note kind in an EXPR_LIST. */
1640#define REG_NOTE_KIND(LINK) ((enum reg_note) GET_MODE (LINK))
1641#define PUT_REG_NOTE_KIND(LINK, KIND) \
1642 PUT_MODE_RAW (LINK, (machine_mode) (KIND))
1643
1644/* Names for REG_NOTE's in EXPR_LIST insn's. */
1646extern const char * const reg_note_name[];
1647#define GET_REG_NOTE_NAME(MODE) (reg_note_name[(int) (MODE)])
1648
1649/* This field is only present on CALL_INSNs. It holds a chain of EXPR_LIST of
1650 USE, CLOBBER and SET expressions.
1651 USE expressions list the registers filled with arguments that
1652 are passed to the function.
1653 CLOBBER expressions document the registers explicitly clobbered
1654 by this CALL_INSN.
1655 SET expressions say that the return value of the call (the SET_DEST)
1656 is equivalent to a value available before the call (the SET_SRC).
1657 This kind of SET is used when the return value is predictable in
1658 advance. It is purely an optimisation hint; unlike USEs and CLOBBERs,
1659 it does not affect register liveness.
1661 Pseudo registers cannot be mentioned in this list. */
1662#define CALL_INSN_FUNCTION_USAGE(INSN) XEXP(INSN, 7)
1664/* The label-number of a code-label. The assembler label
1665 is made from `L' and the label-number printed in decimal.
1666 Label numbers are unique in a compilation. */
1667#define CODE_LABEL_NUMBER(INSN) XINT (INSN, 5)
1668
1669/* In a NOTE that is a line number, this is a string for the file name that the
1670 line is in. We use the same field to record block numbers temporarily in
1671 NOTE_INSN_BLOCK_BEG and NOTE_INSN_BLOCK_END notes. (We avoid lots of casts
1672 between ints and pointers if we use a different macro for the block number.)
1673 */
1675/* Opaque data. */
1676#define NOTE_DATA(INSN) RTL_CHECKC1 (INSN, 3, NOTE)
1677#define NOTE_DELETED_LABEL_NAME(INSN) XCSTR (INSN, 3, NOTE)
1678#define SET_INSN_DELETED(INSN) set_insn_deleted (INSN);
1679#define NOTE_BLOCK(INSN) XCTREE (INSN, 3, NOTE)
1680#define NOTE_EH_HANDLER(INSN) XCINT (INSN, 3, NOTE)
1681#define NOTE_BASIC_BLOCK(INSN) XCBBDEF (INSN, 3, NOTE)
1682#define NOTE_VAR_LOCATION(INSN) XCEXP (INSN, 3, NOTE)
1683#define NOTE_MARKER_LOCATION(INSN) XCLOC (INSN, 3, NOTE)
1684#define NOTE_CFI(INSN) XCCFI (INSN, 3, NOTE)
1685#define NOTE_LABEL_NUMBER(INSN) XCINT (INSN, 3, NOTE)
1686
1687/* In a NOTE that is a line number, this is the line number.
1688 Other kinds of NOTEs are identified by negative numbers here. */
1689#define NOTE_KIND(INSN) XCINT (INSN, 4, NOTE)
1691/* Nonzero if INSN is a note marking the beginning of a basic block. */
1692#define NOTE_INSN_BASIC_BLOCK_P(INSN) \
1693 (NOTE_P (INSN) && NOTE_KIND (INSN) == NOTE_INSN_BASIC_BLOCK)
1694
1695/* Nonzero if INSN is a debug nonbind marker note,
1696 for which NOTE_MARKER_LOCATION can be used. */
1697#define NOTE_MARKER_P(INSN) \
1698 (NOTE_P (INSN) && \
1699 (NOTE_KIND (INSN) == NOTE_INSN_BEGIN_STMT \
1700 || NOTE_KIND (INSN) == NOTE_INSN_INLINE_ENTRY))
1702/* Variable declaration and the location of a variable. */
1703#define PAT_VAR_LOCATION_DECL(PAT) (XCTREE ((PAT), 0, VAR_LOCATION))
1704#define PAT_VAR_LOCATION_LOC(PAT) (XCEXP ((PAT), 1, VAR_LOCATION))
1705
1706/* Initialization status of the variable in the location. Status
1707 can be unknown, uninitialized or initialized. See enumeration
1708 type below. */
1709#define PAT_VAR_LOCATION_STATUS(PAT) \
1710 (RTL_FLAG_CHECK1 ("PAT_VAR_LOCATION_STATUS", PAT, VAR_LOCATION) \
1711 ->u2.var_location_status)
1713/* Accessors for a NOTE_INSN_VAR_LOCATION. */
1714#define NOTE_VAR_LOCATION_DECL(NOTE) \
1715 PAT_VAR_LOCATION_DECL (NOTE_VAR_LOCATION (NOTE))
1716#define NOTE_VAR_LOCATION_LOC(NOTE) \
1717 PAT_VAR_LOCATION_LOC (NOTE_VAR_LOCATION (NOTE))
1718#define NOTE_VAR_LOCATION_STATUS(NOTE) \
1719 PAT_VAR_LOCATION_STATUS (NOTE_VAR_LOCATION (NOTE))
1720
1721/* Evaluate to TRUE if INSN is a debug insn that denotes a variable
1722 location/value tracking annotation. */
1723#define DEBUG_BIND_INSN_P(INSN) \
1724 (DEBUG_INSN_P (INSN) \
1725 && (GET_CODE (PATTERN (INSN)) \
1726 == VAR_LOCATION))
1727/* Evaluate to TRUE if INSN is a debug insn that denotes a program
1728 source location marker. */
1729#define DEBUG_MARKER_INSN_P(INSN) \
1730 (DEBUG_INSN_P (INSN) \
1731 && (GET_CODE (PATTERN (INSN)) \
1732 != VAR_LOCATION))
1733/* Evaluate to the marker kind. */
1734#define INSN_DEBUG_MARKER_KIND(INSN) \
1735 (GET_CODE (PATTERN (INSN)) == DEBUG_MARKER \
1736 ? (GET_MODE (PATTERN (INSN)) == VOIDmode \
1737 ? NOTE_INSN_BEGIN_STMT \
1738 : GET_MODE (PATTERN (INSN)) == BLKmode \
1739 ? NOTE_INSN_INLINE_ENTRY \
1740 : (enum insn_note)-1) \
1741 : (enum insn_note)-1)
1742/* Create patterns for debug markers. These and the above abstract
1743 the representation, so that it's easier to get rid of the abuse of
1744 the mode to hold the marker kind. Other marker types are
1745 envisioned, so a single bit flag won't do; maybe separate RTL codes
1746 wouldn't be a problem. */
1747#define GEN_RTX_DEBUG_MARKER_BEGIN_STMT_PAT() \
1748 gen_rtx_DEBUG_MARKER (VOIDmode)
1749#define GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT() \
1750 gen_rtx_DEBUG_MARKER (BLKmode)
1752/* The VAR_LOCATION rtx in a DEBUG_INSN. */
1753#define INSN_VAR_LOCATION(INSN) \
1754 (RTL_FLAG_CHECK1 ("INSN_VAR_LOCATION", PATTERN (INSN), VAR_LOCATION))
1755/* A pointer to the VAR_LOCATION rtx in a DEBUG_INSN. */
1756#define INSN_VAR_LOCATION_PTR(INSN) \
1757 (&PATTERN (INSN))
1759/* Accessors for a tree-expanded var location debug insn. */
1760#define INSN_VAR_LOCATION_DECL(INSN) \
1761 PAT_VAR_LOCATION_DECL (INSN_VAR_LOCATION (INSN))
1762#define INSN_VAR_LOCATION_LOC(INSN) \
1763 PAT_VAR_LOCATION_LOC (INSN_VAR_LOCATION (INSN))
1764#define INSN_VAR_LOCATION_STATUS(INSN) \
1765 PAT_VAR_LOCATION_STATUS (INSN_VAR_LOCATION (INSN))
1766
1767/* Expand to the RTL that denotes an unknown variable location in a
1768 DEBUG_INSN. */
1769#define gen_rtx_UNKNOWN_VAR_LOC() (gen_rtx_CLOBBER (VOIDmode, const0_rtx))
1771/* Determine whether X is such an unknown location. */
1772#define VAR_LOC_UNKNOWN_P(X) \
1773 (GET_CODE (X) == CLOBBER && XEXP ((X), 0) == const0_rtx)
1774
1775/* 1 if RTX is emitted after a call, but it should take effect before
1776 the call returns. */
1777#define NOTE_DURING_CALL_P(RTX) \
1778 (RTL_FLAG_CHECK1 ("NOTE_VAR_LOCATION_DURING_CALL_P", (RTX), NOTE)->call)
1780/* DEBUG_EXPR_DECL corresponding to a DEBUG_EXPR RTX. */
1781#define DEBUG_EXPR_TREE_DECL(RTX) XCTREE (RTX, 0, DEBUG_EXPR)
1783/* VAR_DECL/PARM_DECL DEBUG_IMPLICIT_PTR takes address of. */
1784#define DEBUG_IMPLICIT_PTR_DECL(RTX) XCTREE (RTX, 0, DEBUG_IMPLICIT_PTR)
1786/* PARM_DECL DEBUG_PARAMETER_REF references. */
1787#define DEBUG_PARAMETER_REF_DECL(RTX) XCTREE (RTX, 0, DEBUG_PARAMETER_REF)
1788
1789/* Codes that appear in the NOTE_KIND field for kinds of notes
1790 that are not line numbers. These codes are all negative.
1791
1792 Notice that we do not try to use zero here for any of
1793 the special note codes because sometimes the source line
1794 actually can be zero! This happens (for example) when we
1795 are generating code for the per-translation-unit constructor
1796 and destructor routines for some C++ translation unit. */
1797
1799{
1800#define DEF_INSN_NOTE(NAME) NAME,
1801#include "insn-notes.def"
1802#undef DEF_INSN_NOTE
1803
1805};
1806
1807/* Names for NOTE insn's other than line numbers. */
1809extern const char * const note_insn_name[NOTE_INSN_MAX];
1810#define GET_NOTE_INSN_NAME(NOTE_CODE) \
1811 (note_insn_name[(NOTE_CODE)])
1812
1813/* The name of a label, in case it corresponds to an explicit label
1814 in the input source code. */
1815#define LABEL_NAME(RTX) XCSTR (RTX, 6, CODE_LABEL)
1816
1817/* In jump.cc, each label contains a count of the number
1818 of LABEL_REFs that point at it, so unused labels can be deleted. */
1819#define LABEL_NUSES(RTX) XCINT (RTX, 4, CODE_LABEL)
1820
1821/* Labels carry a two-bit field composed of the ->jump and ->call
1822 bits. This field indicates whether the label is an alternate
1823 entry point, and if so, what kind. */
1826 LABEL_NORMAL = 0, /* ordinary label */
1827 LABEL_STATIC_ENTRY, /* alternate entry point, not exported */
1828 LABEL_GLOBAL_ENTRY, /* alternate entry point, exported */
1829 LABEL_WEAK_ENTRY /* alternate entry point, exported as weak symbol */
1831
1832#if defined ENABLE_RTL_FLAG_CHECKING && (GCC_VERSION > 2007)
1833
1834/* Retrieve the kind of LABEL. */
1835#define LABEL_KIND(LABEL) __extension__ \
1836({ __typeof (LABEL) const _label = (LABEL); \
1837 if (! LABEL_P (_label)) \
1838 rtl_check_failed_flag ("LABEL_KIND", _label, __FILE__, __LINE__, \
1839 __FUNCTION__); \
1840 (enum label_kind) ((_label->jump << 1) | _label->call); })
1841
1842/* Set the kind of LABEL. */
1843#define SET_LABEL_KIND(LABEL, KIND) do { \
1844 __typeof (LABEL) const _label = (LABEL); \
1845 const unsigned int _kind = (KIND); \
1846 if (! LABEL_P (_label)) \
1847 rtl_check_failed_flag ("SET_LABEL_KIND", _label, __FILE__, __LINE__, \
1848 __FUNCTION__); \
1849 _label->jump = ((_kind >> 1) & 1); \
1850 _label->call = (_kind & 1); \
1851} while (0)
1852
1853#else
1855/* Retrieve the kind of LABEL. */
1856#define LABEL_KIND(LABEL) \
1857 ((enum label_kind) (((LABEL)->jump << 1) | (LABEL)->call))
1859/* Set the kind of LABEL. */
1860#define SET_LABEL_KIND(LABEL, KIND) do { \
1861 rtx const _label = (LABEL); \
1862 const unsigned int _kind = (KIND); \
1863 _label->jump = ((_kind >> 1) & 1); \
1864 _label->call = (_kind & 1); \
1865} while (0)
1866
1867#endif /* rtl flag checking */
1868
1869#define LABEL_ALT_ENTRY_P(LABEL) (LABEL_KIND (LABEL) != LABEL_NORMAL)
1870
1871/* In jump.cc, each JUMP_INSN can point to a label that it can jump to,
1872 so that if the JUMP_INSN is deleted, the label's LABEL_NUSES can
1873 be decremented and possibly the label can be deleted. */
1874#define JUMP_LABEL(INSN) XCEXP (INSN, 7, JUMP_INSN)
1875
1876inline rtx_insn *JUMP_LABEL_AS_INSN (const rtx_insn *insn)
1877{
1878 return safe_as_a <rtx_insn *> (JUMP_LABEL (insn));
1879}
1880
1881/* Methods of rtx_jump_insn. */
1882
1883inline rtx rtx_jump_insn::jump_label () const
1884{
1885 return JUMP_LABEL (this);
1887
1889{
1892
1894{
1895 JUMP_LABEL (this) = target;
1896}
1897
1898/* Once basic blocks are found, each CODE_LABEL starts a chain that
1899 goes through all the LABEL_REFs that jump to that label. The chain
1900 eventually winds up at the CODE_LABEL: it is circular. */
1901#define LABEL_REFS(LABEL) XCEXP (LABEL, 3, CODE_LABEL)
1903/* Get the label that a LABEL_REF references. */
1904inline rtx_insn *
1906{
1907 return as_a<rtx_insn *> (XCEXP (ref, 0, LABEL_REF));
1908}
1909
1910/* Set the label that LABEL_REF ref refers to. */
1912inline void
1913set_label_ref_label (rtx ref, rtx_insn *label)
1914{
1915 XCEXP (ref, 0, LABEL_REF) = label;
1916}
1917
1918/* For a REG rtx, REGNO extracts the register number. REGNO can only
1919 be used on RHS. Use SET_REGNO to change the value. */
1920#define REGNO(RTX) (rhs_regno(RTX))
1921#define SET_REGNO(RTX, N) (df_ref_change_reg_with_loc (RTX, N))
1922
1923/* Return the number of consecutive registers in a REG. This is always
1924 1 for pseudo registers and is determined by TARGET_HARD_REGNO_NREGS for
1925 hard registers. */
1926#define REG_NREGS(RTX) (REG_CHECK (RTX)->nregs)
1927
1928/* ORIGINAL_REGNO holds the number the register originally had; for a
1929 pseudo register turned into a hard reg this will hold the old pseudo
1930 register number. */
1931#define ORIGINAL_REGNO(RTX) \
1932 (RTL_FLAG_CHECK1 ("ORIGINAL_REGNO", (RTX), REG)->u2.original_regno)
1933
1934/* Force the REGNO macro to only be used on the lhs. */
1935inline unsigned int
1937{
1938 return REG_CHECK (x)->regno;
1939}
1940
1941/* Return the final register in REG X plus one. */
1942inline unsigned int
1944{
1945 return REGNO (x) + REG_NREGS (x);
1946}
1947
1948/* Change the REGNO and REG_NREGS of REG X to the specified values,
1949 bypassing the df machinery. */
1950inline void
1951set_regno_raw (rtx x, unsigned int regno, unsigned int nregs)
1952{
1953 reg_info *reg = REG_CHECK (x);
1954 reg->regno = regno;
1955 reg->nregs = nregs;
1956}
1957
1958/* 1 if RTX is a reg or parallel that is the current function's return
1959 value. */
1960#define REG_FUNCTION_VALUE_P(RTX) \
1961 (RTL_FLAG_CHECK2 ("REG_FUNCTION_VALUE_P", (RTX), REG, PARALLEL)->return_val)
1963/* 1 if RTX is a reg that corresponds to a variable declared by the user. */
1964#define REG_USERVAR_P(RTX) \
1965 (RTL_FLAG_CHECK1 ("REG_USERVAR_P", (RTX), REG)->volatil)
1967/* 1 if RTX is a reg that holds a pointer value. */
1968#define REG_POINTER(RTX) \
1969 (RTL_FLAG_CHECK1 ("REG_POINTER", (RTX), REG)->frame_related)
1971/* 1 if RTX is a mem that holds a pointer value. */
1972#define MEM_POINTER(RTX) \
1973 (RTL_FLAG_CHECK1 ("MEM_POINTER", (RTX), MEM)->frame_related)
1975/* 1 if the given register REG corresponds to a hard register. */
1976#define HARD_REGISTER_P(REG) HARD_REGISTER_NUM_P (REGNO (REG))
1978/* 1 if the given register number REG_NO corresponds to a hard register. */
1979#define HARD_REGISTER_NUM_P(REG_NO) ((REG_NO) < FIRST_PSEUDO_REGISTER)
1981/* 1 if the given register REG corresponds to a virtual register. */
1982#define VIRTUAL_REGISTER_P(REG) VIRTUAL_REGISTER_NUM_P (REGNO (REG))
1984/* 1 if the given register number REG_NO corresponds to a virtual register. */
1985#define VIRTUAL_REGISTER_NUM_P(REG_NO) \
1986 IN_RANGE (REG_NO, FIRST_VIRTUAL_REGISTER, LAST_VIRTUAL_REGISTER)
1988/* For a CONST_INT rtx, INTVAL extracts the integer. */
1989#define INTVAL(RTX) XCWINT (RTX, 0, CONST_INT)
1990#define UINTVAL(RTX) ((unsigned HOST_WIDE_INT) INTVAL (RTX))
1991
1992/* For a CONST_WIDE_INT, CONST_WIDE_INT_NUNITS is the number of
1993 elements actually needed to represent the constant.
1994 CONST_WIDE_INT_ELT gets one of the elements. 0 is the least
1995 significant HOST_WIDE_INT. */
1996#define CONST_WIDE_INT_VEC(RTX) HWIVEC_CHECK (RTX, CONST_WIDE_INT)
1997#define CONST_WIDE_INT_NUNITS(RTX) CWI_GET_NUM_ELEM (RTX)
1998#define CONST_WIDE_INT_ELT(RTX, N) CWI_ELT (RTX, N)
1999
2000/* For a CONST_POLY_INT, CONST_POLY_INT_COEFFS gives access to the
2001 individual coefficients, in the form of a trailing_wide_ints structure. */
2002#define CONST_POLY_INT_COEFFS(RTX) \
2003 (RTL_FLAG_CHECK1("CONST_POLY_INT_COEFFS", (RTX), \
2004 CONST_POLY_INT)->u.cpi.coeffs)
2005
2006/* For a CONST_DOUBLE:
2007#if TARGET_SUPPORTS_WIDE_INT == 0
2008 For a VOIDmode, there are two integers CONST_DOUBLE_LOW is the
2009 low-order word and ..._HIGH the high-order.
2010#endif
2011 For a float, there is a REAL_VALUE_TYPE structure, and
2012 CONST_DOUBLE_REAL_VALUE(r) is a pointer to it. */
2013#define CONST_DOUBLE_LOW(r) XCMWINT (r, 0, CONST_DOUBLE, VOIDmode)
2014#define CONST_DOUBLE_HIGH(r) XCMWINT (r, 1, CONST_DOUBLE, VOIDmode)
2015#define CONST_DOUBLE_REAL_VALUE(r) \
2016 ((const struct real_value *) XCNMPRV (r, CONST_DOUBLE, VOIDmode))
2017
2018#define CONST_FIXED_VALUE(r) \
2019 ((const struct fixed_value *) XCNMPFV (r, CONST_FIXED, VOIDmode))
2020#define CONST_FIXED_VALUE_HIGH(r) \
2021 ((HOST_WIDE_INT) (CONST_FIXED_VALUE (r)->data.high))
2022#define CONST_FIXED_VALUE_LOW(r) \
2023 ((HOST_WIDE_INT) (CONST_FIXED_VALUE (r)->data.low))
2025/* For a CONST_VECTOR, return element #n. */
2026#define CONST_VECTOR_ELT(RTX, N) const_vector_elt (RTX, N)
2028/* See rtl.texi for a description of these macros. */
2029#define CONST_VECTOR_NPATTERNS(RTX) \
2030 (RTL_FLAG_CHECK1 ("CONST_VECTOR_NPATTERNS", (RTX), CONST_VECTOR) \
2031 ->u2.const_vector.npatterns)
2032
2033#define CONST_VECTOR_NELTS_PER_PATTERN(RTX) \
2034 (RTL_FLAG_CHECK1 ("CONST_VECTOR_NELTS_PER_PATTERN", (RTX), CONST_VECTOR) \
2035 ->u2.const_vector.nelts_per_pattern)
2036
2037#define CONST_VECTOR_DUPLICATE_P(RTX) \
2038 (CONST_VECTOR_NELTS_PER_PATTERN (RTX) == 1)
2039
2040#define CONST_VECTOR_STEPPED_P(RTX) \
2041 (CONST_VECTOR_NELTS_PER_PATTERN (RTX) == 3)
2042
2043#define CONST_VECTOR_ENCODED_ELT(RTX, N) XCVECEXP (RTX, 0, N, CONST_VECTOR)
2044
2045/* Return the number of elements encoded directly in a CONST_VECTOR. */
2047inline unsigned int
2049{
2051}
2053/* For a CONST_VECTOR, return the number of elements in a vector. */
2054#define CONST_VECTOR_NUNITS(RTX) GET_MODE_NUNITS (GET_MODE (RTX))
2055
2056/* For a SUBREG rtx, SUBREG_REG extracts the value we want a subreg of.
2057 SUBREG_BYTE extracts the byte-number. */
2059#define SUBREG_REG(RTX) XCEXP (RTX, 0, SUBREG)
2060#define SUBREG_BYTE(RTX) XCSUBREG (RTX, 1, SUBREG)
2061
2062/* in rtlanal.cc */
2063/* Return the right cost to give to an operation
2064 to make the cost of the corresponding register-to-register instruction
2065 N times that of a fast register-to-register instruction. */
2066#define COSTS_N_INSNS(N) ((N) * 4)
2067
2068/* Maximum cost of an rtl expression. This value has the special meaning
2069 not to use an rtx with this cost under any circumstances. */
2070#define MAX_COST INT_MAX
2071
2072/* Return true if CODE always has VOIDmode. */
2074inline bool
2075always_void_p (enum rtx_code code)
2076{
2077 return code == SET;
2078}
2079
2080/* A structure to hold all available cost information about an rtl
2081 expression. */
2084 int speed;
2085 int size;
2086};
2087
2088/* Initialize a full_rtx_costs structure C to the maximum cost. */
2089inline void
2091{
2092 c->speed = MAX_COST;
2093 c->size = MAX_COST;
2094}
2095
2096/* Initialize a full_rtx_costs structure C to zero cost. */
2097inline void
2099{
2100 c->speed = 0;
2101 c->size = 0;
2102}
2103
2104/* Compare two full_rtx_costs structures A and B, returning true
2105 if A < B when optimizing for speed. */
2106inline bool
2107costs_lt_p (struct full_rtx_costs *a, struct full_rtx_costs *b,
2108 bool speed)
2109{
2110 if (speed)
2111 return (a->speed < b->speed
2112 || (a->speed == b->speed && a->size < b->size));
2113 else
2114 return (a->size < b->size
2115 || (a->size == b->size && a->speed < b->speed));
2116}
2117
2118/* Increase both members of the full_rtx_costs structure C by the
2119 cost of N insns. */
2120inline void
2121costs_add_n_insns (struct full_rtx_costs *c, int n)
2122{
2123 c->speed += COSTS_N_INSNS (n);
2124 c->size += COSTS_N_INSNS (n);
2125}
2126
2127/* Describes the shape of a subreg:
2128
2129 inner_mode == the mode of the SUBREG_REG
2130 offset == the SUBREG_BYTE
2131 outer_mode == the mode of the SUBREG itself. */
2132class subreg_shape {
2133public:
2134 subreg_shape (machine_mode, poly_uint16, machine_mode);
2135 bool operator == (const subreg_shape &) const;
2136 bool operator != (const subreg_shape &) const;
2137 unsigned HOST_WIDE_INT unique_id () const;
2139 machine_mode inner_mode;
2141 machine_mode outer_mode;
2142};
2144inline
2145subreg_shape::subreg_shape (machine_mode inner_mode_in,
2146 poly_uint16 offset_in,
2147 machine_mode outer_mode_in)
2148 : inner_mode (inner_mode_in), offset (offset_in), outer_mode (outer_mode_in)
2149{}
2151inline bool
2152subreg_shape::operator == (const subreg_shape &other) const
2153{
2154 return (inner_mode == other.inner_mode
2155 && known_eq (offset, other.offset)
2156 && outer_mode == other.outer_mode);
2157}
2159inline bool
2160subreg_shape::operator != (const subreg_shape &other) const
2161{
2162 return !operator == (other);
2163}
2164
2165/* Return an integer that uniquely identifies this shape. Structures
2166 like rtx_def assume that a mode can fit in an 8-bit bitfield and no
2167 current mode is anywhere near being 65536 bytes in size, so the
2168 id comfortably fits in an int. */
2170inline unsigned HOST_WIDE_INT
2172{
2173 { STATIC_ASSERT (MAX_MACHINE_MODE <= (1 << MACHINE_MODE_BITSIZE)); }
2175 { STATIC_ASSERT (sizeof (offset.coeffs[0]) <= 2); }
2176 int res = (int) inner_mode + ((int) outer_mode << 8);
2177 for (int i = 0; i < NUM_POLY_INT_COEFFS; ++i)
2178 res += (HOST_WIDE_INT) offset.coeffs[i] << ((1 + i) * 16);
2179 return res;
2180}
2181
2182/* Return the shape of a SUBREG rtx. */
2184inline subreg_shape
2186{
2187 return subreg_shape (GET_MODE (SUBREG_REG (x)),
2188 SUBREG_BYTE (x), GET_MODE (x));
2189}
2190
2191/* Information about an address. This structure is supposed to be able
2192 to represent all supported target addresses. Please extend it if it
2193 is not yet general enough. */
2194struct address_info {
2195 /* The mode of the value being addressed, or VOIDmode if this is
2196 a load-address operation with no known address mode. */
2197 machine_mode mode;
2199 /* The address space. */
2202 /* True if this is an RTX_AUTOINC address. */
2203 bool autoinc_p;
2205 /* A pointer to the top-level address. */
2206 rtx *outer;
2207
2208 /* A pointer to the inner address, after all address mutations
2209 have been stripped from the top-level address. It can be one
2210 of the following:
2211
2212 - A {PRE,POST}_{INC,DEC} of *BASE. SEGMENT, INDEX and DISP are null.
2213
2214 - A {PRE,POST}_MODIFY of *BASE. In this case either INDEX or DISP
2215 points to the step value, depending on whether the step is variable
2216 or constant respectively. SEGMENT is null.
2217
2218 - A plain sum of the form SEGMENT + BASE + INDEX + DISP,
2219 with null fields evaluating to 0. */
2220 rtx *inner;
2221
2222 /* Components that make up *INNER. Each one may be null or nonnull.
2223 When nonnull, their meanings are as follows:
2224
2225 - *SEGMENT is the "segment" of memory to which the address refers.
2226 This value is entirely target-specific and is only called a "segment"
2227 because that's its most typical use. It contains exactly one UNSPEC,
2228 pointed to by SEGMENT_TERM. The contents of *SEGMENT do not need
2229 reloading.
2230
2231 - *BASE is a variable expression representing a base address.
2232 It contains exactly one "term", pointed to by BASE_TERM.
2233 This term can be one of the following:
2234
2235 (1) a REG, or a SUBREG of a REG
2236 (2) an eliminated REG (a PLUS of (1) and a constant)
2237 (3) a MEM, or a SUBREG of a MEM
2238 (4) a SCRATCH
2239
2240 This term is the one that base_reg_class constrains.
2241
2242 - *INDEX is a variable expression representing an index value.
2243 It may be a scaled expression, such as a MULT. It has exactly
2244 one "term", pointed to by INDEX_TERM. The possible terms are
2245 the same as for BASE. This term is the one that index_reg_class
2246 constrains.
2247
2248 - *DISP is a constant, possibly mutated. DISP_TERM points to the
2249 unmutated RTX_CONST_OBJ. */
2252 rtx *index;
2257 rtx *index_term;
2258 rtx *disp_term;
2259
2260 /* In a {PRE,POST}_MODIFY address, this points to a second copy
2261 of BASE_TERM, otherwise it is null. */
2262 rtx *base_term2;
2263
2264 /* ADDRESS if this structure describes an address operand, MEM if
2265 it describes a MEM address. */
2268 /* If BASE is nonnull, this is the code of the rtx that contains it. */
2270};
2271
2272/* This is used to bundle an rtx and a mode together so that the pair
2273 can be used with the wi:: routines. If we ever put modes into rtx
2274 integer constants, this should go away and then just pass an rtx in. */
2275typedef std::pair <rtx, machine_mode> rtx_mode_t;
2276
2277namespace wi
2279 template <>
2282 static const enum precision_type precision_type = VAR_PRECISION;
2283 static const bool host_dependent_precision = false;
2284 /* This ought to be true, except for the special case that BImode
2285 is canonicalized to STORE_FLAG_VALUE, which might be 1. */
2286 static const bool is_sign_extended = false;
2287 static const bool needs_write_val_arg = false;
2288 static unsigned int get_precision (const rtx_mode_t &);
2289 static wi::storage_ref decompose (HOST_WIDE_INT *, unsigned int,
2290 const rtx_mode_t &);
2291 };
2292}
2294inline unsigned int
2296{
2297 return GET_MODE_PRECISION (as_a <scalar_mode> (x.second));
2298}
2300inline wi::storage_ref
2302 unsigned int precision,
2303 const rtx_mode_t &x)
2304{
2306 switch (GET_CODE (x.first))
2307 {
2308 case CONST_INT:
2310 /* Nonzero BImodes are stored as STORE_FLAG_VALUE, which on many
2311 targets is 1 rather than -1. */
2312 gcc_checking_assert (INTVAL (x.first)
2313 == sext_hwi (INTVAL (x.first), precision)
2314 || (x.second == BImode && INTVAL (x.first) == 1));
2315
2316 return wi::storage_ref (&INTVAL (x.first), 1, precision);
2317
2318 case CONST_WIDE_INT:
2319 return wi::storage_ref (&CONST_WIDE_INT_ELT (x.first, 0),
2320 CONST_WIDE_INT_NUNITS (x.first), precision);
2321
2322#if TARGET_SUPPORTS_WIDE_INT == 0
2323 case CONST_DOUBLE:
2324 return wi::storage_ref (&CONST_DOUBLE_LOW (x.first), 2, precision);
2325#endif
2326
2327 default:
2328 gcc_unreachable ();
2329 }
2330}
2331
2332namespace wi
2333{
2334 hwi_with_prec shwi (HOST_WIDE_INT, machine_mode mode);
2335 wide_int min_value (machine_mode, signop);
2336 wide_int max_value (machine_mode, signop);
2337}
2339inline wi::hwi_with_prec
2340wi::shwi (HOST_WIDE_INT val, machine_mode mode)
2341{
2342 return shwi (val, GET_MODE_PRECISION (as_a <scalar_mode> (mode)));
2343}
2344
2345/* Produce the smallest number that is represented in MODE. The precision
2346 is taken from MODE and the sign from SGN. */
2347inline wide_int
2348wi::min_value (machine_mode mode, signop sgn)
2349{
2350 return min_value (GET_MODE_PRECISION (as_a <scalar_mode> (mode)), sgn);
2351}
2352
2353/* Produce the largest number that is represented in MODE. The precision
2354 is taken from MODE and the sign from SGN. */
2355inline wide_int
2356wi::max_value (machine_mode mode, signop sgn)
2357{
2358 return max_value (GET_MODE_PRECISION (as_a <scalar_mode> (mode)), sgn);
2359}
2360
2361namespace wi
2362{
2364 generic_wide_int <wide_int_ref_storage <false, false> > >
2367}
2368
2369/* Return the value of a CONST_POLY_INT in its native precision. */
2373{
2375 for (unsigned int i = 0; i < NUM_POLY_INT_COEFFS; ++i)
2376 res.coeffs[i] = CONST_POLY_INT_COEFFS (x)[i];
2377 return res;
2378}
2379
2380/* Return true if X is a scalar integer or a CONST_POLY_INT. The value
2381 can then be extracted using wi::to_poly_wide. */
2383inline bool
2385{
2386 return CONST_SCALAR_INT_P (x) || CONST_POLY_INT_P (x);
2387}
2388
2389/* Access X (which satisfies poly_int_rtx_p) as a poly_wide_int.
2390 MODE is the mode of X. */
2393wi::to_poly_wide (const_rtx x, machine_mode mode)
2394{
2395 if (CONST_POLY_INT_P (x))
2396 return const_poly_int_value (x);
2397 return rtx_mode_t (const_cast<rtx> (x), mode);
2398}
2399
2400/* Return the value of X as a poly_int64. */
2402inline poly_int64
2404{
2405 if (CONST_POLY_INT_P (x))
2406 {
2407 poly_int64 res;
2408 for (unsigned int i = 0; i < NUM_POLY_INT_COEFFS; ++i)
2409 res.coeffs[i] = CONST_POLY_INT_COEFFS (x)[i].to_shwi ();
2410 return res;
2411 }
2412 return INTVAL (x);
2413}
2414
2415/* Return true if arbitrary value X is an integer constant that can
2416 be represented as a poly_int64. Store the value in *RES if so,
2417 otherwise leave it unmodified. */
2419inline bool
2421{
2422 if (CONST_INT_P (x))
2423 {
2424 *res = INTVAL (x);
2425 return true;
2426 }
2427 if (CONST_POLY_INT_P (x))
2428 {
2429 for (unsigned int i = 0; i < NUM_POLY_INT_COEFFS; ++i)
2431 return false;
2432 for (unsigned int i = 0; i < NUM_POLY_INT_COEFFS; ++i)
2433 res->coeffs[i] = CONST_POLY_INT_COEFFS (x)[i].to_shwi ();
2434 return true;
2435 }
2436 return false;
2437}
2438
2439extern void init_rtlanal (void);
2440extern int rtx_cost (rtx, machine_mode, enum rtx_code, int, bool);
2441extern int address_cost (rtx, machine_mode, addr_space_t, bool);
2442extern void get_full_rtx_cost (rtx, machine_mode, enum rtx_code, int,
2443 struct full_rtx_costs *);
2444extern bool native_encode_rtx (machine_mode, rtx, vec<target_unit> &,
2445 unsigned int, unsigned int);
2446extern wide_int native_decode_int (const vec<target_unit> &, unsigned int,
2447 unsigned int, unsigned int);
2448extern rtx native_decode_rtx (machine_mode, const vec<target_unit> &,
2449 unsigned int);
2450extern rtx native_decode_vector_rtx (machine_mode, const vec<target_unit> &,
2451 unsigned int, unsigned int, unsigned int);
2455 poly_uint64);
2456extern bool read_modify_subreg_p (const_rtx);
2457
2458/* Given a subreg's OUTER_MODE, INNER_MODE, and SUBREG_BYTE, return the
2459 bit offset at which the subreg begins (counting from the least significant
2460 bit of the operand). */
2462inline poly_uint64
2463subreg_lsb_1 (machine_mode outer_mode, machine_mode inner_mode,
2464 poly_uint64 subreg_byte)
2465{
2466 return subreg_size_lsb (GET_MODE_SIZE (outer_mode),
2467 GET_MODE_SIZE (inner_mode), subreg_byte);
2468}
2469
2470/* Return the subreg byte offset for a subreg whose outer mode is
2471 OUTER_MODE, whose inner mode is INNER_MODE, and where there are
2472 LSB_SHIFT *bits* between the lsb of the outer value and the lsb of
2473 the inner value. This is the inverse of subreg_lsb_1 (which converts
2474 byte offsets to bit shifts). */
2476inline poly_uint64
2477subreg_offset_from_lsb (machine_mode outer_mode,
2478 machine_mode inner_mode,
2479 poly_uint64 lsb_shift)
2480{
2481 return subreg_size_offset_from_lsb (GET_MODE_SIZE (outer_mode),
2482 GET_MODE_SIZE (inner_mode), lsb_shift);
2483}
2484
2485extern unsigned int subreg_regno_offset (unsigned int, machine_mode,
2486 poly_uint64, machine_mode);
2487extern bool subreg_offset_representable_p (unsigned int, machine_mode,
2488 poly_uint64, machine_mode);
2489extern unsigned int subreg_regno (const_rtx);
2490extern int simplify_subreg_regno (unsigned int, machine_mode,
2491 poly_uint64, machine_mode);
2492extern int lowpart_subreg_regno (unsigned int, machine_mode,
2493 machine_mode);
2494extern unsigned int subreg_nregs (const_rtx);
2495extern unsigned int subreg_nregs_with_regno (unsigned int, const_rtx);
2496extern unsigned HOST_WIDE_INT nonzero_bits (const_rtx, machine_mode);
2497extern unsigned int num_sign_bit_copies (const_rtx, machine_mode);
2498extern bool constant_pool_constant_p (rtx);
2499extern bool truncated_to_mode (machine_mode, const_rtx);
2500extern int low_bitmask_len (machine_mode, unsigned HOST_WIDE_INT);
2501extern void split_double (rtx, rtx *, rtx *);
2502extern rtx *strip_address_mutations (rtx *, enum rtx_code * = 0);
2503extern void decompose_address (struct address_info *, rtx *,
2504 machine_mode, addr_space_t, enum rtx_code);
2505extern void decompose_lea_address (struct address_info *, rtx *);
2506extern void decompose_mem_address (struct address_info *, rtx);
2507extern void update_address (struct address_info *);
2508extern HOST_WIDE_INT get_index_scale (const struct address_info *);
2509extern enum rtx_code get_index_code (const struct address_info *);
2510
2511/* 1 if RTX is a subreg containing a reg that is already known to be
2512 sign- or zero-extended from the mode of the subreg to the mode of
2513 the reg. SUBREG_PROMOTED_UNSIGNED_P gives the signedness of the
2514 extension.
2515
2516 When used as a LHS, is means that this extension must be done
2517 when assigning to SUBREG_REG. */
2518
2519#define SUBREG_PROMOTED_VAR_P(RTX) \
2520 (RTL_FLAG_CHECK1 ("SUBREG_PROMOTED", (RTX), SUBREG)->in_struct)
2521
2522/* Valid for subregs which are SUBREG_PROMOTED_VAR_P(). In that case
2523 this gives the necessary extensions:
2524 0 - signed (SPR_SIGNED)
2525 1 - normal unsigned (SPR_UNSIGNED)
2526 2 - value is both sign and unsign extended for mode
2527 (SPR_SIGNED_AND_UNSIGNED).
2528 -1 - pointer unsigned, which most often can be handled like unsigned
2529 extension, except for generating instructions where we need to
2530 emit special code (ptr_extend insns) on some architectures
2531 (SPR_POINTER). */
2533const int SRP_POINTER = -1;
2534const int SRP_SIGNED = 0;
2535const int SRP_UNSIGNED = 1;
2536const int SRP_SIGNED_AND_UNSIGNED = 2;
2538/* Sets promoted mode for SUBREG_PROMOTED_VAR_P(). */
2539#define SUBREG_PROMOTED_SET(RTX, VAL) \
2540do { \
2541 rtx const _rtx = RTL_FLAG_CHECK1 ("SUBREG_PROMOTED_SET", \
2542 (RTX), SUBREG); \
2543 switch (VAL) \
2544 { \
2545 case SRP_POINTER: \
2546 _rtx->volatil = 0; \
2547 _rtx->unchanging = 0; \
2548 break; \
2549 case SRP_SIGNED: \
2550 _rtx->volatil = 0; \
2551 _rtx->unchanging = 1; \
2552 break; \
2553 case SRP_UNSIGNED: \
2554 _rtx->volatil = 1; \
2555 _rtx->unchanging = 0; \
2556 break; \
2557 case SRP_SIGNED_AND_UNSIGNED: \
2558 _rtx->volatil = 1; \
2559 _rtx->unchanging = 1; \
2560 break; \
2561 } \
2562} while (0)
2563
2564/* Gets the value stored in promoted mode for SUBREG_PROMOTED_VAR_P(),
2565 including SRP_SIGNED_AND_UNSIGNED if promoted for
2566 both signed and unsigned. */
2567#define SUBREG_PROMOTED_GET(RTX) \
2568 (2 * (RTL_FLAG_CHECK1 ("SUBREG_PROMOTED_GET", (RTX), SUBREG)->volatil)\
2569 + (RTX)->unchanging - 1)
2571/* Returns sign of promoted mode for SUBREG_PROMOTED_VAR_P(). */
2572#define SUBREG_PROMOTED_SIGN(RTX) \
2573 ((RTL_FLAG_CHECK1 ("SUBREG_PROMOTED_SIGN", (RTX), SUBREG)->volatil) ? 1\
2574 : (RTX)->unchanging - 1)
2575
2576/* Predicate to check if RTX of SUBREG_PROMOTED_VAR_P() is promoted
2577 for SIGNED type. */
2578#define SUBREG_PROMOTED_SIGNED_P(RTX) \
2579 (RTL_FLAG_CHECK1 ("SUBREG_PROMOTED_SIGNED_P", (RTX), SUBREG)->unchanging)
2580
2581/* Predicate to check if RTX of SUBREG_PROMOTED_VAR_P() is promoted
2582 for UNSIGNED type. */
2583#define SUBREG_PROMOTED_UNSIGNED_P(RTX) \
2584 (RTL_FLAG_CHECK1 ("SUBREG_PROMOTED_UNSIGNED_P", (RTX), SUBREG)->volatil)
2586/* Checks if RTX of SUBREG_PROMOTED_VAR_P() is promoted for given SIGN. */
2587#define SUBREG_CHECK_PROMOTED_SIGN(RTX, SIGN) \
2588((SIGN) == SRP_POINTER ? SUBREG_PROMOTED_GET (RTX) == SRP_POINTER \
2589 : (SIGN) == SRP_SIGNED ? SUBREG_PROMOTED_SIGNED_P (RTX) \
2590 : SUBREG_PROMOTED_UNSIGNED_P (RTX))
2592/* True if the REG is the static chain register for some CALL_INSN. */
2593#define STATIC_CHAIN_REG_P(RTX) \
2594 (RTL_FLAG_CHECK1 ("STATIC_CHAIN_REG_P", (RTX), REG)->jump)
2595
2596/* True if the subreg was generated by LRA for reload insns. Such
2597 subregs are valid only during LRA. */
2598#define LRA_SUBREG_P(RTX) \
2599 (RTL_FLAG_CHECK1 ("LRA_SUBREG_P", (RTX), SUBREG)->jump)
2600
2601/* Access various components of an ASM_OPERANDS rtx. */
2603#define ASM_OPERANDS_TEMPLATE(RTX) XCSTR (RTX, 0, ASM_OPERANDS)
2604#define ASM_OPERANDS_OUTPUT_CONSTRAINT(RTX) XCSTR (RTX, 1, ASM_OPERANDS)
2605#define ASM_OPERANDS_OUTPUT_IDX(RTX) XCINT (RTX, 2, ASM_OPERANDS)
2606#define ASM_OPERANDS_INPUT_VEC(RTX) XCVEC (RTX, 3, ASM_OPERANDS)
2607#define ASM_OPERANDS_INPUT_CONSTRAINT_VEC(RTX) XCVEC (RTX, 4, ASM_OPERANDS)
2608#define ASM_OPERANDS_INPUT(RTX, N) XCVECEXP (RTX, 3, N, ASM_OPERANDS)
2609#define ASM_OPERANDS_INPUT_LENGTH(RTX) XCVECLEN (RTX, 3, ASM_OPERANDS)
2610#define ASM_OPERANDS_INPUT_CONSTRAINT_EXP(RTX, N) \
2611 XCVECEXP (RTX, 4, N, ASM_OPERANDS)
2612#define ASM_OPERANDS_INPUT_CONSTRAINT(RTX, N) \
2613 XSTR (XCVECEXP (RTX, 4, N, ASM_OPERANDS), 0)
2614#define ASM_OPERANDS_INPUT_MODE(RTX, N) \
2615 GET_MODE (XCVECEXP (RTX, 4, N, ASM_OPERANDS))
2616#define ASM_OPERANDS_LABEL_VEC(RTX) XCVEC (RTX, 5, ASM_OPERANDS)
2617#define ASM_OPERANDS_LABEL_LENGTH(RTX) XCVECLEN (RTX, 5, ASM_OPERANDS)
2618#define ASM_OPERANDS_LABEL(RTX, N) XCVECEXP (RTX, 5, N, ASM_OPERANDS)
2619#define ASM_OPERANDS_SOURCE_LOCATION(RTX) XCLOC (RTX, 6, ASM_OPERANDS)
2620#define ASM_INPUT_SOURCE_LOCATION(RTX) XCLOC (RTX, 1, ASM_INPUT)
2622/* 1 if RTX is a mem that is statically allocated in read-only memory. */
2623#define MEM_READONLY_P(RTX) \
2624 (RTL_FLAG_CHECK1 ("MEM_READONLY_P", (RTX), MEM)->unchanging)
2625
2626/* 1 if RTX is a mem and we should keep the alias set for this mem
2627 unchanged when we access a component. Set to 1, or example, when we
2628 are already in a non-addressable component of an aggregate. */
2629#define MEM_KEEP_ALIAS_SET_P(RTX) \
2630 (RTL_FLAG_CHECK1 ("MEM_KEEP_ALIAS_SET_P", (RTX), MEM)->jump)
2632/* 1 if RTX is a mem or asm_operand for a volatile reference. */
2633#define MEM_VOLATILE_P(RTX) \
2634 (RTL_FLAG_CHECK3 ("MEM_VOLATILE_P", (RTX), MEM, ASM_OPERANDS, \
2635 ASM_INPUT)->volatil)
2637/* 1 if RTX is a mem that cannot trap. */
2638#define MEM_NOTRAP_P(RTX) \
2639 (RTL_FLAG_CHECK1 ("MEM_NOTRAP_P", (RTX), MEM)->call)
2640
2641/* The memory attribute block. We provide access macros for each value
2642 in the block and provide defaults if none specified. */
2643#define MEM_ATTRS(RTX) X0MEMATTR (RTX, 1)
2644
2645/* The register attribute block. We provide access macros for each value
2646 in the block and provide defaults if none specified. */
2647#define REG_ATTRS(RTX) (REG_CHECK (RTX)->attrs)
2648
2649#ifndef GENERATOR_FILE
2650/* For a MEM rtx, the alias set. If 0, this MEM is not in any alias
2651 set, and may alias anything. Otherwise, the MEM can only alias
2652 MEMs in a conflicting alias set. This value is set in a
2653 language-dependent manner in the front-end, and should not be
2654 altered in the back-end. These set numbers are tested with
2655 alias_sets_conflict_p. */
2656#define MEM_ALIAS_SET(RTX) (get_mem_attrs (RTX)->alias)
2657
2658/* For a MEM rtx, the decl it is known to refer to, if it is known to
2659 refer to part of a DECL. It may also be a COMPONENT_REF. */
2660#define MEM_EXPR(RTX) (get_mem_attrs (RTX)->expr)
2662/* For a MEM rtx, true if its MEM_OFFSET is known. */
2663#define MEM_OFFSET_KNOWN_P(RTX) (get_mem_attrs (RTX)->offset_known_p)
2665/* For a MEM rtx, the offset from the start of MEM_EXPR. */
2666#define MEM_OFFSET(RTX) (get_mem_attrs (RTX)->offset)
2668/* For a MEM rtx, the address space. */
2669#define MEM_ADDR_SPACE(RTX) (get_mem_attrs (RTX)->addrspace)
2671/* For a MEM rtx, true if its MEM_SIZE is known. */
2672#define MEM_SIZE_KNOWN_P(RTX) (get_mem_attrs (RTX)->size_known_p)
2674/* For a MEM rtx, the size in bytes of the MEM. */
2675#define MEM_SIZE(RTX) (get_mem_attrs (RTX)->size)
2676
2677/* For a MEM rtx, the alignment in bits. We can use the alignment of the
2678 mode as a default when STRICT_ALIGNMENT, but not if not. */
2679#define MEM_ALIGN(RTX) (get_mem_attrs (RTX)->align)
2680#else
2681#define MEM_ADDR_SPACE(RTX) ADDR_SPACE_GENERIC
2682#endif
2683
2684/* For a REG rtx, the decl it is known to refer to, if it is known to
2685 refer to part of a DECL. */
2686#define REG_EXPR(RTX) (REG_ATTRS (RTX) == 0 ? 0 : REG_ATTRS (RTX)->decl)
2687
2688/* For a REG rtx, the offset from the start of REG_EXPR, if known, as an
2689 HOST_WIDE_INT. */
2690#define REG_OFFSET(RTX) (REG_ATTRS (RTX) == 0 ? 0 : REG_ATTRS (RTX)->offset)
2692/* Copy the attributes that apply to memory locations from RHS to LHS. */
2693#define MEM_COPY_ATTRIBUTES(LHS, RHS) \
2694 (MEM_VOLATILE_P (LHS) = MEM_VOLATILE_P (RHS), \
2695 MEM_NOTRAP_P (LHS) = MEM_NOTRAP_P (RHS), \
2696 MEM_READONLY_P (LHS) = MEM_READONLY_P (RHS), \
2697 MEM_KEEP_ALIAS_SET_P (LHS) = MEM_KEEP_ALIAS_SET_P (RHS), \
2698 MEM_POINTER (LHS) = MEM_POINTER (RHS), \
2699 MEM_ATTRS (LHS) = MEM_ATTRS (RHS))
2700
2701/* 1 if RTX is a label_ref for a nonlocal label. */
2702/* Likewise in an expr_list for a REG_LABEL_OPERAND or
2703 REG_LABEL_TARGET note. */
2704#define LABEL_REF_NONLOCAL_P(RTX) \
2705 (RTL_FLAG_CHECK1 ("LABEL_REF_NONLOCAL_P", (RTX), LABEL_REF)->volatil)
2707/* 1 if RTX is a code_label that should always be considered to be needed. */
2708#define LABEL_PRESERVE_P(RTX) \
2709 (RTL_FLAG_CHECK2 ("LABEL_PRESERVE_P", (RTX), CODE_LABEL, NOTE)->in_struct)
2710
2711/* During sched, 1 if RTX is an insn that must be scheduled together
2712 with the preceding insn. */
2713#define SCHED_GROUP_P(RTX) \
2714 (RTL_FLAG_CHECK4 ("SCHED_GROUP_P", (RTX), DEBUG_INSN, INSN, \
2715 JUMP_INSN, CALL_INSN)->in_struct)
2716
2717/* For a SET rtx, SET_DEST is the place that is set
2718 and SET_SRC is the value it is set to. */
2719#define SET_DEST(RTX) XC2EXP (RTX, 0, SET, CLOBBER)
2720#define SET_SRC(RTX) XCEXP (RTX, 1, SET)
2721#define SET_IS_RETURN_P(RTX) \
2722 (RTL_FLAG_CHECK1 ("SET_IS_RETURN_P", (RTX), SET)->jump)
2724/* For a TRAP_IF rtx, TRAP_CONDITION is an expression. */
2725#define TRAP_CONDITION(RTX) XCEXP (RTX, 0, TRAP_IF)
2726#define TRAP_CODE(RTX) XCEXP (RTX, 1, TRAP_IF)
2727
2728/* For a COND_EXEC rtx, COND_EXEC_TEST is the condition to base
2729 conditionally executing the code on, COND_EXEC_CODE is the code
2730 to execute if the condition is true. */
2731#define COND_EXEC_TEST(RTX) XCEXP (RTX, 0, COND_EXEC)
2732#define COND_EXEC_CODE(RTX) XCEXP (RTX, 1, COND_EXEC)
2733
2734/* 1 if RTX is a symbol_ref that addresses this function's rtl
2735 constants pool. */
2736#define CONSTANT_POOL_ADDRESS_P(RTX) \
2737 (RTL_FLAG_CHECK1 ("CONSTANT_POOL_ADDRESS_P", (RTX), SYMBOL_REF)->unchanging)
2738
2739/* 1 if RTX is a symbol_ref that addresses a value in the file's
2740 tree constant pool. This information is private to varasm.cc. */
2741#define TREE_CONSTANT_POOL_ADDRESS_P(RTX) \
2742 (RTL_FLAG_CHECK1 ("TREE_CONSTANT_POOL_ADDRESS_P", \
2743 (RTX), SYMBOL_REF)->frame_related)
2745/* Used if RTX is a symbol_ref, for machine-specific purposes. */
2746#define SYMBOL_REF_FLAG(RTX) \
2747 (RTL_FLAG_CHECK1 ("SYMBOL_REF_FLAG", (RTX), SYMBOL_REF)->volatil)
2748
2749/* 1 if RTX is a symbol_ref that has been the library function in
2750 emit_library_call. */
2751#define SYMBOL_REF_USED(RTX) \
2752 (RTL_FLAG_CHECK1 ("SYMBOL_REF_USED", (RTX), SYMBOL_REF)->used)
2754/* 1 if RTX is a symbol_ref for a weak symbol. */
2755#define SYMBOL_REF_WEAK(RTX) \
2756 (RTL_FLAG_CHECK1 ("SYMBOL_REF_WEAK", (RTX), SYMBOL_REF)->return_val)
2757
2758/* A pointer attached to the SYMBOL_REF; either SYMBOL_REF_DECL or
2759 SYMBOL_REF_CONSTANT. */
2760#define SYMBOL_REF_DATA(RTX) X0ANY ((RTX), 1)
2761
2762/* Set RTX's SYMBOL_REF_DECL to DECL. RTX must not be a constant
2763 pool symbol. */
2764#define SET_SYMBOL_REF_DECL(RTX, DECL) \
2765 (gcc_assert (!CONSTANT_POOL_ADDRESS_P (RTX)), X0TREE ((RTX), 1) = (DECL))
2767/* The tree (decl or constant) associated with the symbol, or null. */
2768#define SYMBOL_REF_DECL(RTX) \
2769 (CONSTANT_POOL_ADDRESS_P (RTX) ? NULL : X0TREE ((RTX), 1))
2771/* Set RTX's SYMBOL_REF_CONSTANT to C. RTX must be a constant pool symbol. */
2772#define SET_SYMBOL_REF_CONSTANT(RTX, C) \
2773 (gcc_assert (CONSTANT_POOL_ADDRESS_P (RTX)), X0CONSTANT ((RTX), 1) = (C))
2775/* The rtx constant pool entry for a symbol, or null. */
2776#define SYMBOL_REF_CONSTANT(RTX) \
2777 (CONSTANT_POOL_ADDRESS_P (RTX) ? X0CONSTANT ((RTX), 1) : NULL)
2778
2779/* A set of flags on a symbol_ref that are, in some respects, redundant with
2780 information derivable from the tree decl associated with this symbol.
2781 Except that we build a *lot* of SYMBOL_REFs that aren't associated with a
2782 decl. In some cases this is a bug. But beyond that, it's nice to cache
2783 this information to avoid recomputing it. Finally, this allows space for
2784 the target to store more than one bit of information, as with
2785 SYMBOL_REF_FLAG. */
2786#define SYMBOL_REF_FLAGS(RTX) \
2787 (RTL_FLAG_CHECK1 ("SYMBOL_REF_FLAGS", (RTX), SYMBOL_REF) \
2788 ->u2.symbol_ref_flags)
2789
2790/* These flags are common enough to be defined for all targets. They
2791 are computed by the default version of targetm.encode_section_info. */
2793/* Set if this symbol is a function. */
2794#define SYMBOL_FLAG_FUNCTION (1 << 0)
2795#define SYMBOL_REF_FUNCTION_P(RTX) \
2796 ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_FUNCTION) != 0)
2797/* Set if targetm.binds_local_p is true. */
2798#define SYMBOL_FLAG_LOCAL (1 << 1)
2799#define SYMBOL_REF_LOCAL_P(RTX) \
2800 ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_LOCAL) != 0)
2801/* Set if targetm.in_small_data_p is true. */
2802#define SYMBOL_FLAG_SMALL (1 << 2)
2803#define SYMBOL_REF_SMALL_P(RTX) \
2804 ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_SMALL) != 0)
2805/* The three-bit field at [5:3] is true for TLS variables; use
2806 SYMBOL_REF_TLS_MODEL to extract the field as an enum tls_model. */
2807#define SYMBOL_FLAG_TLS_SHIFT 3
2808#define SYMBOL_REF_TLS_MODEL(RTX) \
2809 ((enum tls_model) ((SYMBOL_REF_FLAGS (RTX) >> SYMBOL_FLAG_TLS_SHIFT) & 7))
2810/* Set if this symbol is not defined in this translation unit. */
2811#define SYMBOL_FLAG_EXTERNAL (1 << 6)
2812#define SYMBOL_REF_EXTERNAL_P(RTX) \
2813 ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_EXTERNAL) != 0)
2814/* Set if this symbol has a block_symbol structure associated with it. */
2815#define SYMBOL_FLAG_HAS_BLOCK_INFO (1 << 7)
2816#define SYMBOL_REF_HAS_BLOCK_INFO_P(RTX) \
2817 ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_HAS_BLOCK_INFO) != 0)
2818/* Set if this symbol is a section anchor. SYMBOL_REF_ANCHOR_P implies
2819 SYMBOL_REF_HAS_BLOCK_INFO_P. */
2820#define SYMBOL_FLAG_ANCHOR (1 << 8)
2821#define SYMBOL_REF_ANCHOR_P(RTX) \
2822 ((SYMBOL_REF_FLAGS (RTX) & SYMBOL_FLAG_ANCHOR) != 0)
2824/* Subsequent bits are available for the target to use. */
2825#define SYMBOL_FLAG_MACH_DEP_SHIFT 9
2826#define SYMBOL_FLAG_MACH_DEP (1 << SYMBOL_FLAG_MACH_DEP_SHIFT)
2827
2828/* If SYMBOL_REF_HAS_BLOCK_INFO_P (RTX), this is the object_block
2829 structure to which the symbol belongs, or NULL if it has not been
2830 assigned a block. */
2831#define SYMBOL_REF_BLOCK(RTX) (BLOCK_SYMBOL_CHECK (RTX)->block)
2832
2833/* If SYMBOL_REF_HAS_BLOCK_INFO_P (RTX), this is the offset of RTX from
2834 the first object in SYMBOL_REF_BLOCK (RTX). The value is negative if
2835 RTX has not yet been assigned to a block, or it has not been given an
2836 offset within that block. */
2837#define SYMBOL_REF_BLOCK_OFFSET(RTX) (BLOCK_SYMBOL_CHECK (RTX)->offset)
2839/* True if RTX is flagged to be a scheduling barrier. */
2840#define PREFETCH_SCHEDULE_BARRIER_P(RTX) \
2841 (RTL_FLAG_CHECK1 ("PREFETCH_SCHEDULE_BARRIER_P", (RTX), PREFETCH)->volatil)
2842
2843/* Indicate whether the machine has any sort of auto increment addressing.
2844 If not, we can avoid checking for REG_INC notes. */
2845
2846#if (defined (HAVE_PRE_INCREMENT) || defined (HAVE_PRE_DECREMENT) \
2847 || defined (HAVE_POST_INCREMENT) || defined (HAVE_POST_DECREMENT) \
2848 || defined (HAVE_PRE_MODIFY_DISP) || defined (HAVE_POST_MODIFY_DISP) \
2849 || defined (HAVE_PRE_MODIFY_REG) || defined (HAVE_POST_MODIFY_REG))
2850#define AUTO_INC_DEC 1
2851#else
2852#define AUTO_INC_DEC 0
2853#endif
2854
2855/* Define a macro to look for REG_INC notes,
2856 but save time on machines where they never exist. */
2857
2858#if AUTO_INC_DEC
2859#define FIND_REG_INC_NOTE(INSN, REG) \
2860 ((REG) != NULL_RTX && REG_P ((REG)) \
2861 ? find_regno_note ((INSN), REG_INC, REGNO (REG)) \
2862 : find_reg_note ((INSN), REG_INC, (REG)))
2863#else
2864#define FIND_REG_INC_NOTE(INSN, REG) 0
2865#endif
2867#ifndef HAVE_PRE_INCREMENT
2868#define HAVE_PRE_INCREMENT 0
2869#endif
2871#ifndef HAVE_PRE_DECREMENT
2872#define HAVE_PRE_DECREMENT 0
2873#endif
2875#ifndef HAVE_POST_INCREMENT
2876#define HAVE_POST_INCREMENT 0
2877#endif
2879#ifndef HAVE_POST_DECREMENT
2880#define HAVE_POST_DECREMENT 0
2881#endif
2883#ifndef HAVE_POST_MODIFY_DISP
2884#define HAVE_POST_MODIFY_DISP 0
2885#endif
2887#ifndef HAVE_POST_MODIFY_REG
2888#define HAVE_POST_MODIFY_REG 0
2889#endif
2891#ifndef HAVE_PRE_MODIFY_DISP
2892#define HAVE_PRE_MODIFY_DISP 0
2893#endif
2895#ifndef HAVE_PRE_MODIFY_REG
2896#define HAVE_PRE_MODIFY_REG 0
2897#endif
2898
2899
2900/* Some architectures do not have complete pre/post increment/decrement
2901 instruction sets, or only move some modes efficiently. These macros
2902 allow us to tune autoincrement generation. */
2904#ifndef USE_LOAD_POST_INCREMENT
2905#define USE_LOAD_POST_INCREMENT(MODE) HAVE_POST_INCREMENT
2906#endif
2908#ifndef USE_LOAD_POST_DECREMENT
2909#define USE_LOAD_POST_DECREMENT(MODE) HAVE_POST_DECREMENT
2910#endif
2912#ifndef USE_LOAD_PRE_INCREMENT
2913#define USE_LOAD_PRE_INCREMENT(MODE) HAVE_PRE_INCREMENT
2914#endif
2916#ifndef USE_LOAD_PRE_DECREMENT
2917#define USE_LOAD_PRE_DECREMENT(MODE) HAVE_PRE_DECREMENT
2918#endif
2920#ifndef USE_STORE_POST_INCREMENT
2921#define USE_STORE_POST_INCREMENT(MODE) HAVE_POST_INCREMENT
2922#endif
2924#ifndef USE_STORE_POST_DECREMENT
2925#define USE_STORE_POST_DECREMENT(MODE) HAVE_POST_DECREMENT
2926#endif
2928#ifndef USE_STORE_PRE_INCREMENT
2929#define USE_STORE_PRE_INCREMENT(MODE) HAVE_PRE_INCREMENT
2930#endif
2932#ifndef USE_STORE_PRE_DECREMENT
2933#define USE_STORE_PRE_DECREMENT(MODE) HAVE_PRE_DECREMENT
2934#endif
2935
2936/* Nonzero when we are generating CONCATs. */
2937extern int generating_concat_p;
2938
2939/* Nonzero when we are expanding trees to RTL. */
2941
2942/* Generally useful functions. */
2943
2944#ifndef GENERATOR_FILE
2945/* Return the cost of SET X. SPEED_P is true if optimizing for speed
2946 rather than size. */
2948inline int
2949set_rtx_cost (rtx x, bool speed_p)
2950{
2951 return rtx_cost (x, VOIDmode, INSN, 4, speed_p);
2952}
2953
2954/* Like set_rtx_cost, but return both the speed and size costs in C. */
2956inline void
2958{
2959 get_full_rtx_cost (x, VOIDmode, INSN, 4, c);
2960}
2961
2962/* Return the cost of moving X into a register, relative to the cost
2963 of a register move. SPEED_P is true if optimizing for speed rather
2964 than size. */
2966inline int
2967set_src_cost (rtx x, machine_mode mode, bool speed_p)
2968{
2969 return rtx_cost (x, mode, SET, 1, speed_p);
2970}
2971
2972/* Like set_src_cost, but return both the speed and size costs in C. */
2974inline void
2975get_full_set_src_cost (rtx x, machine_mode mode, struct full_rtx_costs *c)
2976{
2977 get_full_rtx_cost (x, mode, SET, 1, c);
2978}
2979#endif
2980
2981/* A convenience macro to validate the arguments of a zero_extract
2982 expression. It determines whether SIZE lies inclusively within
2983 [1, RANGE], POS lies inclusively within between [0, RANGE - 1]
2984 and the sum lies inclusively within [1, RANGE]. RANGE must be
2985 >= 1, but SIZE and POS may be negative. */
2986#define EXTRACT_ARGS_IN_RANGE(SIZE, POS, RANGE) \
2987 (IN_RANGE ((POS), 0, (unsigned HOST_WIDE_INT) (RANGE) - 1) \
2988 && IN_RANGE ((SIZE), 1, (unsigned HOST_WIDE_INT) (RANGE) \
2989 - (unsigned HOST_WIDE_INT)(POS)))
2990
2991/* In explow.cc */
2992extern HOST_WIDE_INT trunc_int_for_mode (HOST_WIDE_INT, machine_mode);
2993extern poly_int64 trunc_int_for_mode (poly_int64, machine_mode);
2994extern rtx plus_constant (machine_mode, rtx, poly_int64, bool = false);
2995extern HOST_WIDE_INT get_stack_check_protect (void);
2997/* In rtl.cc */
2999inline rtx
3000rtx_init (rtx rt, RTX_CODE code)
3001{
3002 memset (rt, 0, RTX_HDR_SIZE);
3003 PUT_CODE (rt, code);
3004 return rt;
3005}
3006#define rtx_alloca(code) \
3007 rtx_init ((rtx) alloca (RTX_CODE_SIZE ((code))), (code))
3009#define rtx_alloc_v(c, SZ) rtx_alloc_stat_v (c MEM_STAT_INFO, SZ)
3010#define const_wide_int_alloc(NWORDS) \
3011 rtx_alloc_v (CONST_WIDE_INT, \
3012 (sizeof (struct hwivec_def) \
3013 + ((NWORDS)-1) * sizeof (HOST_WIDE_INT))) \
3014
3015extern rtvec rtvec_alloc (size_t);
3017extern bool shared_const_p (const_rtx);
3018extern rtx copy_rtx (rtx);
3019extern enum rtx_code classify_insn (rtx);
3020extern void dump_rtx_statistics (void);
3021
3022/* In emit-rtl.cc */
3023extern rtx copy_rtx_if_shared (rtx);
3024
3025/* In rtl.cc */
3026extern unsigned int rtx_size (const_rtx);
3028
3030 rtx *, rtx *);
3031extern bool rtx_equal_p (const_rtx, const_rtx,
3033
3034extern bool rtvec_all_equal_p (const_rtvec);
3035extern bool rtvec_series_p (rtvec, int);
3036
3037/* Return true if X is a vector constant with a duplicated element value. */
3039inline bool
3041{
3042 return (GET_CODE (x) == CONST_VECTOR
3043 && CONST_VECTOR_NPATTERNS (x) == 1
3045}
3046
3047/* Return true if X is a vector constant with a duplicated element value.
3048 Store the duplicated element in *ELT if so. */
3049
3050template <typename T>
3051inline bool
3052const_vec_duplicate_p (T x, T *elt)
3053{
3054 if (const_vec_duplicate_p (x))
3055 {
3056 *elt = CONST_VECTOR_ENCODED_ELT (x, 0);
3057 return true;
3058 }
3059 return false;
3060}
3061
3062/* Return true if X is a vector with a duplicated element value, either
3063 constant or nonconstant. Store the duplicated element in *ELT if so. */
3064
3065template <typename T>
3066inline bool
3067vec_duplicate_p (T x, T *elt)
3068{
3069 if (GET_CODE (x) == VEC_DUPLICATE
3070 && !VECTOR_MODE_P (GET_MODE (XEXP (x, 0))))
3071 {
3072 *elt = XEXP (x, 0);
3073 return true;
3074 }
3075 return const_vec_duplicate_p (x, elt);
3076}
3077
3078/* If X is a vector constant with a duplicated element value, return that
3079 element value, otherwise return X. */
3080
3081template <typename T>
3082inline T
3084{
3085 if (const_vec_duplicate_p (x))
3086 x = CONST_VECTOR_ELT (x, 0);
3087 return x;
3088}
3089
3090/* In emit-rtl.cc. */
3091extern wide_int const_vector_int_elt (const_rtx, unsigned int);
3092extern rtx const_vector_elt (const_rtx, unsigned int);
3093extern bool const_vec_series_p_1 (const_rtx, rtx *, rtx *);
3094
3095/* Return true if X is an integer constant vector that contains a linear
3096 series of the form:
3097
3098 { B, B + S, B + 2 * S, B + 3 * S, ... }
3099
3100 for a nonzero S. Store B and S in *BASE_OUT and *STEP_OUT on sucess. */
3102inline bool
3103const_vec_series_p (const_rtx x, rtx *base_out, rtx *step_out)
3104{
3105 if (GET_CODE (x) == CONST_VECTOR
3106 && CONST_VECTOR_NPATTERNS (x) == 1
3108 return const_vec_series_p_1 (x, base_out, step_out);
3109 return false;
3110}
3111
3112/* Return true if X is a vector that contains a linear series of the
3113 form:
3114
3115 { B, B + S, B + 2 * S, B + 3 * S, ... }
3116
3117 where B and S are constant or nonconstant. Store B and S in
3118 *BASE_OUT and *STEP_OUT on sucess. */
3120inline bool
3121vec_series_p (const_rtx x, rtx *base_out, rtx *step_out)
3122{
3123 if (GET_CODE (x) == VEC_SERIES)
3124 {
3125 *base_out = XEXP (x, 0);
3126 *step_out = XEXP (x, 1);
3127 return true;
3128 }
3129 return const_vec_series_p (x, base_out, step_out);
3130}
3131
3132/* Return true if CONST_VECTORs X and Y, which are known to have the same mode,
3133 also have the same encoding. This means that they are equal whenever their
3134 operands are equal. */
3136inline bool
3138{
3139 /* Don't be fussy about the encoding of constant-length vectors,
3140 since XVECEXP (X, 0) and XVECEXP (Y, 0) list all the elements anyway. */
3141 if (poly_uint64 (CONST_VECTOR_NUNITS (x)).is_constant ())
3142 return true;
3143
3147}
3148
3149/* Return the unpromoted (outer) mode of SUBREG_PROMOTED_VAR_P subreg X. */
3155 return as_a <scalar_int_mode> (GET_MODE (x));
3156}
3157
3158/* Return the promoted (inner) mode of SUBREG_PROMOTED_VAR_P subreg X. */
3165}
3166
3167/* In emit-rtl.cc */
3168extern rtvec gen_rtvec_v (int, rtx *);
3169extern rtvec gen_rtvec_v (int, rtx_insn **);
3170extern rtx gen_reg_rtx (machine_mode);
3171extern rtx gen_rtx_REG_offset (rtx, machine_mode, unsigned int, poly_int64);
3172extern rtx gen_reg_rtx_offset (rtx, machine_mode, int);
3174extern rtx_code_label *gen_label_rtx (void);
3175extern rtx gen_lowpart_common (machine_mode, rtx);
3176
3177/* In cse.cc */
3178extern rtx gen_lowpart_if_possible (machine_mode, rtx);
3179
3180/* In emit-rtl.cc */
3181extern rtx gen_highpart (machine_mode, rtx);
3182extern rtx gen_highpart_mode (machine_mode, machine_mode, rtx);
3183extern rtx operand_subword (rtx, poly_uint64, int, machine_mode);
3184
3185/* In emit-rtl.cc */
3186extern rtx operand_subword_force (rtx, poly_uint64, machine_mode);
3187extern bool subreg_lowpart_p (const_rtx);
3189
3190/* Return true if a subreg of mode OUTERMODE would only access part of
3191 an inner register with mode INNERMODE. The other bits of the inner
3192 register would then be "don't care" on read. The behavior for writes
3193 depends on REGMODE_NATURAL_SIZE; bits in the same REGMODE_NATURAL_SIZE-d
3194 chunk would be clobbered but other bits would be preserved. */
3196inline bool
3197partial_subreg_p (machine_mode outermode, machine_mode innermode)
3198{
3199 /* Modes involved in a subreg must be ordered. In particular, we must
3200 always know at compile time whether the subreg is paradoxical. */
3201 poly_int64 outer_prec = GET_MODE_PRECISION (outermode);
3202 poly_int64 inner_prec = GET_MODE_PRECISION (innermode);
3203 gcc_checking_assert (ordered_p (outer_prec, inner_prec));
3204 return maybe_lt (outer_prec, inner_prec);
3205}
3206
3207/* Likewise return true if X is a subreg that is smaller than the inner
3208 register. Use read_modify_subreg_p to test whether writing to such
3209 a subreg preserves any part of the inner register. */
3211inline bool
3213{
3214 if (GET_CODE (x) != SUBREG)
3215 return false;
3216 return partial_subreg_p (GET_MODE (x), GET_MODE (SUBREG_REG (x)));
3217}
3218
3219/* Return true if a subreg with the given outer and inner modes is
3220 paradoxical. */
3222inline bool
3223paradoxical_subreg_p (machine_mode outermode, machine_mode innermode)
3224{
3225 /* Modes involved in a subreg must be ordered. In particular, we must
3226 always know at compile time whether the subreg is paradoxical. */
3227 poly_int64 outer_prec = GET_MODE_PRECISION (outermode);
3228 poly_int64 inner_prec = GET_MODE_PRECISION (innermode);
3229 gcc_checking_assert (ordered_p (outer_prec, inner_prec));
3230 return maybe_gt (outer_prec, inner_prec);
3231}
3232
3233/* Return true if X is a paradoxical subreg, false otherwise. */
3235inline bool
3237{
3238 if (GET_CODE (x) != SUBREG)
3239 return false;
3241}
3242
3243/* Return the SUBREG_BYTE for an OUTERMODE lowpart of an INNERMODE value. */
3245inline poly_uint64
3246subreg_lowpart_offset (machine_mode outermode, machine_mode innermode)
3247{
3248 return subreg_size_lowpart_offset (GET_MODE_SIZE (outermode),
3249 GET_MODE_SIZE (innermode));
3250}
3251
3252/* Given that a subreg has outer mode OUTERMODE and inner mode INNERMODE,
3253 return the smaller of the two modes if they are different sizes,
3254 otherwise return the outer mode. */
3256inline machine_mode
3257narrower_subreg_mode (machine_mode outermode, machine_mode innermode)
3258{
3259 return paradoxical_subreg_p (outermode, innermode) ? innermode : outermode;
3260}
3261
3262/* Given that a subreg has outer mode OUTERMODE and inner mode INNERMODE,
3263 return the mode that is big enough to hold both the outer and inner
3264 values. Prefer the outer mode in the event of a tie. */
3266inline machine_mode
3267wider_subreg_mode (machine_mode outermode, machine_mode innermode)
3268{
3269 return partial_subreg_p (outermode, innermode) ? innermode : outermode;
3270}
3271
3272/* Likewise for subreg X. */
3274inline machine_mode
3276{
3277 return wider_subreg_mode (GET_MODE (x), GET_MODE (SUBREG_REG (x)));
3278}
3279
3281
3282/* Return the SUBREG_BYTE for an OUTERMODE highpart of an INNERMODE value. */
3284inline poly_uint64
3285subreg_highpart_offset (machine_mode outermode, machine_mode innermode)
3286{
3287 return subreg_size_highpart_offset (GET_MODE_SIZE (outermode),
3288 GET_MODE_SIZE (innermode));
3289}
3290
3291extern poly_int64 byte_lowpart_offset (machine_mode, machine_mode);
3292extern poly_int64 subreg_memory_offset (machine_mode, machine_mode,
3293 poly_uint64);
3295extern rtx make_safe_from (rtx, rtx);
3297 addr_space_t, bool, bool);
3300#define convert_memory_address(to_mode,x) \
3301 convert_memory_address_addr_space ((to_mode), (x), ADDR_SPACE_GENERIC)
3302extern const char *get_insn_name (int);
3303extern rtx_insn *get_last_insn_anywhere (void);
3304extern rtx_insn *get_first_nonnote_insn (void);
3305extern rtx_insn *get_last_nonnote_insn (void);
3306extern void start_sequence (void);
3307extern void push_to_sequence (rtx_insn *);
3308extern void push_to_sequence2 (rtx_insn *, rtx_insn *);
3309extern void end_sequence (void);
3310#if TARGET_SUPPORTS_WIDE_INT == 0
3312#endif
3313extern void cwi_output_hex (FILE *, const_rtx);
3314#if TARGET_SUPPORTS_WIDE_INT == 0
3315extern rtx immed_double_const (HOST_WIDE_INT, HOST_WIDE_INT,
3316 machine_mode);
3317#endif
3318extern rtx immed_wide_int_const (const poly_wide_int_ref &, machine_mode);
3319
3320/* In varasm.cc */
3321extern rtx force_const_mem (machine_mode, rtx);
3322
3323/* In varasm.cc */
3324
3325struct function;
3327extern rtx get_pool_constant_mark (rtx, bool *);
3330extern void decide_function_section (tree);
3331
3332/* In emit-rtl.cc */
3335extern rtx_insn *emit_insn_before_setloc (rtx, rtx_insn *, location_t);
3339 location_t);
3342extern rtx_insn *emit_call_insn_before_setloc (rtx, rtx_insn *, location_t);
3345extern rtx_insn *emit_debug_insn_before_setloc (rtx, rtx_insn *, location_t);
3351extern rtx_insn *emit_insn_after_setloc (rtx, rtx_insn *, location_t);
3354extern rtx_jump_insn *emit_jump_insn_after_setloc (rtx, rtx_insn *, location_t);
3357extern rtx_insn *emit_call_insn_after_setloc (rtx, rtx_insn *, location_t);
3360extern rtx_insn *emit_debug_insn_after_setloc (rtx, rtx_insn *, location_t);
3363extern rtx_note *emit_note_after (enum insn_note, rtx_insn *);
3364extern rtx_insn *emit_insn (rtx);
3365extern rtx_insn *emit_debug_insn (rtx);
3366extern rtx_insn *emit_jump_insn (rtx);
3369extern rtx_insn *emit_call_insn (rtx);
3370extern rtx_code_label *emit_label (rtx);
3372extern rtx_barrier *emit_barrier (void);
3373extern rtx_note *emit_note (enum insn_note);
3374extern rtx_note *emit_note_copy (rtx_note *);
3375extern rtx_insn *gen_clobber (rtx);
3376extern rtx_insn *emit_clobber (rtx);
3377extern rtx_insn *gen_use (rtx);
3378extern rtx_insn *emit_use (rtx);
3379extern rtx_insn *make_insn_raw (rtx);
3380extern void add_function_usage_to (rtx, rtx);
3381extern rtx_call_insn *last_call_insn (void);
3382extern rtx_insn *previous_insn (rtx_insn *);
3383extern rtx_insn *next_insn (rtx_insn *);
3392extern rtx_insn *prev_real_insn (rtx_insn *);
3393extern rtx_insn *next_real_insn (rtx_insn *);
3398extern bool active_insn_p (const rtx_insn *);
3399
3400/* In emit-rtl.cc */
3401extern int insn_line (const rtx_insn *);
3402extern const char * insn_file (const rtx_insn *);
3403extern tree insn_scope (const rtx_insn *);
3404extern expanded_location insn_location (const rtx_insn *);
3405extern int insn_discriminator (const rtx_insn *);
3406extern location_t prologue_location, epilogue_location;
3407
3408/* In jump.cc */
3409extern enum rtx_code reverse_condition (enum rtx_code);
3411extern enum rtx_code swap_condition (enum rtx_code);
3412extern enum rtx_code unsigned_condition (enum rtx_code);
3413extern enum rtx_code signed_condition (enum rtx_code);
3414extern void mark_jump_label (rtx, rtx_insn *, int);
3415
3416/* Return true if integer comparison operator CODE interprets its operands
3417 as unsigned. */
3419inline bool
3421{
3422 return unsigned_condition (code) == code;
3423}
3424
3425/* In jump.cc */
3427
3428/* In recog.cc */
3429extern rtx *find_constant_term_loc (rtx *);
3430
3431/* In emit-rtl.cc */
3432extern rtx_insn *try_split (rtx, rtx_insn *, int);
3434/* In insn-recog.cc (generated by genrecog). */
3435extern rtx_insn *split_insns (rtx, rtx_insn *);
3436
3437/* In simplify-rtx.cc */
3438
3439/* A class that records the context in which a simplification
3440 is being mode. */
3441class simplify_context
3442{
3443public:
3444 rtx simplify_unary_operation (rtx_code, machine_mode, rtx, machine_mode);
3445 rtx simplify_binary_operation (rtx_code, machine_mode, rtx, rtx);
3446 rtx simplify_ternary_operation (rtx_code, machine_mode, machine_mode,
3447 rtx, rtx, rtx);
3448 rtx simplify_relational_operation (rtx_code, machine_mode, machine_mode,
3449 rtx, rtx);
3450 rtx simplify_subreg (machine_mode, rtx, machine_mode, poly_uint64);
3451
3452 rtx lowpart_subreg (machine_mode, rtx, machine_mode);
3453
3455
3456 rtx simplify_gen_unary (rtx_code, machine_mode, rtx, machine_mode);
3457 rtx simplify_gen_binary (rtx_code, machine_mode, rtx, rtx);
3458 rtx simplify_gen_ternary (rtx_code, machine_mode, machine_mode,
3459 rtx, rtx, rtx);
3460 rtx simplify_gen_relational (rtx_code, machine_mode, machine_mode, rtx, rtx);
3461 rtx simplify_gen_subreg (machine_mode, rtx, machine_mode, poly_uint64);
3462 rtx simplify_gen_vec_select (rtx, unsigned int);
3463
3464 /* Tracks the level of MEM nesting for the value being simplified:
3465 0 means the value is not in a MEM, >0 means it is. This is needed
3466 because the canonical representation of multiplication is different
3467 inside a MEM than outside. */
3468 unsigned int mem_depth = 0;
3469
3470 /* Tracks number of simplify_associative_operation calls performed during
3471 outermost simplify* call. */
3472 unsigned int assoc_count = 0;
3473
3474 /* Limit for the above number, return NULL from
3475 simplify_associative_operation after we reach that assoc_count. */
3476 static const unsigned int max_assoc_count = 64;
3477
3478private:
3479 rtx simplify_truncation (machine_mode, rtx, machine_mode);
3484 bool = false);
3487 rtx simplify_shift_const_int (rtx_code, machine_mode, rtx, unsigned int);
3488 rtx simplify_plus_minus (rtx_code, machine_mode, rtx, rtx);
3490
3493 rtx simplify_ternary_operation_1 (rtx_code, machine_mode, machine_mode,
3494 rtx, rtx, rtx);
3495 rtx simplify_relational_operation_1 (rtx_code, machine_mode, machine_mode,
3496 rtx, rtx);
3497};
3499inline rtx
3500simplify_unary_operation (rtx_code code, machine_mode mode, rtx op,
3501 machine_mode op_mode)
3502{
3503 return simplify_context ().simplify_unary_operation (code, mode, op,
3504 op_mode);
3505}
3507inline rtx
3508simplify_binary_operation (rtx_code code, machine_mode mode, rtx op0, rtx op1)
3509{
3510 return simplify_context ().simplify_binary_operation (code, mode, op0, op1);
3511}
3513inline rtx
3514simplify_ternary_operation (rtx_code code, machine_mode mode,
3515 machine_mode op0_mode, rtx op0, rtx op1, rtx op2)
3516{
3517 return simplify_context ().simplify_ternary_operation (code, mode, op0_mode,
3518 op0, op1, op2);
3519}
3521inline rtx
3522simplify_relational_operation (rtx_code code, machine_mode mode,
3523 machine_mode op_mode, rtx op0, rtx op1)
3524{
3525 return simplify_context ().simplify_relational_operation (code, mode,
3526 op_mode, op0, op1);
3527}
3529inline rtx
3530simplify_subreg (machine_mode outermode, rtx op, machine_mode innermode,
3531 poly_uint64 byte)
3532{
3533 return simplify_context ().simplify_subreg (outermode, op, innermode, byte);
3534}
3536inline rtx
3537simplify_gen_unary (rtx_code code, machine_mode mode, rtx op,
3538 machine_mode op_mode)
3539{
3540 return simplify_context ().simplify_gen_unary (code, mode, op, op_mode);
3541}
3543inline rtx
3544simplify_gen_binary (rtx_code code, machine_mode mode, rtx op0, rtx op1)
3545{
3546 return simplify_context ().simplify_gen_binary (code, mode, op0, op1);
3547}
3549inline rtx
3550simplify_gen_ternary (rtx_code code, machine_mode mode, machine_mode op0_mode,
3551 rtx op0, rtx op1, rtx op2)
3552{
3553 return simplify_context ().simplify_gen_ternary (code, mode, op0_mode,
3554 op0, op1, op2);
3555}
3557inline rtx
3558simplify_gen_relational (rtx_code code, machine_mode mode,
3559 machine_mode op_mode, rtx op0, rtx op1)
3560{
3561 return simplify_context ().simplify_gen_relational (code, mode, op_mode,
3562 op0, op1);
3563}
3565inline rtx
3566simplify_gen_subreg (machine_mode outermode, rtx op, machine_mode innermode,
3567 poly_uint64 byte)
3568{
3569 return simplify_context ().simplify_gen_subreg (outermode, op,
3570 innermode, byte);
3571}
3573inline rtx
3574simplify_gen_vec_select (rtx op, unsigned int index)
3575{
3576 return simplify_context ().simplify_gen_vec_select (op, index);
3577}
3579inline rtx
3580lowpart_subreg (machine_mode outermode, rtx op, machine_mode innermode)
3581{
3582 return simplify_context ().lowpart_subreg (outermode, op, innermode);
3583}
3584
3585extern rtx simplify_const_unary_operation (enum rtx_code, machine_mode,
3586 rtx, machine_mode);
3587extern rtx simplify_const_binary_operation (enum rtx_code, machine_mode,
3588 rtx, rtx);
3590 machine_mode, rtx, rtx);
3592 rtx (*fn) (rtx, const_rtx, void *), void *);
3594extern rtx simplify_rtx (const_rtx);
3597extern bool mode_signbit_p (machine_mode, const_rtx);
3598extern bool val_signbit_p (machine_mode, unsigned HOST_WIDE_INT);
3599extern bool val_signbit_known_set_p (machine_mode,
3600 unsigned HOST_WIDE_INT);
3601extern bool val_signbit_known_clear_p (machine_mode,
3602 unsigned HOST_WIDE_INT);
3603extern bool reverse_rotate_by_imm_p (machine_mode, unsigned int, rtx);
3604
3605/* In reginfo.cc */
3606extern machine_mode choose_hard_reg_mode (unsigned int, unsigned int,
3607 const predefined_function_abi *);
3608extern const HARD_REG_SET &simplifiable_subregs (const subreg_shape &);
3609
3610/* In emit-rtl.cc */
3611extern rtx set_for_reg_notes (rtx);
3612extern rtx set_unique_reg_note (rtx, enum reg_note, rtx);
3613extern rtx set_dst_reg_note (rtx, enum reg_note, rtx, rtx);
3614extern void set_insn_deleted (rtx_insn *);
3615
3616/* Functions in rtlanal.cc */
3617
3618extern rtx single_set_2 (const rtx_insn *, const_rtx);
3619extern rtx simple_regno_set (rtx, unsigned int);
3620extern bool contains_symbol_ref_p (const_rtx);
3623extern void add_auto_inc_notes (rtx_insn *, rtx);
3624
3625/* Handle the cheap and common cases inline for performance. */
3626
3627inline rtx single_set (const rtx_insn *insn)
3628{
3629 if (!INSN_P (insn))
3630 return NULL_RTX;
3631
3632 if (GET_CODE (PATTERN (insn)) == SET)
3633 return PATTERN (insn);
3634
3635 /* Defer to the more expensive case. */
3636 return single_set_2 (insn, PATTERN (insn));
3637}
3638
3640extern bool rtx_addr_can_trap_p (const_rtx);
3641extern bool nonzero_address_p (const_rtx);
3642extern bool rtx_unstable_p (const_rtx);
3643extern bool rtx_varies_p (const_rtx, bool);
3644extern bool rtx_addr_varies_p (const_rtx, bool);
3645extern rtx get_call_rtx_from (const rtx_insn *);
3646extern tree get_call_fndecl (const rtx_insn *);
3647extern HOST_WIDE_INT get_integer_term (const_rtx);
3649extern bool offset_within_block_p (const_rtx, HOST_WIDE_INT);
3650extern void split_const (rtx, rtx *, rtx *);
3651extern rtx strip_offset (rtx, poly_int64 *);
3653extern bool unsigned_reg_p (rtx);
3654extern bool reg_mentioned_p (const_rtx, const_rtx);
3655extern int count_occurrences (const_rtx, const_rtx, int);
3656extern bool reg_referenced_p (const_rtx, const_rtx);
3657extern bool reg_used_between_p (const_rtx, const rtx_insn *, const rtx_insn *);
3658extern bool reg_set_between_p (const_rtx, const rtx_insn *, const rtx_insn *);
3660extern bool swap_commutative_operands_p (rtx, rtx);
3661extern bool modified_between_p (const_rtx, const rtx_insn *, const rtx_insn *);
3662extern bool no_labels_between_p (const rtx_insn *, const rtx_insn *);
3663extern bool modified_in_p (const_rtx, const_rtx);
3664extern bool reg_set_p (const_rtx, const_rtx);
3665extern bool multiple_sets (const_rtx);
3666extern bool set_noop_p (const_rtx);
3667extern bool noop_move_p (const rtx_insn *);
3668extern bool refers_to_regno_p (unsigned int, unsigned int, const_rtx, rtx *);
3671extern void record_hard_reg_sets (rtx, const_rtx, void *);
3672extern void record_hard_reg_uses (rtx *, void *);
3674extern void find_all_hard_reg_sets (const rtx_insn *, HARD_REG_SET *, bool);
3675extern void note_pattern_stores (const_rtx,
3676 void (*) (rtx, const_rtx, void *), void *);
3677extern void note_stores (const rtx_insn *,
3678 void (*) (rtx, const_rtx, void *), void *);
3679extern void note_uses (rtx *, void (*) (rtx *, void *), void *);
3680extern bool dead_or_set_p (const rtx_insn *, const_rtx);
3681extern bool dead_or_set_regno_p (const rtx_insn *, unsigned int);
3683extern rtx find_regno_note (const_rtx, enum reg_note, unsigned int);
3685extern rtx find_constant_src (const rtx_insn *);
3686extern bool find_reg_fusage (const_rtx, enum rtx_code, const_rtx);
3687extern bool find_regno_fusage (const_rtx, enum rtx_code, unsigned int);
3688extern rtx alloc_reg_note (enum reg_note, rtx, rtx);
3689extern void add_reg_note (rtx, enum reg_note, rtx);
3690extern void add_int_reg_note (rtx_insn *, enum reg_note, int);
3691extern void add_args_size_note (rtx_insn *, poly_int64);
3693extern rtx duplicate_reg_note (rtx);
3694extern void remove_note (rtx_insn *, const_rtx);
3695extern bool remove_reg_equal_equiv_notes (rtx_insn *, bool = false);
3696extern void remove_reg_equal_equiv_notes_for_regno (unsigned int);
3697extern bool side_effects_p (const_rtx);
3698extern bool volatile_refs_p (const_rtx);
3699extern bool volatile_insn_p (const_rtx);
3700extern bool may_trap_p_1 (const_rtx, unsigned);
3701extern bool may_trap_p (const_rtx);
3702extern bool may_trap_or_fault_p (const_rtx);
3703extern bool can_throw_internal (const_rtx);
3704extern bool can_throw_external (const_rtx);
3705extern bool insn_could_throw_p (const_rtx);
3706extern bool insn_nothrow_p (const_rtx);
3707extern bool can_nonlocal_goto (const rtx_insn *);
3710extern rtx replace_rtx (rtx, rtx, rtx, bool = false);
3711extern void replace_label (rtx *, rtx, rtx, bool);
3712extern void replace_label_in_insn (rtx_insn *, rtx_insn *, rtx_insn *, bool);
3713extern bool rtx_referenced_p (const_rtx, const_rtx);
3714extern bool tablejump_p (const rtx_insn *, rtx_insn **, rtx_jump_table_data **);
3715extern rtx tablejump_casesi_pattern (const rtx_insn *insn);
3716extern bool computed_jump_p (const rtx_insn *);
3717extern bool tls_referenced_p (const_rtx);
3718extern bool contains_mem_rtx_p (rtx x);
3719extern bool register_asm_p (const_rtx);
3720
3721/* Overload for refers_to_regno_p for checking a single register. */
3722inline bool
3723refers_to_regno_p (unsigned int regnum, const_rtx x, rtx* loc = NULL)
3724{
3725 return refers_to_regno_p (regnum, regnum + 1, x, loc);
3726}
3727
3728/* Callback for for_each_inc_dec, to process the autoinc operation OP
3729 within MEM that sets DEST to SRC + SRCOFF, or SRC if SRCOFF is
3730 NULL. The callback is passed the same opaque ARG passed to
3731 for_each_inc_dec. Return zero to continue looking for other
3732 autoinc operations or any other value to interrupt the traversal and
3733 return that value to the caller of for_each_inc_dec. */
3734typedef int (*for_each_inc_dec_fn) (rtx mem, rtx op, rtx dest, rtx src,
3735 rtx srcoff, void *arg);
3736extern int for_each_inc_dec (rtx, for_each_inc_dec_fn, void *arg);
3737
3738extern rtx regno_use_in (unsigned int, rtx);
3739extern bool auto_inc_p (const_rtx);
3740extern bool in_insn_list_p (const rtx_insn_list *, const rtx_insn *);
3741extern void remove_node_from_insn_list (const rtx_insn *, rtx_insn_list **);
3742extern bool loc_mentioned_in_p (rtx *, const_rtx);
3744extern bool keep_with_call_p (const rtx_insn *);
3745extern bool label_is_jump_target_p (const_rtx, const rtx_insn *);
3746extern int pattern_cost (rtx, bool);
3747extern int insn_cost (rtx_insn *, bool);
3748extern unsigned seq_cost (const rtx_insn *, bool);
3749
3750/* Given an insn and condition, return a canonical description of
3751 the test being made. */
3752extern rtx canonicalize_condition (rtx_insn *, rtx, int, rtx_insn **, rtx,
3753 int, int);
3754
3755/* Given a JUMP_INSN, return a canonical description of the test
3756 being made. */
3757extern rtx get_condition (rtx_insn *, rtx_insn **, int, int);
3759/* Information about a subreg of a hard register. */
3760struct subreg_info
3762 /* Offset of first hard register involved in the subreg. */
3763 int offset;
3764 /* Number of hard registers involved in the subreg. In the case of
3765 a paradoxical subreg, this is the number of registers that would
3766 be modified by writing to the subreg; some of them may be don't-care
3767 when reading from the subreg. */
3768 int nregs;
3769 /* Whether this subreg can be represented as a hard reg with the new
3770 mode (by adding OFFSET to the original hard register). */
3771 bool representable_p;
3772};
3773
3774extern void subreg_get_info (unsigned int, machine_mode,
3775 poly_uint64, machine_mode,
3776 struct subreg_info *);
3777
3778/* lists.cc */
3779
3780extern void free_EXPR_LIST_list (rtx_expr_list **);
3781extern void free_INSN_LIST_list (rtx_insn_list **);
3782extern void free_EXPR_LIST_node (rtx);
3783extern void free_INSN_LIST_node (rtx);
3787extern rtx_expr_list *alloc_EXPR_LIST (int, rtx, rtx);
3789extern rtx remove_list_elem (rtx, rtx *);
3792
3793
3794/* reginfo.cc */
3795
3796/* Resize reg info. */
3797extern bool resize_reg_info (void);
3798/* Free up register info memory. */
3799extern void free_reg_info (void);
3800extern void init_subregs_of_mode (void);
3801extern void finish_subregs_of_mode (void);
3802extern void reginfo_cc_finalize (void);
3803
3804/* recog.cc */
3806extern int asm_noperands (const_rtx);
3807extern const char *decode_asm_operands (rtx, rtx *, rtx **, const char **,
3808 machine_mode *, location_t *);
3809extern void get_referenced_operands (const char *, bool *, unsigned int);
3810
3811extern enum reg_class reg_preferred_class (int);
3812extern enum reg_class reg_alternate_class (int);
3813extern enum reg_class reg_allocno_class (int);
3814extern void setup_reg_classes (int, enum reg_class, enum reg_class,
3815 enum reg_class);
3816
3817extern void split_all_insns (void);
3818extern void split_all_insns_noflow (void);
3819
3820#define MAX_SAVED_CONST_INT 64
3823#define const0_rtx (const_int_rtx[MAX_SAVED_CONST_INT])
3824#define const1_rtx (const_int_rtx[MAX_SAVED_CONST_INT+1])
3825#define const2_rtx (const_int_rtx[MAX_SAVED_CONST_INT+2])
3826#define constm1_rtx (const_int_rtx[MAX_SAVED_CONST_INT-1])
3827extern GTY(()) rtx const_true_rtx;
3828
3829extern GTY(()) rtx const_tiny_rtx[4][(int) MAX_MACHINE_MODE];
3830
3831/* Returns a constant 0 rtx in mode MODE. Integer modes are treated the
3832 same as VOIDmode. */
3833
3834#define CONST0_RTX(MODE) (const_tiny_rtx[0][(int) (MODE)])
3835
3836/* Likewise, for the constants 1 and 2 and -1. */
3838#define CONST1_RTX(MODE) (const_tiny_rtx[1][(int) (MODE)])
3839#define CONST2_RTX(MODE) (const_tiny_rtx[2][(int) (MODE)])
3840#define CONSTM1_RTX(MODE) (const_tiny_rtx[3][(int) (MODE)])
3841
3842extern GTY(()) rtx pc_rtx;
3843extern GTY(()) rtx ret_rtx;
3844extern GTY(()) rtx simple_return_rtx;
3845extern GTY(()) rtx_insn *invalid_insn_rtx;
3846
3847/* If HARD_FRAME_POINTER_REGNUM is defined, then a special dummy reg
3848 is used to represent the frame pointer. This is because the
3849 hard frame pointer and the automatic variables are separated by an amount
3850 that cannot be determined until after register allocation. We can assume
3851 that in this case ELIMINABLE_REGS will be defined, one action of which
3852 will be to eliminate FRAME_POINTER_REGNUM into HARD_FRAME_POINTER_REGNUM. */
3853#ifndef HARD_FRAME_POINTER_REGNUM
3854#define HARD_FRAME_POINTER_REGNUM FRAME_POINTER_REGNUM
3855#endif
3857#ifndef HARD_FRAME_POINTER_IS_FRAME_POINTER
3858#define HARD_FRAME_POINTER_IS_FRAME_POINTER \
3859 (HARD_FRAME_POINTER_REGNUM == FRAME_POINTER_REGNUM)
3860#endif
3862#ifndef HARD_FRAME_POINTER_IS_ARG_POINTER
3863#define HARD_FRAME_POINTER_IS_ARG_POINTER \
3864 (HARD_FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM)
3865#endif
3867/* Index labels for global_rtl. */
3872/* For register elimination to work properly these hard_frame_pointer_rtx,
3873 frame_pointer_rtx, and arg_pointer_rtx must be the same if they refer to
3874 the same register. */
3875#if FRAME_POINTER_REGNUM == ARG_POINTER_REGNUM
3877#endif
3878#if HARD_FRAME_POINTER_IS_FRAME_POINTER
3880#else
3882#endif
3883#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
3884#if HARD_FRAME_POINTER_IS_ARG_POINTER
3886#else
3888#endif
3889#endif
3896
3897 GR_MAX
3898};
3900/* Target-dependent globals. */
3901struct GTY(()) target_rtl {
3902 /* All references to the hard registers in global_rtl_index go through
3903 these unique rtl objects. On machines where the frame-pointer and
3904 arg-pointer are the same register, they use the same unique object.
3905
3906 After register allocation, other rtl objects which used to be pseudo-regs
3907 may be clobbered to refer to the frame-pointer register.
3908 But references that were originally to the frame-pointer can be
3909 distinguished from the others because they contain frame_pointer_rtx.
3910
3911 When to use frame_pointer_rtx and hard_frame_pointer_rtx is a little
3912 tricky: until register elimination has taken place hard_frame_pointer_rtx
3913 should be used if it is being set, and frame_pointer_rtx otherwise. After
3914 register elimination hard_frame_pointer_rtx should always be used.
3915 On machines where the two registers are same (most) then these are the
3916 same. */
3919 /* A unique representation of (REG:Pmode PIC_OFFSET_TABLE_REGNUM). */
3921
3922 /* A unique representation of (REG:Pmode RETURN_ADDRESS_POINTER_REGNUM).
3923 This is used to implement __builtin_return_address for some machines;
3924 see for instance the MIPS port. */
3926
3927 /* Commonly used RTL for hard registers. These objects are not
3928 necessarily unique, so we allocate them separately from global_rtl.
3929 They are initialized once per compilation unit, then copied into
3930 regno_reg_rtx at the beginning of each function. */
3931 rtx x_initial_regno_reg_rtx[FIRST_PSEUDO_REGISTER];
3933 /* A sample (mem:M stack_pointer_rtx) rtx for each mode M. */
3934 rtx x_top_of_stack[MAX_MACHINE_MODE];
3935
3936 /* Static hunks of RTL used by the aliasing code; these are treated
3937 as persistent to avoid unnecessary RTL allocations. */
3938 rtx x_static_reg_base_value[FIRST_PSEUDO_REGISTER];
3940 /* The default memory attributes for each mode. */
3941 class mem_attrs *x_mode_mem_attrs[(int) MAX_MACHINE_MODE];
3943 /* Track if RTL has been initialized. */
3945};
3946
3947extern GTY(()) struct target_rtl default_target_rtl;
3948#if SWITCHABLE_TARGET
3950#else
3951#define this_target_rtl (&default_target_rtl)
3952#endif
3953
3954#define global_rtl \
3955 (this_target_rtl->x_global_rtl)
3956#define pic_offset_table_rtx \
3957 (this_target_rtl->x_pic_offset_table_rtx)
3958#define return_address_pointer_rtx \
3959 (this_target_rtl->x_return_address_pointer_rtx)
3960#define top_of_stack \
3961 (this_target_rtl->x_top_of_stack)
3962#define mode_mem_attrs \
3963 (this_target_rtl->x_mode_mem_attrs)
3964
3965/* All references to certain hard regs, except those created
3966 by allocating pseudo regs into them (when that's possible),
3967 go through these unique rtx objects. */
3968#define stack_pointer_rtx (global_rtl[GR_STACK_POINTER])
3969#define frame_pointer_rtx (global_rtl[GR_FRAME_POINTER])
3970#define hard_frame_pointer_rtx (global_rtl[GR_HARD_FRAME_POINTER])
3971#define arg_pointer_rtx (global_rtl[GR_ARG_POINTER])
3972
3973#ifndef GENERATOR_FILE
3974/* Return the attributes of a MEM rtx. */
3975inline const class mem_attrs *
3977{
3978 class mem_attrs *attrs;
3979
3980 attrs = MEM_ATTRS (x);
3981 if (!attrs)
3982 attrs = mode_mem_attrs[(int) GET_MODE (x)];
3983 return attrs;
3984}
3985#endif
3986
3987/* Include the RTL generation functions. */
3988
3989#ifndef GENERATOR_FILE
3990#include "genrtl.h"
3991#undef gen_rtx_ASM_INPUT
3992#define gen_rtx_ASM_INPUT(MODE, ARG0) \
3993 gen_rtx_fmt_sL (ASM_INPUT, (MODE), (ARG0), 0)
3994#define gen_rtx_ASM_INPUT_loc(MODE, ARG0, LOC) \
3995 gen_rtx_fmt_sL (ASM_INPUT, (MODE), (ARG0), (LOC))
3996#endif
3997
3998/* There are some RTL codes that require special attention; the
3999 generation functions included above do the raw handling. If you
4000 add to this list, modify special_rtx in gengenrtl.cc as well. */
4001
4002extern rtx_expr_list *gen_rtx_EXPR_LIST (machine_mode, rtx, rtx);
4003extern rtx_insn_list *gen_rtx_INSN_LIST (machine_mode, rtx, rtx);
4004extern rtx_insn *
4005gen_rtx_INSN (machine_mode mode, rtx_insn *prev_insn, rtx_insn *next_insn,
4006 basic_block bb, rtx pattern, location_t location, int code,
4007 rtx reg_notes);
4008extern rtx gen_rtx_CONST_INT (machine_mode, HOST_WIDE_INT);
4009extern rtx gen_rtx_CONST_VECTOR (machine_mode, rtvec);
4010extern void set_mode_and_regno (rtx, machine_mode, unsigned int);
4011extern rtx init_raw_REG (rtx, machine_mode, unsigned int);
4012extern rtx gen_raw_REG (machine_mode, unsigned int);
4013#define alloca_raw_REG(mode, regno) \
4014 init_raw_REG (rtx_alloca (REG), (mode), (regno))
4015extern rtx gen_rtx_REG (machine_mode, unsigned int);
4016extern rtx gen_rtx_SUBREG (machine_mode, rtx, poly_uint64);
4017extern rtx gen_rtx_MEM (machine_mode, rtx);
4018extern rtx gen_rtx_VAR_LOCATION (machine_mode, tree, rtx,
4019 enum var_init_status);
4020
4021#ifdef GENERATOR_FILE
4022#define PUT_MODE(RTX, MODE) PUT_MODE_RAW (RTX, MODE)
4023#else
4024inline void
4025PUT_MODE (rtx x, machine_mode mode)
4026{
4027 if (REG_P (x))
4028 set_mode_and_regno (x, mode, REGNO (x));
4029 else
4030 PUT_MODE_RAW (x, mode);
4031}
4032#endif
4033
4034#define GEN_INT(N) gen_rtx_CONST_INT (VOIDmode, (N))
4035
4036/* Virtual registers are used during RTL generation to refer to locations into
4037 the stack frame when the actual location isn't known until RTL generation
4038 is complete. The routine instantiate_virtual_regs replaces these with
4039 the proper value, which is normally {frame,arg,stack}_pointer_rtx plus
4040 a constant. */
4041
4042#define FIRST_VIRTUAL_REGISTER (FIRST_PSEUDO_REGISTER)
4043
4044/* This points to the first word of the incoming arguments passed on the stack,
4045 either by the caller or by the callee when pretending it was passed by the
4046 caller. */
4047
4048#define virtual_incoming_args_rtx (global_rtl[GR_VIRTUAL_INCOMING_ARGS])
4049
4050#define VIRTUAL_INCOMING_ARGS_REGNUM (FIRST_VIRTUAL_REGISTER)
4051
4052/* If FRAME_GROWS_DOWNWARD, this points to immediately above the first
4053 variable on the stack. Otherwise, it points to the first variable on
4054 the stack. */
4055
4056#define virtual_stack_vars_rtx (global_rtl[GR_VIRTUAL_STACK_ARGS])
4057
4058#define VIRTUAL_STACK_VARS_REGNUM ((FIRST_VIRTUAL_REGISTER) + 1)
4059
4060/* This points to the location of dynamically-allocated memory on the stack
4061 immediately after the stack pointer has been adjusted by the amount
4062 desired. */
4063
4064#define virtual_stack_dynamic_rtx (global_rtl[GR_VIRTUAL_STACK_DYNAMIC])
4065
4066#define VIRTUAL_STACK_DYNAMIC_REGNUM ((FIRST_VIRTUAL_REGISTER) + 2)
4067
4068/* This points to the location in the stack at which outgoing arguments should
4069 be written when the stack is pre-pushed (arguments pushed using push
4070 insns always use sp). */
4071
4072#define virtual_outgoing_args_rtx (global_rtl[GR_VIRTUAL_OUTGOING_ARGS])
4073
4074#define VIRTUAL_OUTGOING_ARGS_REGNUM ((FIRST_VIRTUAL_REGISTER) + 3)
4075
4076/* This points to the Canonical Frame Address of the function. This
4077 should correspond to the CFA produced by INCOMING_FRAME_SP_OFFSET,
4078 but is calculated relative to the arg pointer for simplicity; the
4079 frame pointer nor stack pointer are necessarily fixed relative to
4080 the CFA until after reload. */
4081
4082#define virtual_cfa_rtx (global_rtl[GR_VIRTUAL_CFA])
4083
4084#define VIRTUAL_CFA_REGNUM ((FIRST_VIRTUAL_REGISTER) + 4)
4085
4086#define LAST_VIRTUAL_POINTER_REGISTER ((FIRST_VIRTUAL_REGISTER) + 4)
4087
4088/* This is replaced by crtl->preferred_stack_boundary / BITS_PER_UNIT
4089 when finalized. */
4090
4091#define virtual_preferred_stack_boundary_rtx \
4092 (global_rtl[GR_VIRTUAL_PREFERRED_STACK_BOUNDARY])
4093
4094#define VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM \
4095 ((FIRST_VIRTUAL_REGISTER) + 5)
4096
4097#define LAST_VIRTUAL_REGISTER ((FIRST_VIRTUAL_REGISTER) + 5)
4099/* Nonzero if REGNUM is a pointer into the stack frame. */
4100#define REGNO_PTR_FRAME_P(REGNUM) \
4101 ((REGNUM) == STACK_POINTER_REGNUM \
4102 || (REGNUM) == FRAME_POINTER_REGNUM \
4103 || (REGNUM) == HARD_FRAME_POINTER_REGNUM \
4104 || (REGNUM) == ARG_POINTER_REGNUM \
4105 || VIRTUAL_REGISTER_NUM_P (REGNUM))
4107/* REGNUM never really appearing in the INSN stream. */
4108#define INVALID_REGNUM (~(unsigned int) 0)
4110/* REGNUM for which no debug information can be generated. */
4111#define IGNORED_DWARF_REGNUM (INVALID_REGNUM - 1)
4112
4113extern rtx output_constant_def (tree, int);
4115
4116/* Nonzero after end of reload pass.
4117 Set to 1 or 0 by reload1.cc. */
4118
4119extern int reload_completed;
4120
4121/* Nonzero after thread_prologue_and_epilogue_insns has run. */
4122extern int epilogue_completed;
4123
4124/* Set to 1 while reload_as_needed is operating.
4125 Required by some machines to handle any generated moves differently. */
4126
4127extern int reload_in_progress;
4128
4129/* Set to true while in IRA. */
4130extern bool ira_in_progress;
4131
4132/* Set to true while in LRA. */
4133extern bool lra_in_progress;
4134
4135/* This macro indicates whether you may create a new
4136 pseudo-register. */
4137
4138#define can_create_pseudo_p() (!reload_in_progress && !reload_completed)
4139
4140#ifdef STACK_REGS
4141/* Nonzero after end of regstack pass.
4142 Set to 1 or 0 by reg-stack.cc. */
4143extern int regstack_completed;
4144#endif
4145
4146/* If this is nonzero, we do not bother generating VOLATILE
4147 around volatile memory references, and we are willing to
4148 output indirect addresses. If cse is to follow, we reject
4149 indirect addresses so a useful potential cse is generated;
4150 if it is used only once, instruction combination will produce
4151 the same indirect address eventually. */
4152extern int cse_not_expected;
4153
4154/* Translates rtx code to tree code, for those codes needed by
4155 real_arithmetic. The function returns an int because the caller may not
4156 know what `enum tree_code' means. */
4157
4158extern int rtx_to_tree_code (enum rtx_code);
4159
4160/* In cse.cc */
4161extern int delete_trivially_dead_insns (rtx_insn *, int);
4162extern bool exp_equiv_p (const_rtx, const_rtx, int, bool);
4163
4164typedef bool (*hash_rtx_callback_function) (const_rtx, machine_mode, rtx *,
4165 machine_mode *);
4166extern unsigned hash_rtx (const_rtx, machine_mode, int *, int *,
4168
4169/* In dse.cc */
4170extern bool check_for_inc_dec (rtx_insn *insn);
4171
4172/* In jump.cc */
4173extern bool comparison_dominates_p (enum rtx_code, enum rtx_code);
4174extern bool jump_to_label_p (const rtx_insn *);
4175extern bool condjump_p (const rtx_insn *);
4176extern bool any_condjump_p (const rtx_insn *);
4177extern bool any_uncondjump_p (const rtx_insn *);
4178extern rtx pc_set (const rtx_insn *);
4179extern rtx condjump_label (const rtx_insn *);
4180extern bool simplejump_p (const rtx_insn *);
4181extern bool returnjump_p (const rtx_insn *);
4182extern bool eh_returnjump_p (rtx_insn *);
4183extern bool onlyjump_p (const rtx_insn *);
4184extern bool invert_jump_1 (rtx_jump_insn *, rtx);
4185extern bool invert_jump (rtx_jump_insn *, rtx, int);
4187extern int true_regnum (const_rtx);
4188extern unsigned int reg_or_subregno (const_rtx);
4189extern bool redirect_jump_1 (rtx_insn *, rtx);
4190extern void redirect_jump_2 (rtx_jump_insn *, rtx, rtx, int, int);
4191extern bool redirect_jump (rtx_jump_insn *, rtx, int);
4192extern void rebuild_jump_labels (rtx_insn *);
4193extern void rebuild_jump_labels_chain (rtx_insn *);
4194extern rtx reversed_comparison (const_rtx, machine_mode);
4197 const_rtx, const rtx_insn *);
4198extern void delete_for_peephole (rtx_insn *, rtx_insn *);
4199extern bool condjump_in_parallel_p (const rtx_insn *);
4200
4201/* In emit-rtl.cc. */
4202extern int max_reg_num (void);
4203extern int max_label_num (void);
4204extern int get_first_label_num (void);
4206extern void delete_insns_since (rtx_insn *);
4207extern void mark_reg_pointer (rtx, int);
4208extern void mark_user_reg (rtx);
4209extern void reset_used_flags (rtx);
4210extern void set_used_flags (rtx);
4211extern void reorder_insns (rtx_insn *, rtx_insn *, rtx_insn *);
4212extern void reorder_insns_nobb (rtx_insn *, rtx_insn *, rtx_insn *);
4213extern int get_max_insn_count (void);
4214extern bool in_sequence_p (void);
4215extern void init_emit (void);
4216extern void init_emit_regs (void);
4217extern void init_derived_machine_modes (void);
4218extern void init_emit_once (void);
4219extern void push_topmost_sequence (void);
4220extern void pop_topmost_sequence (void);
4222extern void unshare_all_rtl (void);
4223extern void unshare_all_rtl_again (rtx_insn *);
4224extern void unshare_all_rtl_in_chain (rtx_insn *);
4225extern void verify_rtl_sharing (void);
4226extern void add_insn (rtx_insn *);
4227extern void add_insn_before (rtx_insn *, rtx_insn *, basic_block);
4228extern void add_insn_after (rtx_insn *, rtx_insn *, basic_block);
4229extern void remove_insn (rtx_insn *);
4230extern rtx_insn *emit (rtx, bool = true);
4231extern void emit_insn_at_entry (rtx);
4232extern rtx gen_lowpart_SUBREG (machine_mode, rtx);
4233extern rtx gen_const_mem (machine_mode, rtx);
4234extern rtx gen_frame_mem (machine_mode, rtx);
4235extern rtx gen_tmp_stack_mem (machine_mode, rtx);
4236extern bool validate_subreg (machine_mode, machine_mode,
4238
4239/* In combine.cc */
4240extern unsigned int extended_count (const_rtx, machine_mode, bool);
4241extern rtx remove_death (unsigned int, rtx_insn *);
4243
4244/* In sched-rgn.cc. */
4245extern void schedule_insns (void);
4247/* In sched-ebb.cc. */
4248extern void schedule_ebbs (void);
4250/* In sel-sched-dump.cc. */
4251extern void sel_sched_fix_param (const char *param, const char *val);
4252
4253/* In print-rtl.cc */
4254extern const char *print_rtx_head;
4255extern void debug (const rtx_def &ref);
4256extern void debug (const rtx_def *ptr);
4257extern void debug_rtx (const_rtx);
4258extern void debug_rtx_list (const rtx_insn *, int);
4259extern void debug_rtx_range (const rtx_insn *, const rtx_insn *);
4260extern const rtx_insn *debug_rtx_find (const rtx_insn *, int);
4261extern void print_mem_expr (FILE *, const_tree);
4262extern void print_rtl (FILE *, const_rtx);
4263extern void print_simple_rtl (FILE *, const_rtx);
4264extern void print_rtl_single (FILE *, const_rtx);
4265extern void print_rtl_single_with_indent (FILE *, const_rtx, int);
4266extern void print_inline_rtx (FILE *, const_rtx, int);
4267
4268/* In stmt.cc */
4269extern void expand_null_return (void);
4270extern void expand_naked_return (void);
4271extern void emit_jump (rtx);
4272
4273/* Memory operation built-ins differ by return value. Mapping
4274 of the enum values is following:
4275 - RETURN_BEGIN - return destination, e.g. memcpy
4276 - RETURN_END - return destination + n, e.g. mempcpy
4277 - RETURN_END_MINUS_ONE - return a pointer to the terminating
4278 null byte of the string, e.g. strcpy
4286};
4287
4288/* In expr.cc */
4289extern rtx move_by_pieces (rtx, rtx, unsigned HOST_WIDE_INT,
4290 unsigned int, memop_ret);
4293
4294/* In expmed.cc */
4295extern void init_expmed (void);
4296extern void expand_inc (rtx, rtx);
4297extern void expand_dec (rtx, rtx);
4298
4299/* In lower-subreg.cc */
4300extern void init_lower_subreg (void);
4301
4302/* In gcse.cc */
4303extern bool can_copy_p (machine_mode);
4304extern bool can_assign_to_reg_without_clobbers_p (rtx, machine_mode);
4306
4307/* In cprop.cc */
4308extern rtx fis_get_condition (rtx_insn *);
4309
4310/* In ira.cc */
4312extern void mark_elimination (int, int);
4313
4314/* In reginfo.cc */
4317extern void globalize_reg (tree, int);
4318extern void init_reg_modes_target (void);
4319extern void init_regs (void);
4320extern void reinit_regs (void);
4321extern void init_fake_stack_mems (void);
4322extern void save_register_info (void);
4323extern void init_reg_sets (void);
4324extern void regclass (rtx, int);
4325extern void reg_scan (rtx_insn *, unsigned int);
4326extern void fix_register (const char *, int, int);
4327extern const HARD_REG_SET *valid_mode_changes_for_regno (unsigned int);
4328
4329/* In reload1.cc */
4330extern bool function_invariant_p (const_rtx);
4332/* In calls.cc */
4339 LCT_THROW = 4,
4341};
4342
4344 machine_mode, int, rtx_mode_t *);
4345
4346/* Output a library call and discard the returned value. FUN is the
4347 address of the function, as a SYMBOL_REF rtx, and OUTMODE is the mode
4348 of the (discarded) return value. FN_TYPE is LCT_NORMAL for `normal'
4349 calls, LCT_CONST for `const' calls, LCT_PURE for `pure' calls, or
4350 another LCT_ value for other types of library calls.
4351
4352 There are different overloads of this function for different numbers
4353 of arguments. In each case the argument value is followed by its mode. */
4355inline void
4356emit_library_call (rtx fun, libcall_type fn_type, machine_mode outmode)
4357{
4358 emit_library_call_value_1 (0, fun, NULL_RTX, fn_type, outmode, 0, NULL);
4359}
4361inline void
4362emit_library_call (rtx fun, libcall_type fn_type, machine_mode outmode,
4363 rtx arg1, machine_mode arg1_mode)
4364{
4365 rtx_mode_t args[] = { rtx_mode_t (arg1, arg1_mode) };
4366 emit_library_call_value_1 (0, fun, NULL_RTX, fn_type, outmode, 1, args);
4367}
4369inline void
4370emit_library_call (rtx fun, libcall_type fn_type, machine_mode outmode,
4371 rtx arg1, machine_mode arg1_mode,
4372 rtx arg2, machine_mode arg2_mode)
4373{
4374 rtx_mode_t args[] = {
4375 rtx_mode_t (arg1, arg1_mode),
4376 rtx_mode_t (arg2, arg2_mode)
4377 };
4378 emit_library_call_value_1 (0, fun, NULL_RTX, fn_type, outmode, 2, args);
4379}
4381inline void
4382emit_library_call (rtx fun, libcall_type fn_type, machine_mode outmode,
4383 rtx arg1, machine_mode arg1_mode,
4384 rtx arg2, machine_mode arg2_mode,
4385 rtx arg3, machine_mode arg3_mode)
4386{
4387 rtx_mode_t args[] = {
4388 rtx_mode_t (arg1, arg1_mode),
4389 rtx_mode_t (arg2, arg2_mode),
4390 rtx_mode_t (arg3, arg3_mode)
4391 };
4392 emit_library_call_value_1 (0, fun, NULL_RTX, fn_type, outmode, 3, args);
4393}
4395inline void
4396emit_library_call (rtx fun, libcall_type fn_type, machine_mode outmode,
4397 rtx arg1, machine_mode arg1_mode,
4398 rtx arg2, machine_mode arg2_mode,
4399 rtx arg3, machine_mode arg3_mode,
4400 rtx arg4, machine_mode arg4_mode)
4401{
4402 rtx_mode_t args[] = {
4403 rtx_mode_t (arg1, arg1_mode),
4404 rtx_mode_t (arg2, arg2_mode),
4405 rtx_mode_t (arg3, arg3_mode),
4406 rtx_mode_t (arg4, arg4_mode)
4407 };
4408 emit_library_call_value_1 (0, fun, NULL_RTX, fn_type, outmode, 4, args);
4409}
4410
4411/* Like emit_library_call, but return the value produced by the call.
4412 Use VALUE to store the result if it is nonnull, otherwise pick a
4413 convenient location. */
4415inline rtx
4416emit_library_call_value (rtx fun, rtx value, libcall_type fn_type,
4417 machine_mode outmode)
4418{
4419 return emit_library_call_value_1 (1, fun, value, fn_type, outmode, 0, NULL);
4420}
4422inline rtx
4423emit_library_call_value (rtx fun, rtx value, libcall_type fn_type,
4424 machine_mode outmode,
4425 rtx arg1, machine_mode arg1_mode)
4426{
4427 rtx_mode_t args[] = { rtx_mode_t (arg1, arg1_mode) };
4428 return emit_library_call_value_1 (1, fun, value, fn_type, outmode, 1, args);
4429}
4431inline rtx
4432emit_library_call_value (rtx fun, rtx value, libcall_type fn_type,
4433 machine_mode outmode,
4434 rtx arg1, machine_mode arg1_mode,
4435 rtx arg2, machine_mode arg2_mode)
4436{
4437 rtx_mode_t args[] = {
4438 rtx_mode_t (arg1, arg1_mode),
4439 rtx_mode_t (arg2, arg2_mode)
4440 };
4441 return emit_library_call_value_1 (1, fun, value, fn_type, outmode, 2, args);
4442}
4444inline rtx
4445emit_library_call_value (rtx fun, rtx value, libcall_type fn_type,
4446 machine_mode outmode,
4447 rtx arg1, machine_mode arg1_mode,
4448 rtx arg2, machine_mode arg2_mode,
4449 rtx arg3, machine_mode arg3_mode)
4450{
4451 rtx_mode_t args[] = {
4452 rtx_mode_t (arg1, arg1_mode),
4453 rtx_mode_t (arg2, arg2_mode),
4454 rtx_mode_t (arg3, arg3_mode)
4455 };
4456 return emit_library_call_value_1 (1, fun, value, fn_type, outmode, 3, args);
4457}
4459inline rtx
4460emit_library_call_value (rtx fun, rtx value, libcall_type fn_type,
4461 machine_mode outmode,
4462 rtx arg1, machine_mode arg1_mode,
4463 rtx arg2, machine_mode arg2_mode,
4464 rtx arg3, machine_mode arg3_mode,
4465 rtx arg4, machine_mode arg4_mode)
4466{
4467 rtx_mode_t args[] = {
4468 rtx_mode_t (arg1, arg1_mode),
4469 rtx_mode_t (arg2, arg2_mode),
4470 rtx_mode_t (arg3, arg3_mode),
4471 rtx_mode_t (arg4, arg4_mode)
4472 };
4473 return emit_library_call_value_1 (1, fun, value, fn_type, outmode, 4, args);
4474}
4475
4476/* In varasm.cc */
4477extern void init_varasm_once (void);
4478
4480
4481/* In read-rtl.cc */
4482#ifdef GENERATOR_FILE
4483extern bool read_rtx (const char *, vec<rtx> *);
4484#endif
4485
4486/* In alias.cc */
4487extern rtx canon_rtx (rtx);
4488extern rtx get_addr (rtx);
4489extern bool read_dependence (const_rtx, const_rtx);
4490extern bool true_dependence (const_rtx, machine_mode, const_rtx);
4491extern bool canon_true_dependence (const_rtx, machine_mode, rtx,
4492 const_rtx, rtx);
4493extern bool anti_dependence (const_rtx, const_rtx);
4494extern bool canon_anti_dependence (const_rtx, bool,
4495 const_rtx, machine_mode, rtx);
4497extern bool canon_output_dependence (const_rtx, bool,
4498 const_rtx, machine_mode, rtx);
4499extern bool may_alias_p (const_rtx, const_rtx);
4500extern void init_alias_target (void);
4501extern void init_alias_analysis (void);
4502extern void end_alias_analysis (void);
4505extern bool may_be_sp_based_p (rtx);
4506extern rtx gen_hard_reg_clobber (machine_mode, unsigned int);
4507extern rtx get_reg_known_value (unsigned int);
4508extern bool get_reg_known_equiv_p (unsigned int);
4509extern rtx get_reg_base_value (unsigned int);
4511
4512#ifdef STACK_REGS
4513extern bool stack_regs_mentioned (const_rtx insn);
4514#endif
4515
4516/* In toplev.cc */
4517extern GTY(()) rtx stack_limit_rtx;
4518
4519/* In var-tracking.cc */
4520extern unsigned int variable_tracking_main (void);
4521extern void delete_vta_debug_insns (bool);
4522
4523/* In stor-layout.cc. */
4524extern void get_mode_bounds (scalar_int_mode, int,
4525 scalar_int_mode, rtx *, rtx *);
4526
4527/* In loop-iv.cc */
4528extern rtx canon_condition (rtx);
4529extern void simplify_using_condition (rtx, rtx *, bitmap);
4530
4531/* In final.cc */
4532extern void compute_alignments (void);
4533extern void update_alignments (vec<rtx> &);
4534extern int asm_str_count (const char *templ);
4535
4538 rtx (*gen_lowpart) (machine_mode, rtx);
4539 rtx (*gen_lowpart_no_emit) (machine_mode, rtx);
4541 unsigned HOST_WIDE_INT *);
4543 unsigned int *);
4544 bool (*reg_truncated_to_mode) (machine_mode, const_rtx);
4545
4546 /* Whenever you add entries here, make sure you adjust rtlhooks-def.h. */
4547};
4548
4549/* Each pass can provide its own. */
4550extern struct rtl_hooks rtl_hooks;
4551
4552/* ... but then it has to restore these. */
4553extern const struct rtl_hooks general_rtl_hooks;
4555/* Keep this for the nonce. */
4556#define gen_lowpart rtl_hooks.gen_lowpart
4557
4558extern void insn_locations_init (void);
4559extern void insn_locations_finalize (void);
4560extern void set_curr_insn_location (location_t);
4561extern location_t curr_insn_location (void);
4562extern void set_insn_locations (rtx_insn *, location_t);
4563
4564/* rtl-error.cc */
4565extern void _fatal_insn_not_found (const_rtx, const char *, int, const char *)
4566 ATTRIBUTE_NORETURN ATTRIBUTE_COLD;
4567extern void _fatal_insn (const char *, const_rtx, const char *, int, const char *)
4568 ATTRIBUTE_NORETURN ATTRIBUTE_COLD;
4569
4570#define fatal_insn(msgid, insn) \
4571 _fatal_insn (msgid, insn, __FILE__, __LINE__, __FUNCTION__)
4572#define fatal_insn_not_found(insn) \
4573 _fatal_insn_not_found (insn, __FILE__, __LINE__, __FUNCTION__)
4574
4575/* reginfo.cc */
4576extern tree GTY(()) global_regs_decl[FIRST_PSEUDO_REGISTER];
4577
4578/* Information about the function that is propagated by the RTL backend.
4579 Available only for functions that has been already assembled. */
4581struct GTY(()) cgraph_rtl_info {
4583
4584 /* Which registers the function clobbers, either directly or by
4585 calling another function. */
4587};
4588
4589/* If loads from memories of mode MODE always sign or zero extend,
4590 return SIGN_EXTEND or ZERO_EXTEND as appropriate. Return UNKNOWN
4591 otherwise. */
4593inline rtx_code
4594load_extend_op (machine_mode mode)
4595{
4596 scalar_int_mode int_mode;
4597 if (is_a <scalar_int_mode> (mode, &int_mode)
4598 && GET_MODE_PRECISION (int_mode) < BITS_PER_WORD)
4599 return LOAD_EXTEND_OP (int_mode);
4600 return UNKNOWN;
4601}
4602
4603/* If X is a PLUS of a base and a constant offset, add the constant to *OFFSET
4604 and return the base. Return X otherwise. */
4606inline rtx
4608{
4609 if (GET_CODE (x) == PLUS)
4610 {
4611 poly_int64 suboffset;
4612 x = strip_offset (x, &suboffset);
4613 *offset = poly_uint64 (*offset) + suboffset;
4614 }
4615 return x;
4616}
4617
4618/* Return true if X is an operation that always operates on the full
4619 registers for WORD_REGISTER_OPERATIONS architectures. */
4621inline bool
4623{
4624 switch (GET_CODE (x))
4625 {
4626 case CONST_INT:
4627 case ROTATE:
4628 case ROTATERT:
4629 case SIGN_EXTRACT:
4630 case ZERO_EXTRACT:
4631 return false;
4632
4633 default:
4634 return true;
4635 }
4636}
4637
4638/* Holds an rtx comparison to simplify passing many parameters pertaining to a
4639 single comparison. */
4643 rtx op0, op1;
4644 machine_mode mode;
4645};
4647/* gtype-desc.cc. */
4648extern void gt_ggc_mx (rtx &);
4649extern void gt_pch_nx (rtx &);
4650extern void gt_pch_nx (rtx &, gt_pointer_operator, void *);
4651
4652#endif /* ! GCC_RTL_H */
static int unique_id
Definition alias.cc:221
Definition varasm.cc:3951
Definition machmode.h:833
Definition rtl.h:153
poly_int64 offset
Definition rtl.h:164
unsigned char addrspace
Definition rtl.h:179
tree expr
Definition rtl.h:160
alias_set_type alias
Definition rtl.h:171
mem_attrs()
Definition emit-rtl.cc:1829
poly_int64 size
Definition rtl.h:168
bool offset_known_p
Definition rtl.h:182
bool size_known_p
Definition rtl.h:185
unsigned int align
Definition rtl.h:176
Definition poly-int.h:378
C coeffs[N]
Definition poly-int.h:433
Definition function-abi.h:35
Definition rtl.h:195
tree decl
Definition rtl.h:197
poly_int64 offset
Definition rtl.h:198
Definition machmode.h:437
Definition rtl.h:3440
rtx simplify_binary_operation_1(rtx_code, machine_mode, rtx, rtx, rtx, rtx)
Definition simplify-rtx.cc:3083
rtx simplify_binary_operation_series(rtx_code, machine_mode, rtx, rtx)
Definition simplify-rtx.cc:2790
static const unsigned int max_assoc_count
Definition rtl.h:3474
unsigned int assoc_count
Definition rtl.h:3470
rtx simplify_shift_const_int(rtx_code, machine_mode, rtx, unsigned int)
rtx simplify_relational_operation_1(rtx_code, machine_mode, machine_mode, rtx, rtx)
Definition simplify-rtx.cc:6294
rtx simplify_associative_operation(rtx_code, machine_mode, rtx, rtx)
Definition simplify-rtx.cc:2404
rtx simplify_plus_minus(rtx_code, machine_mode, rtx, rtx)
Definition simplify-rtx.cc:5906
rtx simplify_merge_mask(rtx, rtx, int)
Definition simplify-rtx.cc:7074
rtx simplify_gen_relational(rtx_code, machine_mode, machine_mode, rtx, rtx)
Definition simplify-rtx.cc:387
rtx simplify_ternary_operation_1(rtx_code, machine_mode, machine_mode, rtx, rtx, rtx)
rtx simplify_gen_binary(rtx_code, machine_mode, rtx, rtx)
Definition simplify-rtx.cc:176
unsigned int mem_depth
Definition rtl.h:3466
rtx simplify_relational_operation(rtx_code, machine_mode, machine_mode, rtx, rtx)
Definition simplify-rtx.cc:6252
rtx simplify_gen_ternary(rtx_code, machine_mode, machine_mode, rtx, rtx, rtx)
Definition simplify-rtx.cc:369
rtx simplify_subreg(machine_mode, rtx, machine_mode, poly_uint64)
Definition simplify-rtx.cc:8062
rtx simplify_logical_relational_operation(rtx_code, machine_mode, rtx, rtx, bool=false)
Definition simplify-rtx.cc:2652
rtx simplify_unary_operation(rtx_code, machine_mode, rtx, machine_mode)
Definition simplify-rtx.cc:882
rtx simplify_truncation(machine_mode, rtx, machine_mode)
Definition simplify-rtx.cc:613
rtx simplify_distribute_over_subregs(rtx_code, machine_mode, rtx, rtx)
rtx simplify_distributive_operation(rtx_code, machine_mode, rtx, rtx)
Definition simplify-rtx.cc:2827
rtx lowpart_subreg(machine_mode, rtx, machine_mode)
Definition simplify-rtx.cc:8424
rtx simplify_unary_operation_1(rtx_code, machine_mode, rtx)
Definition simplify-rtx.cc:927
rtx simplify_gen_vec_select(rtx, unsigned int)
Definition simplify-rtx.cc:8434
rtx simplify_gen_unary(rtx_code, machine_mode, rtx, machine_mode)
Definition simplify-rtx.cc:354
rtx simplify_ternary_operation(rtx_code, machine_mode, machine_mode, rtx, rtx, rtx)
Definition simplify-rtx.cc:7144
rtx simplify_binary_operation(rtx_code, machine_mode, rtx, rtx)
Definition simplify-rtx.cc:2743
rtx simplify_byte_swapping_operation(rtx_code, machine_mode, rtx, rtx)
Definition simplify-rtx.cc:2373
rtx simplify_cond_clz_ctz(rtx, rtx_code, rtx, rtx)
Definition simplify-rtx.cc:7030
rtx simplify_gen_subreg(machine_mode, rtx, machine_mode, poly_uint64)
Definition simplify-rtx.cc:8392
Definition rtl.h:2130
poly_uint16 offset
Definition rtl.h:2138
machine_mode outer_mode
Definition rtl.h:2139
machine_mode inner_mode
Definition rtl.h:2137
bool operator!=(const subreg_shape &) const
Definition rtl.h:2158
subreg_shape(machine_mode, poly_uint16, machine_mode)
Definition rtl.h:2143
unsigned HOST_WIDE_INT unique_id() const
Definition rtl.h:2169
bool operator==(const subreg_shape &) const
Definition rtl.h:2150
Definition wide-int.h:1967
Definition wide-int.h:707
bool debug
Definition collect-utils.cc:34
struct basic_block_def * basic_block
Definition coretypes.h:355
struct rtx_def * rtx
Definition coretypes.h:57
unsigned char addr_space_t
Definition coretypes.h:184
var_init_status
Definition coretypes.h:313
const struct rtvec_def * const_rtvec
Definition coretypes.h:92
const struct rtx_def * const_rtx
Definition coretypes.h:58
int reg_class_t
Definition coretypes.h:376
const union tree_node * const_tree
Definition coretypes.h:98
#define GTY(x)
Definition coretypes.h:41
void(* gt_pointer_operator)(void *, void *, void *)
Definition coretypes.h:473
class bitmap_head * bitmap
Definition coretypes.h:51
union tree_node * tree
Definition coretypes.h:97
int alias_set_type
Definition coretypes.h:349
struct rtvec_def * rtvec
Definition coretypes.h:91
#define LOAD_EXTEND_OP(M)
Definition defaults.h:1242
#define BITS_PER_WORD
Definition defaults.h:480
void ATTRIBUTE_NORETURN
Definition diagnostic-core.h:108
bool operator==(const nowarn_spec_t &lhs, const nowarn_spec_t &rhs)
Definition diagnostic-spec.h:131
bool operator!=(const nowarn_spec_t &lhs, const nowarn_spec_t &rhs)
Definition diagnostic-spec.h:139
rtx simple_return_rtx
Definition emit-rtl.cc:129
location_t epilogue_location
Definition emit-rtl.cc:6664
rtx ret_rtx
Definition emit-rtl.cc:128
rtx pc_rtx
Definition emit-rtl.cc:127
rtx const_true_rtx
Definition emit-rtl.cc:104
location_t prologue_location
Definition emit-rtl.cc:6663
rtx const_tiny_rtx[4][(int) MAX_MACHINE_MODE]
Definition emit-rtl.cc:102
struct target_rtl default_target_rtl
Definition emit-rtl.cc:68
rtx_insn * invalid_insn_rtx
Definition emit-rtl.cc:134
rtx const_int_rtx[MAX_SAVED_CONST_INT *2+1]
Definition emit-rtl.cc:124
rtx_insn * next_insn(rtx_insn *insn)
Definition emit-rtl.cc:3568
int cse_not_expected
Definition expr.cc:77
void update_alignments(vec< rtx > &label_pairs)
Definition final.cc:757
void compute_alignments(void)
Definition final.cc:612
static bool always_void_p(int idx)
Definition gengenrtl.cc:132
#define NUM_RTX_CODE
Definition gengenrtl.cc:40
static struct token T
Definition gengtype-parse.cc:45
#define NUM_POLY_INT_COEFFS
Definition genmodes.cc:859
@ SET
Definition genmodes.cc:264
HARD_REG_ELT_TYPE HARD_REG_SET
Definition hard-reg-set.h:47
HOST_WIDE_INT sext_hwi(HOST_WIDE_INT src, unsigned int prec)
Definition hwint.h:300
#define HOST_BITS_PER_WIDE_INT
Definition hwint.h:53
#define LOCATION_LOCUS(LOC)
Definition input.h:193
#define UNKNOWN_LOCATION
Definition input.h:32
bool ira_in_progress
Definition ira.cc:5535
HARD_REG_SET eliminable_regset
Definition ira.cc:428
bool is_a(U *p)
Definition is-a.h:230
T safe_as_a(U *p)
Definition is-a.h:264
T safe_dyn_cast(U *p)
Definition is-a.h:292
T as_a(U *p)
Definition is-a.h:253
void simplify_using_condition(rtx cond, rtx *expr, regset altered)
Definition loop-iv.cc:1723
rtx canon_condition(rtx cond)
Definition loop-iv.cc:1631
bool lra_in_progress
Definition lra.cc:2298
#define VECTOR_MODE_P(MODE)
Definition machmode.h:128
ALWAYS_INLINE poly_uint16 GET_MODE_SIZE(machine_mode mode)
Definition machmode.h:657
ALWAYS_INLINE poly_uint16 GET_MODE_PRECISION(machine_mode mode)
Definition machmode.h:710
#define MACHINE_MODE_BITSIZE
Definition machmode.h:258
Definition double-int.h:439
poly_int< NUM_POLY_INT_COEFFS, generic_wide_int< wide_int_ref_storage< false, false > > > rtx_to_poly_wide_ref
Definition rtl.h:2363
@ VAR_PRECISION
Definition wide-int.h:394
wide_int min_value(machine_mode, signop)
Definition rtl.h:2346
UNARY_PREDICATE fits_shwi_p(const T &)
unsigned int get_precision(const T &)
Definition wide-int.h:2166
rtx_to_poly_wide_ref to_poly_wide(const_rtx, machine_mode)
Definition rtl.h:2391
Ca unsigned int precision
Definition poly-int.h:746
wide_int max_value(machine_mode, signop)
Definition rtl.h:2354
poly_int< N, hwi_with_prec > shwi(const poly_int< N, HOST_WIDE_INT > &a, unsigned int precision)
Definition poly-int.h:721
poly_int< NUM_POLY_INT_COEFFS, unsigned short > poly_uint16
Definition poly-int-types.h:23
poly_int< NUM_POLY_INT_COEFFS, unsigned HOST_WIDE_INT > poly_uint64
Definition poly-int-types.h:25
poly_int< NUM_POLY_INT_COEFFS, wide_int_ref > poly_wide_int_ref
Definition poly-int-types.h:28
poly_int< NUM_POLY_INT_COEFFS, HOST_WIDE_INT > poly_int64
Definition poly-int-types.h:24
#define known_eq(A, B)
i
Definition poly-int.h:776
Ca const poly_int< N, Cb > & b
Definition poly-int.h:771
#define maybe_gt(A, B)
Ca & a
Definition poly-int.h:770
const char * print_rtx_head
Definition print-rtl.cc:67
int reload_completed
Definition recog.cc:96
int epilogue_completed
Definition recog.cc:99
tree global_regs_decl[FIRST_PSEUDO_REGISTER]
Definition reginfo.cc:98
int reload_in_progress
Definition reload1.cc:221
static struct decomposition decompose(rtx)
Definition reload.cc:2390
const unsigned char rtx_length[NUM_RTX_CODE]
Definition rtl.cc:45
const char *const reg_note_name[REG_NOTE_MAX]
Definition rtl.cc:146
int generating_concat_p
Definition rtl.cc:411
const unsigned char rtx_code_size[NUM_RTX_CODE]
Definition rtl.cc:125
const char *const rtx_format[NUM_RTX_CODE]
Definition rtl.cc:65
const char *const rtx_name[NUM_RTX_CODE]
Definition rtl.cc:55
int currently_expanding_to_rtl
Definition rtl.cc:414
const char *const note_insn_name[NOTE_INSN_MAX]
Definition rtl.cc:139
void decide_function_section(tree)
Definition varasm.cc:1977
void remove_reg_equal_equiv_notes_for_regno(unsigned int)
Definition rtlanal.cc:2851
#define MAX_SAVED_CONST_INT
Definition rtl.h:3818
bool output_dependence(const_rtx, const_rtx)
Definition alias.cc:3197
void copy_reg_eh_region_note_backward(rtx, rtx_insn *, rtx)
Definition except.cc:1802
rtx avoid_constant_pool_reference(rtx)
Definition simplify-rtx.cc:197
bool function_invariant_p(const_rtx)
Definition reload1.cc:5968
int low_bitmask_len(machine_mode, unsigned HOST_WIDE_INT)
Definition rtlanal.cc:6251
#define NOTE_P(X)
Definition rtl.h:872
#define RTL_INSN_CHAIN_FLAG_CHECK(NAME, RTX)
Definition rtl.h:1344
void reinit_regs(void)
Definition reginfo.cc:517
rtx delegitimize_mem_from_attrs(rtx)
Definition simplify-rtx.cc:264
bool volatile_refs_p(const_rtx)
Definition rtlanal.cc:2987
rtx & SET_NEXT_INSN(rtx_insn *insn)
Definition rtl.h:1485
rtx gen_lowpart_SUBREG(machine_mode, rtx)
Definition emit-rtl.cc:1040
rtx_insn * PREV_INSN(const rtx_insn *insn)
Definition rtl.h:1468
int set_src_cost(rtx x, machine_mode mode, bool speed_p)
Definition rtl.h:2965
void expand_inc(rtx, rtx)
Definition expmed.cc:2487
#define SUBREG_BYTE(RTX)
Definition rtl.h:2058
bool memory_modified_in_insn_p(const_rtx, const_rtx)
Definition alias.cc:3330
rtx_code_label * emit_label_before(rtx_code_label *, rtx_insn *)
Definition emit-rtl.cc:4726
void set_mode_and_regno(rtx, machine_mode, unsigned int)
Definition emit-rtl.cc:462
#define INTVAL(RTX)
Definition rtl.h:1987
unsigned int extended_count(const_rtx, machine_mode, bool)
Definition combine.cc:10393
void split_all_insns(void)
Definition recog.cc:3528
rtx_insn * emit(rtx, bool=true)
Definition emit-rtl.cc:5606
bool keep_with_call_p(const rtx_insn *)
Definition rtlanal.cc:4460
rtx simplify_unary_operation(rtx_code code, machine_mode mode, rtx op, machine_mode op_mode)
Definition rtl.h:3498
enum rtx_code signed_condition(enum rtx_code)
Definition jump.cc:663
void unshare_all_rtl(void)
Definition emit-rtl.cc:2965
void fix_register(const char *, int, int)
Definition reginfo.cc:661
rtx canon_rtx(rtx)
Definition alias.cc:1726
bool INSN_HAS_LOCATION(const rtx_insn *insn)
Definition rtl.h:1526
const int SRP_POINTER
Definition rtl.h:2531
rtx emit_library_call_value_1(int, rtx, rtx, enum libcall_type, machine_mode, int, rtx_mode_t *)
Definition calls.cc:4172
#define CONST_VECTOR_ELT(RTX, N)
Definition rtl.h:2024
#define INSN_P(X)
Definition rtl.h:869
#define RTX_HDR_SIZE
Definition rtl.h:701
rtx gen_reg_rtx(machine_mode)
Definition emit-rtl.cc:1172
int get_first_label_num(void)
Definition emit-rtl.cc:1519
enum reg_class reg_preferred_class(int)
Definition reginfo.cc:827
rtx_insn * prev_nonnote_nondebug_insn(rtx_insn *)
Definition emit-rtl.cc:3705
void insn_locations_finalize(void)
Definition emit-rtl.cc:6681
void mark_jump_label(rtx, rtx_insn *, int)
Definition jump.cc:1032
bool paradoxical_subreg_p(machine_mode outermode, machine_mode innermode)
Definition rtl.h:3221
void reset_used_flags(rtx)
Definition emit-rtl.cc:3426
rtx_jump_insn * emit_jump_insn_before_noloc(rtx, rtx_insn *)
Definition emit-rtl.cc:4682
rtx_insn * gen_rtx_INSN(machine_mode mode, rtx_insn *prev_insn, rtx_insn *next_insn, basic_block bb, rtx pattern, location_t location, int code, rtx reg_notes)
Definition emit-rtl.cc:513
bool dead_or_set_p(const rtx_insn *, const_rtx)
Definition rtlanal.cc:2416
bool offset_within_block_p(const_rtx, HOST_WIDE_INT)
Definition rtlanal.cc:892
bool reg_referenced_p(const_rtx, const_rtx)
Definition rtlanal.cc:1162
rtx_insn * gen_clobber(rtx)
Definition emit-rtl.cc:5454
#define BARRIER_P(X)
Definition rtl.h:875
rtx gen_const_mem(machine_mode, rtx)
Definition emit-rtl.cc:871
const int SRP_UNSIGNED
Definition rtl.h:2533
#define PUT_CODE(RTX, CODE)
Definition rtl.h:727
bool anti_dependence(const_rtx, const_rtx)
Definition alias.cc:3173
rtx_note * emit_note_copy(rtx_note *)
Definition emit-rtl.cc:5417
bool val_signbit_p(machine_mode, unsigned HOST_WIDE_INT)
Definition simplify-rtx.cc:118
wide_int const_vector_int_elt(const_rtx, unsigned int)
Definition emit-rtl.cc:6026
#define LABEL_P(X)
Definition rtl.h:838
#define SUBREG_REG(RTX)
Definition rtl.h:2057
void set_curr_insn_location(location_t)
Definition emit-rtl.cc:6689
rtx output_constant_def(tree, int)
Definition varasm.cc:3809
void reorder_insns(rtx_insn *, rtx_insn *, rtx_insn *)
Definition emit-rtl.cc:4568
int true_regnum(const_rtx)
Definition jump.cc:1865
void update_alignments(vec< rtx > &)
Definition final.cc:757
rtx get_condition(rtx_insn *, rtx_insn **, int, int)
Definition rtlanal.cc:6095
std::pair< rtx, machine_mode > rtx_mode_t
Definition rtl.h:2273
rtx_insn * emit_insn_before_setloc(rtx, rtx_insn *, location_t)
Definition emit-rtl.cc:5109
void delete_vta_debug_insns(bool)
Definition var-tracking.cc:10405
rtx native_decode_rtx(machine_mode, const vec< target_unit > &, unsigned int)
Definition simplify-rtx.cc:7807
bool redirect_jump(rtx_jump_insn *, rtx, int)
Definition jump.cc:1481
int INSN_UID(const_rtx insn)
Definition rtl.h:1450
memop_ret
Definition rtl.h:4280
@ RETURN_BEGIN
Definition rtl.h:4281
@ RETURN_END_MINUS_ONE
Definition rtl.h:4283
@ RETURN_END
Definition rtl.h:4282
#define RTX_CODE
Definition rtl.h:47
rtx_insn * emit_debug_insn_after_setloc(rtx, rtx_insn *, location_t)
Definition emit-rtl.cc:5037
void compute_alignments(void)
Definition final.cc:612
rtx find_reg_note(const_rtx, enum reg_note, const_rtx)
Definition rtlanal.cc:2526
bool poly_int_rtx_p(const_rtx x)
Definition rtl.h:2382
bool unsigned_reg_p(rtx)
Definition rtlanal.cc:1044
rtx simplify_gen_binary(rtx_code code, machine_mode mode, rtx op0, rtx op1)
Definition rtl.h:3542
void free_INSN_LIST_node(rtx)
Definition lists.cc:204
rtx single_set(const rtx_insn *insn)
Definition rtl.h:3625
bool contains_symbolic_reference_p(const_rtx)
Definition rtlanal.cc:6921
rtx const_vector_elt(const_rtx, unsigned int)
Definition emit-rtl.cc:6056
bool exp_equiv_p(const_rtx, const_rtx, int, bool)
Definition cse.cc:2588
bool subreg_offset_representable_p(unsigned int, machine_mode, poly_uint64, machine_mode)
Definition rtlanal.cc:4249
location_t curr_insn_location(void)
Definition emit-rtl.cc:6696
bool condjump_p(const rtx_insn *)
Definition jump.cc:789
int commutative_operand_precedence(rtx)
Definition rtlanal.cc:3782
rtx rtx_alloc_stat_v(RTX_CODE MEM_STAT_DECL, int)
bool noop_move_p(const rtx_insn *)
Definition rtlanal.cc:1702
#define REG_NREGS(RTX)
Definition rtl.h:1924
void dump_rtx_statistics(void)
Definition rtl.cc:678
rtx gen_hard_reg_clobber(machine_mode, unsigned int)
Definition emit-rtl.cc:6654
rtx_code load_extend_op(machine_mode mode)
Definition rtl.h:4592
bool multiple_sets(const_rtx)
Definition rtlanal.cc:1600
void debug_rtx_list(const rtx_insn *, int)
Definition print-rtl.cc:1122
bool reverse_rotate_by_imm_p(machine_mode, unsigned int, rtx)
Definition simplify-rtx.cc:2878
void record_hard_reg_uses(rtx *, void *)
Definition rtlanal.cc:1537
rtx_insn * prev_real_nondebug_insn(rtx_insn *)
Definition emit-rtl.cc:3798
enum rtx_code unsigned_condition(enum rtx_code)
Definition jump.cc:634
rtx find_regno_note(const_rtx, enum reg_note, unsigned int)
Definition rtlanal.cc:2555
void debug_rtx(const_rtx)
Definition print-rtl.cc:1068
rtx operand_subword_force(rtx, poly_uint64, machine_mode)
Definition emit-rtl.cc:1806
bool rtx_referenced_p(const_rtx, const_rtx)
Definition rtlanal.cc:3508
rtx_code_label * gen_label_rtx(void)
Definition emit-rtl.cc:2857
#define CONST_WIDE_INT_ELT(RTX, N)
Definition rtl.h:1996
#define NONJUMP_INSN_P(X)
Definition rtl.h:852
void decompose_address(struct address_info *, rtx *, machine_mode, addr_space_t, enum rtx_code)
Definition rtlanal.cc:6810
wi::rtx_to_poly_wide_ref const_poly_int_value(const_rtx x)
Definition rtl.h:2370
rtx simplify_gen_relational(rtx_code code, machine_mode mode, machine_mode op_mode, rtx op0, rtx op1)
Definition rtl.h:3556
int max_label_num(void)
Definition emit-rtl.cc:1511
#define REGNO(RTX)
Definition rtl.h:1918
bool may_trap_or_fault_p(const_rtx)
Definition rtlanal.cc:3340
rtx convert_memory_address_addr_space_1(scalar_int_mode, rtx, addr_space_t, bool, bool)
Definition explow.cc:296
rtx gen_lowpart_common(machine_mode, rtx)
Definition emit-rtl.cc:1560
void add_auto_inc_notes(rtx_insn *, rtx)
Definition rtlanal.cc:6962
unsigned hash_rtx(const_rtx, machine_mode, int *, int *, bool, hash_rtx_callback_function=NULL)
Definition cse.cc:2227
bool val_signbit_known_set_p(machine_mode, unsigned HOST_WIDE_INT)
Definition simplify-rtx.cc:137
int insn_line(const rtx_insn *)
Definition emit-rtl.cc:6722
bool side_effects_p(const_rtx)
Definition rtlanal.cc:3046
rtx gen_highpart_mode(machine_mode, machine_mode, rtx)
Definition emit-rtl.cc:1666
void emit_library_call(rtx fun, libcall_type fn_type, machine_mode outmode)
Definition rtl.h:4354
enum rtx_code reversed_comparison_code_parts(enum rtx_code, const_rtx, const_rtx, const rtx_insn *)
Definition jump.cc:355
#define REG_P(X)
Definition rtl.h:747
#define CONST_POLY_INT_P(X)
Definition rtl.h:807
void end_alias_analysis(void)
Definition alias.cc:3557
rtx_barrier * emit_barrier_before(rtx_insn *)
Definition emit-rtl.cc:4713
rtvec gen_rtvec_v(int, rtx *)
Definition emit-rtl.cc:1089
void _fatal_insn_not_found(const_rtx, const char *, int, const char *) ATTRIBUTE_NORETURN ATTRIBUTE_COLD
Definition rtl-error.cc:112
rtx remove_free_EXPR_LIST_node(rtx_expr_list **)
Definition lists.cc:234
bool may_alias_p(const_rtx, const_rtx)
Definition alias.cc:3223
rtx gen_reg_rtx_offset(rtx, machine_mode, int)
Definition emit-rtl.cc:1290
bool reg_mentioned_p(const_rtx, const_rtx)
Definition rtlanal.cc:1064
rtx_jump_insn * emit_jump_insn_after_setloc(rtx, rtx_insn *, location_t)
Definition emit-rtl.cc:5007
void pop_topmost_sequence(void)
Definition emit-rtl.cc:5714
HOST_WIDE_INT get_index_scale(const struct address_info *)
Definition rtlanal.cc:6871
global_rtl_index
Definition rtl.h:3867
@ GR_VIRTUAL_STACK_ARGS
Definition rtl.h:3889
@ GR_STACK_POINTER
Definition rtl.h:3868
@ GR_VIRTUAL_OUTGOING_ARGS
Definition rtl.h:3891
@ GR_MAX
Definition rtl.h:3895
@ GR_FRAME_POINTER
Definition rtl.h:3869
@ GR_ARG_POINTER
Definition rtl.h:3874
@ GR_VIRTUAL_CFA
Definition rtl.h:3892
@ GR_HARD_FRAME_POINTER
Definition rtl.h:3877
@ GR_VIRTUAL_STACK_DYNAMIC
Definition rtl.h:3890
@ GR_VIRTUAL_PREFERRED_STACK_BOUNDARY
Definition rtl.h:3893
@ GR_VIRTUAL_INCOMING_ARGS
Definition rtl.h:3888
rtx_insn * emit_debug_insn_after_noloc(rtx, rtx_insn *)
Definition emit-rtl.cc:4851
unsigned int rtx_size(const_rtx)
Definition rtl.cc:202
void print_rtl_single(FILE *, const_rtx)
Definition print-rtl.cc:1241
bool rtx_renumbered_equal_p(const_rtx, const_rtx)
Definition jump.cc:1645
void add_int_reg_note(rtx_insn *, enum reg_note, int)
Definition rtlanal.cc:2749
rtx_insn * emit_insn_before(rtx, rtx_insn *)
Definition emit-rtl.cc:5117
rtx & SET_PREV_INSN(rtx_insn *insn)
Definition rtl.h:1474
void _fatal_insn(const char *, const_rtx, const char *, int, const char *) ATTRIBUTE_NORETURN ATTRIBUTE_COLD
Definition rtl-error.cc:98
tree insn_scope(const rtx_insn *)
Definition emit-rtl.cc:6715
#define CONST_POLY_INT_COEFFS(RTX)
Definition rtl.h:2000
#define SUBREG_PROMOTED_VAR_P(RTX)
Definition rtl.h:2517
rtx_insn * emit_insn_after(rtx, rtx_insn *)
Definition emit-rtl.cc:5000
bool const_vec_series_p(const_rtx x, rtx *base_out, rtx *step_out)
Definition rtl.h:3101
#define JUMP_TABLE_DATA_P(INSN)
Definition rtl.h:878
rtx gen_rtx_REG(machine_mode, unsigned int)
Definition emit-rtl.cc:790
bool can_throw_internal(const_rtx)
Definition except.cc:1900
#define MAX_COST
Definition rtl.h:2068
bool tls_referenced_p(const_rtx)
Definition rtlanal.cc:6948
void init_derived_machine_modes(void)
Definition emit-rtl.cc:6302
void replace_label_in_insn(rtx_insn *, rtx_insn *, rtx_insn *, bool)
Definition rtlanal.cc:3497
bool partial_subreg_p(machine_mode outermode, machine_mode innermode)
Definition rtl.h:3195
void expand_null_return(void)
Definition cfgexpand.cc:4028
void init_reg_modes_target(void)
Definition reginfo.cc:473
bool reg_used_between_p(const_rtx, const rtx_insn *, const rtx_insn *)
Definition rtlanal.cc:1141
void init_costs_to_max(struct full_rtx_costs *c)
Definition rtl.h:2088
rtx_insn * emit_debug_insn_after(rtx, rtx_insn *)
Definition emit-rtl.cc:5044
int get_max_insn_count(void)
Definition emit-rtl.cc:3547
void free_reg_info(void)
Definition reginfo.cc:917
void add_function_usage_to(rtx, rtx)
Definition emit-rtl.cc:4492
bool validate_subreg(machine_mode, machine_mode, const_rtx, poly_uint64)
Definition emit-rtl.cc:908
machine_mode choose_hard_reg_mode(unsigned int, unsigned int, const predefined_function_abi *)
Definition reginfo.cc:600
bool same_vector_encodings_p(const_rtx x, const_rtx y)
Definition rtl.h:3135
void add_reg_note(rtx, enum reg_note, rtx)
Definition rtlanal.cc:2741
const int SRP_SIGNED
Definition rtl.h:2532
bool vec_duplicate_p(T x, T *elt)
Definition rtl.h:3065
rtx_note * emit_note_before(enum insn_note, rtx_insn *)
Definition emit-rtl.cc:4931
rtx_insn * try_split(rtx, rtx_insn *, int)
Definition emit-rtl.cc:3922
void gt_ggc_mx(rtx &)
void remove_insn(rtx_insn *)
Definition emit-rtl.cc:4421
void init_subregs_of_mode(void)
Definition reginfo.cc:1316
bool eh_returnjump_p(rtx_insn *)
Definition jump.cc:972
void init_reg_sets(void)
Definition reginfo.cc:168
int asm_noperands(const_rtx)
Definition recog.cc:2026
bool resize_reg_info(void)
Definition reginfo.cc:883
int pattern_cost(rtx, bool)
Definition rtlanal.cc:5728
bool contains_constant_pool_address_p(const_rtx)
Definition rtlanal.cc:6934
void sel_sched_fix_param(const char *param, const char *val)
void get_mode_bounds(scalar_int_mode, int, scalar_int_mode, rtx *, rtx *)
Definition stor-layout.cc:3253
bool contains_symbol_ref_p(const_rtx)
Definition rtlanal.cc:6908
rtx simplify_const_relational_operation(enum rtx_code, machine_mode, rtx, rtx)
Definition simplify-rtx.cc:6670
bool in_sequence_p(void)
Definition emit-rtl.cc:5755
rtx duplicate_reg_note(rtx)
Definition rtlanal.cc:2778
rtx gen_reg_rtx_and_attrs(rtx)
Definition emit-rtl.cc:1365
void end_sequence(void)
Definition emit-rtl.cc:5739
int simplify_subreg_regno(unsigned int, machine_mode, poly_uint64, machine_mode)
Definition rtlanal.cc:4266
void remove_free_INSN_LIST_elem(rtx_insn *, rtx_insn_list **)
Definition lists.cc:214
poly_uint64 subreg_size_offset_from_lsb(poly_uint64, poly_uint64, poly_uint64)
Definition rtlanal.cc:3982
#define this_target_rtl
Definition rtl.h:3949
rtx_insn_list * copy_INSN_LIST(rtx_insn_list *)
Definition lists.cc:165
rtx gen_frame_mem(machine_mode, rtx)
Definition emit-rtl.cc:883
poly_int64 rtx_to_poly_int64(const_rtx x)
Definition rtl.h:2401
void init_emit(void)
Definition emit-rtl.cc:5960
rtx_insn * prev_nondebug_insn(rtx_insn *)
Definition emit-rtl.cc:3650
void push_to_sequence2(rtx_insn *, rtx_insn *)
Definition emit-rtl.cc:5687
rtx_insn * emit_call_insn_after_setloc(rtx, rtx_insn *, location_t)
Definition emit-rtl.cc:5023
rtx_code_label * emit_label(rtx)
Definition emit-rtl.cc:5377
rtx get_related_value(const_rtx)
Definition rtlanal.cc:874
void reginfo_cc_finalize(void)
Definition reginfo.cc:136
rtx_jump_table_data * jump_table_for_label(const rtx_code_label *label)
Definition rtl.h:1562
const char * insn_file(const rtx_insn *)
Definition emit-rtl.cc:6729
reg_note
Definition rtl.h:1630
@ REG_NOTE_MAX
Definition rtl.h:1891
rtx_insn * next_nonnote_nondebug_insn(rtx_insn *)
Definition emit-rtl.cc:3666
rtx_insn * next_active_insn(rtx_insn *)
Definition emit-rtl.cc:3842
void get_full_set_src_cost(rtx x, machine_mode mode, struct full_rtx_costs *c)
Definition rtl.h:2973
rtx_insn * previous_insn(rtx_insn *)
Definition emit-rtl.cc:3585
rtx_expr_list * gen_rtx_EXPR_LIST(machine_mode, rtx, rtx)
Definition emit-rtl.cc:499
const int SRP_SIGNED_AND_UNSIGNED
Definition rtl.h:2534
rtx_insn * emit_jump_insn(rtx)
Definition emit-rtl.cc:5274
bool mode_signbit_p(machine_mode, const_rtx)
Definition simplify-rtx.cc:64
bool may_be_sp_based_p(rtx)
Definition alias.cc:2077
rtx simplify_ternary_operation(rtx_code code, machine_mode mode, machine_mode op0_mode, rtx op0, rtx op1, rtx op2)
Definition rtl.h:3512
rtx_insn * emit_debug_insn_before_noloc(rtx, rtx_insn *)
Definition emit-rtl.cc:4703
HOST_WIDE_INT get_integer_term(const_rtx)
Definition rtlanal.cc:855
bool reg_overlap_mentioned_p(const_rtx, const_rtx)
Definition rtlanal.cc:1854
bool can_copy_p(machine_mode)
Definition gcse.cc:581
void remove_node_from_insn_list(const rtx_insn *, rtx_insn_list **)
Definition rtlanal.cc:2897
bool rtx_equal_p(const_rtx, const_rtx, rtx_equal_p_callback_function=NULL)
Definition rtl.cc:425
void init_rtlanal(void)
Definition rtlanal.cc:6224
bool insn_nothrow_p(const_rtx)
Definition except.cc:1953
bool reg_set_p(const_rtx, const_rtx)
Definition rtlanal.cc:1251
bool find_regno_fusage(const_rtx, enum rtx_code, unsigned int)
Definition rtlanal.cc:2675
#define CONST_VECTOR_NPATTERNS(RTX)
Definition rtl.h:2027
bool reg_class_subset_p(reg_class_t, reg_class_t)
Definition reginfo.cc:1155
void note_uses(rtx *, void(*)(rtx *, void *), void *)
Definition rtlanal.cc:2011
void find_all_hard_reg_sets(const rtx_insn *, HARD_REG_SET *, bool)
Definition rtlanal.cc:1522
#define JUMP_LABEL(INSN)
Definition rtl.h:1872
int insn_discriminator(const rtx_insn *)
Definition final.cc:2963
void decompose_lea_address(struct address_info *, rtx *)
Definition rtlanal.cc:6843
void free_EXPR_LIST_list(rtx_expr_list **)
Definition lists.cc:147
void add_insn(rtx_insn *)
Definition emit-rtl.cc:4273
T unwrap_const_vec_duplicate(T x)
Definition rtl.h:3081
void emit_insn_at_entry(rtx)
Definition cfgrtl.cc:526
basic_block BLOCK_FOR_INSN(const_rtx insn)
Definition rtl.h:1490
const_rtx set_of(const_rtx, const_rtx)
Definition rtlanal.cc:1447
rtx_insn * get_first_nonnote_insn(void)
Definition emit-rtl.cc:3495
enum rtx_code swap_condition(enum rtx_code)
Definition jump.cc:587
bool canon_anti_dependence(const_rtx, bool, const_rtx, machine_mode, rtx)
Definition alias.cc:3186
rtx set_unique_reg_note(rtx, enum reg_note, rtx)
Definition emit-rtl.cc:5537
#define CONST_VECTOR_DUPLICATE_P(RTX)
Definition rtl.h:2035
void gt_pch_nx(rtx &)
rtx stack_limit_rtx
Definition toplev.cc:152
rtx_insn * emit_call_insn_after(rtx, rtx_insn *)
Definition emit-rtl.cc:5030
rtx_insn * delete_related_insns(rtx)
Definition jump.cc:1212
rtx_note * emit_note(enum insn_note)
Definition emit-rtl.cc:5430
rtx_insn * emit_clobber(rtx)
Definition emit-rtl.cc:5440
bool onlyjump_p(const rtx_insn *)
Definition jump.cc:988
unsigned int subreg_regno(const_rtx)
Definition rtlanal.cc:4328
rtx_insn * emit_call_insn_before_setloc(rtx, rtx_insn *, location_t)
Definition emit-rtl.cc:5142
void update_address(struct address_info *)
Definition rtlanal.cc:6861
void get_referenced_operands(const char *, bool *, unsigned int)
Definition recog.cc:2237
rtx fis_get_condition(rtx_insn *)
Definition cprop.cc:1326
rtx_insn * next_nonnote_insn(rtx_insn *)
Definition emit-rtl.cc:3602
void delete_insns_since(rtx_insn *)
Definition emit-rtl.cc:4516
int delete_trivially_dead_insns(rtx_insn *, int)
Definition cse.cc:7022
#define DEBUG_INSN_P(X)
Definition rtl.h:855
#define mode_mem_attrs
Definition rtl.h:3960
bool dead_or_set_regno_p(const rtx_insn *, unsigned int)
Definition rtlanal.cc:2482
scalar_int_mode subreg_promoted_mode(rtx x)
Definition rtl.h:3159
libcall_type
Definition rtl.h:4332
@ LCT_NORMAL
Definition rtl.h:4333
@ LCT_RETURNS_TWICE
Definition rtl.h:4338
@ LCT_NORETURN
Definition rtl.h:4336
@ LCT_THROW
Definition rtl.h:4337
@ LCT_PURE
Definition rtl.h:4335
@ LCT_CONST
Definition rtl.h:4334
void push_topmost_sequence(void)
Definition emit-rtl.cc:5699
void cwi_output_hex(FILE *, const_rtx)
Definition rtl.cc:250
rtx rtx_init(rtx rt, RTX_CODE code)
Definition rtl.h:2998
void debug_rtx_range(const rtx_insn *, const rtx_insn *)
Definition print-rtl.cc:1150
void record_hard_reg_sets(rtx, const_rtx, void *)
Definition rtlanal.cc:1508
rtx gen_highpart(machine_mode, rtx)
Definition emit-rtl.cc:1634
#define CONST_SCALAR_INT_P(X)
Definition rtl.h:826
bool rtvec_series_p(rtvec, int)
Definition rtl.cc:597
void init_regs(void)
Definition reginfo.cc:508
expanded_location insn_location(const rtx_insn *)
Definition emit-rtl.cc:6736
enum rtx_code classify_insn(rtx)
Definition rtl.cc:614
scalar_int_mode get_address_mode(rtx mem)
Definition rtlanal.cc:6266
bool find_reg_fusage(const_rtx, enum rtx_code, const_rtx)
Definition rtlanal.cc:2630
rtx copy_rtx(rtx)
Definition rtl.cc:285
rtx_insn_list * concat_INSN_LIST(rtx_insn_list *, rtx_insn_list *)
Definition lists.cc:183
bool val_signbit_known_clear_p(machine_mode, unsigned HOST_WIDE_INT)
Definition simplify-rtx.cc:156
#define CONST_DOUBLE_LOW(r)
Definition rtl.h:2011
poly_int64 find_args_size_adjust(rtx_insn *)
Definition expr.cc:4954
#define JUMP_P(X)
Definition rtl.h:841
void print_inline_rtx(FILE *, const_rtx, int)
Definition print-rtl.cc:1059
rtx_insn * get_last_insn_anywhere(void)
Definition emit-rtl.cc:3482
rtx_insn * emit_call_insn_before_noloc(rtx, rtx_insn *)
Definition emit-rtl.cc:4693
label_kind
Definition rtl.h:1823
@ LABEL_WEAK_ENTRY
Definition rtl.h:1827
@ LABEL_GLOBAL_ENTRY
Definition rtl.h:1826
@ LABEL_NORMAL
Definition rtl.h:1824
@ LABEL_STATIC_ENTRY
Definition rtl.h:1825
rtx get_call_rtx_from(const rtx_insn *)
Definition rtlanal.cc:819
void init_lower_subreg(void)
Definition lower-subreg.cc:278
poly_uint64 subreg_size_lsb(poly_uint64, poly_uint64, poly_uint64)
Definition rtlanal.cc:3922
bool refers_to_regno_p(unsigned int, unsigned int, const_rtx, rtx *)
Definition rtlanal.cc:1746
rtx_insn * prepare_copy_insn(rtx, rtx)
Definition gcse.cc:2076
rtx emit_library_call_value(rtx fun, rtx value, libcall_type fn_type, machine_mode outmode)
Definition rtl.h:4414
unsigned int END_REGNO(const_rtx x)
Definition rtl.h:1941
poly_int64 subreg_memory_offset(machine_mode, machine_mode, poly_uint64)
Definition emit-rtl.cc:1146
bool reg_classes_intersect_p(reg_class_t, reg_class_t)
Definition reginfo.cc:1165
rtx_jump_insn * emit_jump_insn_after(rtx, rtx_insn *)
Definition emit-rtl.cc:5015
void init_costs_to_zero(struct full_rtx_costs *c)
Definition rtl.h:2096
rtx strip_offset(rtx, poly_int64 *)
Definition rtlanal.cc:948
unsigned int subreg_nregs(const_rtx)
Definition rtlanal.cc:4345
bool any_condjump_p(const rtx_insn *)
Definition jump.cc:899
bool invert_jump(rtx_jump_insn *, rtx, int)
Definition jump.cc:1625
bool check_for_inc_dec(rtx_insn *insn)
Definition dse.cc:873
rtx_insn * get_last_nonnote_insn(void)
Definition emit-rtl.cc:3521
int set_rtx_cost(rtx x, bool speed_p)
Definition rtl.h:2947
bool reg_set_between_p(const_rtx, const rtx_insn *, const rtx_insn *)
Definition rtlanal.cc:1234
bool simplejump_p(const rtx_insn *)
Definition jump.cc:774
poly_uint64 subreg_offset_from_lsb(machine_mode outer_mode, machine_mode inner_mode, poly_uint64 lsb_shift)
Definition rtl.h:2475
bool always_void_p(enum rtx_code code)
Definition rtl.h:2073
machine_mode narrower_subreg_mode(machine_mode outermode, machine_mode innermode)
Definition rtl.h:3255
bool const_vec_duplicate_p(const_rtx x)
Definition rtl.h:3038
rtx_insn * emit_debug_insn(rtx)
Definition emit-rtl.cc:5227
rtx canon_condition(rtx)
Definition loop-iv.cc:1631
rtx set_for_reg_notes(rtx)
Definition emit-rtl.cc:5498
const rtx_insn * debug_rtx_find(const rtx_insn *, int)
Definition print-rtl.cc:1167
rtx_insn * emit_insn_before_noloc(rtx, rtx_insn *, basic_block)
Definition emit-rtl.cc:4673
void emit_jump(rtx)
Definition stmt.cc:132
void set_block_for_insn(rtx_insn *insn, basic_block bb)
Definition rtl.h:1500
bool modified_between_p(const_rtx, const rtx_insn *, const rtx_insn *)
Definition rtlanal.cc:1303
void setup_reg_classes(int, enum reg_class, enum reg_class, enum reg_class)
Definition reginfo.cc:988
unsigned int reg_or_subregno(const_rtx)
Definition jump.cc:1896
rtx simplify_subtraction(rtx)
Definition varasm.cc:4128
rtx_note * emit_note_after(enum insn_note, rtx_insn *)
Definition emit-rtl.cc:4915
rtx plus_constant(machine_mode, rtx, poly_int64, bool=false)
Definition explow.cc:95
rtx_insn * split_insns(rtx, rtx_insn *)
bool constant_pool_constant_p(rtx)
Definition rtlanal.cc:6240
void unshare_all_rtl_again(rtx_insn *)
Definition emit-rtl.cc:2935
bool auto_inc_p(const_rtx)
Definition rtlanal.cc:3865
rtx simplify_const_binary_operation(enum rtx_code, machine_mode, rtx, rtx)
Definition simplify-rtx.cc:5313
rtx_insn * emit_insn(rtx)
Definition emit-rtl.cc:5180
int count_occurrences(const_rtx, const_rtx, int)
Definition rtlanal.cc:978
rtx_insn * emit_debug_insn_before(rtx, rtx_insn *)
Definition emit-rtl.cc:5168
rtx replace_rtx(rtx, rtx, rtx, bool=false)
Definition rtlanal.cc:3355
void push_to_sequence(rtx_insn *)
Definition emit-rtl.cc:5670
enum reg_class reg_alternate_class(int)
Definition reginfo.cc:837
void free_EXPR_LIST_node(rtx)
Definition lists.cc:196
rtx canonicalize_condition(rtx_insn *, rtx, int, rtx_insn **, rtx, int, int)
Definition rtlanal.cc:5844
rtx_insn * next_nondebug_insn(rtx_insn *)
Definition emit-rtl.cc:3618
void replace_label(rtx *, rtx, rtx, bool)
Definition rtlanal.cc:3425
bool truncated_to_mode(machine_mode, const_rtx)
Definition rtlanal.cc:6171
HOST_WIDE_INT get_stack_check_protect(void)
Definition explow.cc:1387
void init_alias_target(void)
Definition alias.cc:3276
HOST_WIDE_INT trunc_int_for_mode(HOST_WIDE_INT, machine_mode)
Definition explow.cc:52
bool(* rtx_equal_p_callback_function)(const_rtx *, const_rtx *, rtx *, rtx *)
Definition rtl.h:3027
bool word_register_operation_p(const_rtx x)
Definition rtl.h:4620
rtx get_reg_known_value(unsigned int)
Definition alias.cc:1665
rtx force_const_mem(machine_mode, rtx)
Definition varasm.cc:4139
poly_uint64 subreg_highpart_offset(machine_mode outermode, machine_mode innermode)
Definition rtl.h:3283
rtx get_pool_constant(const_rtx)
Definition varasm.cc:4238
void reorder_insns_nobb(rtx_insn *, rtx_insn *, rtx_insn *)
Definition emit-rtl.cc:4536
#define NULL_RTX
Definition rtl.h:706
unsigned int rhs_regno(const_rtx x)
Definition rtl.h:1934
rtx_insn * emit_label_after(rtx_insn *, rtx_insn *)
Definition emit-rtl.cc:4873
const char * decode_asm_operands(rtx, rtx *, rtx **, const char **, machine_mode *, location_t *)
Definition recog.cc:2119
rtx rtx_alloc(RTX_CODE CXX_MEM_STAT_INFO)
poly_int64 fixup_args_size_notes(rtx_insn *, rtx_insn *, poly_int64)
Definition expr.cc:5075
rtx_insn * emit_call_insn_before(rtx, rtx_insn *)
Definition emit-rtl.cc:5151
poly_uint64 subreg_size_lowpart_offset(poly_uint64, poly_uint64)
Definition emit-rtl.cc:1681
rtx extract_mem_from_operand(rtx)
Definition lra-constraints.cc:448
location_t INSN_LOCATION(const rtx_insn *insn)
Definition rtl.h:1516
bool nonzero_address_p(const_rtx)
Definition rtlanal.cc:716
bool volatile_insn_p(const_rtx)
Definition rtlanal.cc:2927
rtx immed_double_const(HOST_WIDE_INT, HOST_WIDE_INT, machine_mode)
Definition emit-rtl.cc:705
rtx_insn_list * alloc_INSN_LIST(rtx, rtx)
Definition lists.cc:103
void expand_dec(rtx, rtx)
Definition expmed.cc:2499
void delete_for_peephole(rtx_insn *, rtx_insn *)
Definition jump.cc:1342
void split_all_insns_noflow(void)
Definition recog.cc:3615
wide_int native_decode_int(const vec< target_unit > &, unsigned int, unsigned int, unsigned int)
Definition simplify-rtx.cc:7781
rtx operand_subword(rtx, poly_uint64, int, machine_mode)
Definition emit-rtl.cc:1757
rtvec rtvec_alloc(size_t)
Definition rtl.cc:163
#define RTX_CODE_BITSIZE
Definition rtl.h:66
void verify_rtl_sharing(void)
Definition emit-rtl.cc:3141
rtx_barrier * emit_barrier(void)
Definition emit-rtl.cc:5406
void regclass(rtx, int)
rtx gen_tmp_stack_mem(machine_mode, rtx)
Definition emit-rtl.cc:895
rtx_insn * emit_call_insn_after_noloc(rtx, rtx_insn *)
Definition emit-rtl.cc:4842
bool(* hash_rtx_callback_function)(const_rtx, machine_mode, rtx *, machine_mode *)
Definition rtl.h:4162
void schedule_insns(void)
Definition haifa-sched.cc:904
rtx strip_offset_and_add(rtx x, poly_int64 *offset)
Definition rtl.h:4605
#define REG_CHECK(RTX)
Definition rtl.h:1250
enum rtx_code reverse_condition(enum rtx_code)
Definition jump.cc:498
void set_used_flags(rtx)
Definition emit-rtl.cc:3435
void print_rtl(FILE *, const_rtx)
Definition print-rtl.cc:1232
bool canon_output_dependence(const_rtx, bool, const_rtx, machine_mode, rtx)
Definition alias.cc:3210
bool const_vec_series_p_1(const_rtx, rtx *, rtx *)
Definition emit-rtl.cc:6122
rtx condjump_label(const rtx_insn *)
Definition jump.cc:920
void mark_reg_pointer(rtx, int)
Definition emit-rtl.cc:1486
const char * get_insn_name(int)
Definition gensupport.cc:3620
bool native_encode_rtx(machine_mode, rtx, vec< target_unit > &, unsigned int, unsigned int)
Definition simplify-rtx.cc:7587
void note_pattern_stores(const_rtx, void(*)(rtx, const_rtx, void *), void *)
Definition rtlanal.cc:1950
rtx simplify_replace_rtx(rtx, const_rtx, rtx)
Definition simplify-rtx.cc:560
void schedule_ebbs(void)
int asm_str_count(const char *templ)
Definition final.cc:1399
void set_label_ref_label(rtx ref, rtx_insn *label)
Definition rtl.h:1911
rtx simplify_binary_operation(rtx_code code, machine_mode mode, rtx op0, rtx op1)
Definition rtl.h:3506
unsigned int variable_tracking_main(void)
Definition var-tracking.cc:10574
void costs_add_n_insns(struct full_rtx_costs *c, int n)
Definition rtl.h:2119
rtx_code
Definition rtl.h:48
@ LAST_AND_UNUSED_RTX_CODE
Definition rtl.h:1432
void subreg_get_info(unsigned int, machine_mode, poly_uint64, machine_mode, struct subreg_info *)
Definition rtlanal.cc:4034
#define CONST_INT_P(X)
Definition rtl.h:800
bool subreg_lowpart_p(const_rtx)
Definition emit-rtl.cc:1719
rtx_insn * NEXT_INSN(const rtx_insn *insn)
Definition rtl.h:1479
rtx copy_rtx_if_shared(rtx)
Definition emit-rtl.cc:3216
rtx simplify_replace_fn_rtx(rtx, const_rtx, rtx(*fn)(rtx, const_rtx, void *), void *)
Definition simplify-rtx.cc:406
rtx * strip_address_mutations(rtx *, enum rtx_code *=0)
Definition rtlanal.cc:6463
void set_insn_locations(rtx_insn *, location_t)
Definition emit-rtl.cc:6703
void redirect_jump_2(rtx_jump_insn *, rtx, rtx, int, int)
Definition jump.cc:1513
bool insn_could_throw_p(const_rtx)
Definition except.cc:1762
void remove_note(rtx_insn *, const_rtx)
Definition rtlanal.cc:2793
bool set_noop_p(const_rtx)
Definition rtlanal.cc:1631
rtx shallow_copy_rtx(const_rtx CXX_MEM_STAT_INFO)
rtvec shallow_copy_rtvec(rtvec)
Definition rtl.cc:188
rtx gen_rtx_MEM(machine_mode, rtx)
Definition emit-rtl.cc:857
void finish_subregs_of_mode(void)
Definition reginfo.cc:1344
rtx simple_regno_set(rtx, unsigned int)
Definition rtlanal.cc:1472
poly_uint64 subreg_lsb(const_rtx)
Definition rtlanal.cc:3969
rtx PATTERN(const_rtx insn)
Definition rtl.h:1506
rtx * find_constant_term_loc(rtx *)
Definition recog.cc:2436
bool label_is_jump_target_p(const_rtx, const rtx_insn *)
Definition rtlanal.cc:4499
void print_mem_expr(FILE *, const_tree)
Definition print-rtl.cc:185
enum reg_class reg_allocno_class(int)
Definition reginfo.cc:848
rtx gen_rtx_SUBREG(machine_mode, rtx, poly_uint64)
Definition emit-rtl.cc:1030
#define XVEC(RTX, N)
Definition rtl.h:1352
void get_full_set_rtx_cost(rtx x, struct full_rtx_costs *c)
Definition rtl.h:2955
rtx_insn * next_real_insn(rtx_insn *)
Definition emit-rtl.cc:3745
void add_insn_after(rtx_insn *, rtx_insn *, basic_block)
Definition emit-rtl.cc:4340
rtx move_by_pieces(rtx, rtx, unsigned HOST_WIDE_INT, unsigned int, memop_ret)
Definition expr.cc:1671
rtx gen_rtx_VAR_LOCATION(machine_mode, tree, rtx, enum var_init_status)
Definition emit-rtl.cc:1052
void start_sequence(void)
Definition emit-rtl.cc:5644
bool any_uncondjump_p(const rtx_insn *)
Definition jump.cc:879
void split_double(rtx, rtx *, rtx *)
Definition rtlanal.cc:6286
bool swap_commutative_operands_p(rtx, rtx)
Definition rtlanal.cc:3856
subreg_shape shape_of_subreg(const_rtx x)
Definition rtl.h:2183
rtx simplify_rtx(const_rtx)
Definition simplify-rtx.cc:8494
rtx pc_set(const rtx_insn *)
Definition jump.cc:848
void init_expmed(void)
Definition expmed.cc:252
rtx_insn * label_ref_label(const_rtx ref)
Definition rtl.h:1903
bool no_labels_between_p(const rtx_insn *, const rtx_insn *)
Definition rtlanal.cc:1126
void save_register_info(void)
Definition reginfo.cc:219
void init_alias_analysis(void)
Definition alias.cc:3348
void set_regno_raw(rtx x, unsigned int regno, unsigned int nregs)
Definition rtl.h:1949
const class mem_attrs * get_mem_attrs(const_rtx x)
Definition rtl.h:3974
bool remove_reg_equal_equiv_notes(rtx_insn *, bool=false)
Definition rtlanal.cc:2826
#define CONST_VECTOR_ENCODED_ELT(RTX, N)
Definition rtl.h:2041
rtx_insn * gen_use(rtx)
Definition emit-rtl.cc:5482
#define XEXP(RTX, N)
Definition rtl.h:1351
#define PUT_MODE_RAW(RTX, MODE)
Definition rtl.h:730
rtx gen_lowpart_if_possible(machine_mode, rtx)
Definition rtlhooks.cc:109
#define XVECEXP(RTX, N, M)
Definition rtl.h:1359
rtx_insn * next_insn(rtx_insn *)
Definition emit-rtl.cc:3568
int(* for_each_inc_dec_fn)(rtx mem, rtx op, rtx dest, rtx src, rtx srcoff, void *arg)
Definition rtl.h:3732
bool can_throw_external(const_rtx)
Definition except.cc:1908
void mark_user_reg(rtx)
Definition emit-rtl.cc:1468
rtx gen_rtx_CONST_VECTOR(machine_mode, rtvec)
Definition emit-rtl.cc:6211
rtx_insn * prev_nonnote_insn(rtx_insn *)
Definition emit-rtl.cc:3634
unsigned seq_cost(const rtx_insn *, bool)
Definition rtlanal.cc:5793
const struct rtl_hooks general_rtl_hooks
Definition rtlhooks.cc:42
const HARD_REG_SET * valid_mode_changes_for_regno(unsigned int)
Definition reginfo.cc:1338
void globalize_reg(tree, int)
Definition reginfo.cc:738
rtx gen_rtx_REG_offset(rtx, machine_mode, unsigned int, poly_int64)
Definition emit-rtl.cc:1271
int for_each_inc_dec(rtx, for_each_inc_dec_fn, void *arg)
Definition rtlanal.cc:3724
rtx_insn * emit_use(rtx)
Definition emit-rtl.cc:5468
bool loc_mentioned_in_p(rtx *, const_rtx)
Definition rtlanal.cc:3886
void add_insn_before(rtx_insn *, rtx_insn *, basic_block)
Definition emit-rtl.cc:4368
bool contains_mem_rtx_p(rtx x)
Definition rtlanal.cc:703
bool active_insn_p(const rtx_insn *)
Definition emit-rtl.cc:3827
void unshare_all_rtl_in_chain(rtx_insn *)
Definition emit-rtl.cc:3173
fixed_size_mode get_pool_mode(const_rtx)
Definition varasm.cc:4259
void init_varasm_once(void)
Definition varasm.cc:6907
void add_shallow_copy_of_reg_note(rtx_insn *, rtx)
Definition rtlanal.cc:2768
int max_reg_num(void)
Definition emit-rtl.cc:1503
unsigned HOST_WIDE_INT nonzero_bits(const_rtx, machine_mode)
Definition rtlanal.cc:4675
int address_cost(rtx, machine_mode, addr_space_t, bool)
Definition rtlanal.cc:4653
rtx_barrier * emit_barrier_after(rtx_insn *)
Definition emit-rtl.cc:4860
rtx_insn_list * gen_rtx_INSN_LIST(machine_mode, rtx, rtx)
Definition emit-rtl.cc:506
rtx tablejump_casesi_pattern(const rtx_insn *insn)
Definition rtlanal.cc:3561
bool read_modify_subreg_p(const_rtx)
Definition rtlanal.cc:1415
int rtx_to_tree_code(enum rtx_code)
Definition explow.cc:2352
poly_int64 get_args_size(const_rtx)
Definition rtlanal.cc:968
void init_emit_regs(void)
Definition emit-rtl.cc:6230
#define GET_CODE(RTX)
Definition rtl.h:726
void print_simple_rtl(FILE *, const_rtx)
Definition print-rtl.cc:1271
rtx remove_death(unsigned int, rtx_insn *)
Definition combine.cc:14171
void init_emit_once(void)
Definition emit-rtl.cc:6327
rtx simplify_gen_subreg(machine_mode outermode, rtx op, machine_mode innermode, poly_uint64 byte)
Definition rtl.h:3564
bool register_asm_p(const_rtx)
Definition rtlanal.cc:6989
rtx_insn * prev_nonnote_nondebug_insn_bb(rtx_insn *)
Definition emit-rtl.cc:3722
#define XLOC(RTX, N)
Definition rtl.h:1349
rtx single_set_2(const rtx_insn *, const_rtx)
Definition rtlanal.cc:1547
rtx_jump_insn * emit_jump_insn_before_setloc(rtx, rtx_insn *, location_t)
Definition emit-rtl.cc:5124
unsigned int subreg_nregs_with_regno(unsigned int, const_rtx)
Definition rtlanal.cc:4355
bool unsigned_condition_p(enum rtx_code code)
Definition rtl.h:3418
rtx make_compound_operation(rtx, enum rtx_code)
Definition combine.cc:8505
bool rtx_unstable_p(const_rtx)
Definition rtlanal.cc:206
bool shared_const_p(const_rtx)
Definition rtl.cc:267
rtx_jump_insn * emit_jump_insn_before(rtx, rtx_insn *)
Definition emit-rtl.cc:5133
bool read_dependence(const_rtx, const_rtx)
Definition alias.cc:2746
bool modified_in_p(const_rtx, const_rtx)
Definition rtlanal.cc:1361
rtx_class
Definition rtl.h:70
@ RTX_BIN_ARITH
Definition rtl.h:77
@ RTX_UNARY
Definition rtl.h:81
@ RTX_TERNARY
Definition rtl.h:91
@ RTX_EXTRA
Definition rtl.h:83
@ RTX_CONST_OBJ
Definition rtl.h:89
@ RTX_INSN
Definition rtl.h:85
@ RTX_COMM_ARITH
Definition rtl.h:78
@ RTX_MATCH
Definition rtl.h:84
@ RTX_OBJ
Definition rtl.h:88
@ RTX_AUTOINC
Definition rtl.h:93
@ RTX_COMM_COMPARE
Definition rtl.h:76
@ RTX_COMPARE
Definition rtl.h:75
@ RTX_BITFIELD_OPS
Definition rtl.h:92
void add_args_size_note(rtx_insn *, poly_int64)
Definition rtlanal.cc:2759
rtx native_decode_vector_rtx(machine_mode, const vec< target_unit > &, unsigned int, unsigned int, unsigned int)
Definition simplify-rtx.cc:7741
int insn_cost(rtx_insn *, bool)
Definition rtlanal.cc:5782
#define MEM_ATTRS(RTX)
Definition rtl.h:2641
#define CONST_WIDE_INT_NUNITS(RTX)
Definition rtl.h:1995
rtx_jump_insn * emit_jump_insn_after_noloc(rtx, rtx_insn *)
Definition emit-rtl.cc:4832
rtx remove_list_elem(rtx, rtx *)
Definition lists.cc:89
rtx lookup_constant_def(tree)
Definition varasm.cc:3925
bool condjump_in_parallel_p(const rtx_insn *)
Definition jump.cc:817
bool get_reg_known_equiv_p(unsigned int)
Definition alias.cc:1692
rtx_call_insn * last_call_insn(void)
Definition emit-rtl.cc:3814
rtx immed_wide_int_const(const poly_wide_int_ref &, machine_mode)
Definition emit-rtl.cc:745
int lowpart_subreg_regno(unsigned int, machine_mode, machine_mode)
Definition rtlanal.cc:4319
bool comparison_dominates_p(enum rtx_code, enum rtx_code)
Definition jump.cc:693
void set_new_first_and_last_insn(rtx_insn *, rtx_insn *)
Definition emit-rtl.cc:2871
bool redirect_jump_1(rtx_insn *, rtx)
Definition jump.cc:1446
void insn_locations_init(void)
Definition emit-rtl.cc:6673
unsigned int num_sign_bit_copies(const_rtx, machine_mode)
Definition rtlanal.cc:4686
#define CALL_P(X)
Definition rtl.h:844
bool true_dependence(const_rtx, machine_mode, const_rtx)
Definition alias.cc:3063
rtx_insn * emit_insn_after_setloc(rtx, rtx_insn *, location_t)
Definition emit-rtl.cc:4993
unsigned int subreg_regno_offset(unsigned int, machine_mode, poly_uint64, machine_mode)
Definition rtlanal.cc:4233
#define XBBDEF(RTX, N)
Definition rtl.h:1355
void simplify_using_condition(rtx, rtx *, bitmap)
Definition loop-iv.cc:1723
enum rtx_code reversed_comparison_code(const_rtx, const rtx_insn *)
Definition jump.cc:466
rtx get_pool_constant_mark(rtx, bool *)
Definition varasm.cc:4247
rtx_expr_list * alloc_EXPR_LIST(int, rtx, rtx)
Definition lists.cc:127
bool rtx_addr_varies_p(const_rtx, bool)
Definition rtlanal.cc:786
rtx convert_memory_address_addr_space(scalar_int_mode, rtx, addr_space_t)
Definition explow.cc:426
rtx lowpart_subreg(machine_mode outermode, rtx op, machine_mode innermode)
Definition rtl.h:3578
rtx_insn * emit_likely_jump_insn(rtx)
Definition emit-rtl.cc:5319
rtx gen_raw_REG(machine_mode, unsigned int)
Definition emit-rtl.cc:487
rtx_insn * make_insn_raw(rtx)
Definition emit-rtl.cc:4126
unsigned int const_vector_encoded_nelts(const_rtx x)
Definition rtl.h:2046
rtx find_constant_src(const rtx_insn *)
Definition rtlanal.cc:2607
rtx_insn * prev_real_insn(rtx_insn *)
Definition emit-rtl.cc:3762
const HARD_REG_SET & simplifiable_subregs(const subreg_shape &)
Definition reginfo.cc:1200
rtx simplify_subreg(machine_mode outermode, rtx op, machine_mode innermode, poly_uint64 byte)
Definition rtl.h:3528
rtx init_raw_REG(rtx, machine_mode, unsigned int)
Definition emit-rtl.cc:474
rtx make_safe_from(rtx, rtx)
Definition emit-rtl.cc:3445
rtx find_reg_equal_equiv_note(const_rtx)
Definition rtlanal.cc:2578
rtx simplify_gen_vec_select(rtx op, unsigned int index)
Definition rtl.h:3572
bool may_trap_p_1(const_rtx, unsigned)
Definition rtlanal.cc:3120
insn_note
Definition rtl.h:1797
@ NOTE_INSN_MAX
Definition rtl.h:1902
enum rtx_code get_index_code(const struct address_info *)
Definition rtlanal.cc:6894
tree get_call_fndecl(const rtx_insn *)
Definition rtlanal.cc:834
bool in_insn_list_p(const rtx_insn_list *, const rtx_insn *)
Definition rtlanal.cc:2880
void get_full_rtx_cost(rtx, machine_mode, enum rtx_code, int, struct full_rtx_costs *)
Definition rtlanal.cc:4638
poly_int64 byte_lowpart_offset(machine_mode, machine_mode)
Definition emit-rtl.cc:1132
void set_insn_deleted(rtx_insn *)
Definition emit-rtl.cc:4396
void free_INSN_LIST_list(rtx_insn_list **)
Definition lists.cc:156
rtx gen_rtx_CONST_INT(machine_mode, HOST_WIDE_INT)
Definition emit-rtl.cc:524
poly_uint64 subreg_size_highpart_offset(poly_uint64, poly_uint64)
Definition emit-rtl.cc:1700
rtx simplify_const_unary_operation(enum rtx_code, machine_mode, rtx, machine_mode)
Definition simplify-rtx.cc:1951
void decompose_mem_address(struct address_info *, rtx)
Definition rtlanal.cc:6851
void rebuild_jump_labels(rtx_insn *)
Definition jump.cc:96
rtx get_addr(rtx)
Definition alias.cc:2285
bool can_nonlocal_goto(const rtx_insn *)
Definition except.cc:1981
rtx_insn * emit_insn_after_noloc(rtx, rtx_insn *, basic_block)
Definition emit-rtl.cc:4822
void maybe_set_first_label_num(rtx_code_label *)
Definition emit-rtl.cc:1529
#define COSTS_N_INSNS(N)
Definition rtl.h:2064
rtx extract_asm_operands(rtx)
Definition recog.cc:1986
rtx_insn * JUMP_LABEL_AS_INSN(const rtx_insn *insn)
Definition rtl.h:1874
#define XVECLEN(RTX, N)
Definition rtl.h:1360
rtx_insn * prev_active_insn(rtx_insn *)
Definition emit-rtl.cc:3859
rtx regno_use_in(unsigned int, rtx)
Definition rtlanal.cc:3750
scalar_int_mode subreg_unpromoted_mode(rtx x)
Definition rtl.h:3150
rtx_insn * emit_debug_insn_before_setloc(rtx, rtx_insn *, location_t)
Definition emit-rtl.cc:5159
const unsigned char rtx_next[NUM_RTX_CODE]
rtx simplify_gen_unary(rtx_code code, machine_mode mode, rtx op, machine_mode op_mode)
Definition rtl.h:3535
rtx make_debug_expr_from_rtl(const_rtx)
Definition varasm.cc:8620
bool jump_to_label_p(const rtx_insn *)
Definition jump.cc:1009
rtx reversed_comparison(const_rtx, machine_mode)
Definition jump.cc:478
void mark_elimination(int, int)
Definition ira.cc:2940
#define CONST_VECTOR_NELTS_PER_PATTERN(RTX)
Definition rtl.h:2031
rtx simplify_gen_ternary(rtx_code code, machine_mode mode, machine_mode op0_mode, rtx op0, rtx op1, rtx op2)
Definition rtl.h:3548
void init_fake_stack_mems(void)
Definition reginfo.cc:532
bool returnjump_p(const rtx_insn *)
Definition jump.cc:941
rtx_insn * find_first_parameter_load(rtx_insn *, rtx_insn *)
Definition rtlanal.cc:4390
void print_rtl_single_with_indent(FILE *, const_rtx, int)
void copy_reg_eh_region_note_forward(rtx, rtx_insn *, rtx)
Definition except.cc:1778
bool rtx_varies_p(const_rtx, bool)
Definition rtlanal.cc:272
bool can_assign_to_reg_without_clobbers_p(rtx, machine_mode)
Definition gcse.cc:905
bool rtvec_all_equal_p(const_rtvec)
Definition rtl.cc:571
rtx set_dst_reg_note(rtx, enum reg_note, rtx, rtx)
Definition emit-rtl.cc:5590
#define CONST_VECTOR_NUNITS(RTX)
Definition rtl.h:2052
void find_all_hard_regs(const_rtx, HARD_REG_SET *)
Definition rtlanal.cc:1493
bool canon_true_dependence(const_rtx, machine_mode, rtx, const_rtx, rtx)
Definition alias.cc:3076
#define XCEXP(RTX, N, C)
Definition rtl.h:1387
rtx get_reg_base_value(unsigned int)
Definition alias.cc:1657
void expand_naked_return(void)
Definition stmt.cc:695
rtx_insn * next_real_nondebug_insn(rtx)
Definition emit-rtl.cc:3779
enum rtx_code reverse_condition_maybe_unordered(enum rtx_code)
Definition jump.cc:545
bool computed_jump_p(const rtx_insn *)
Definition rtlanal.cc:3631
bool tablejump_p(const rtx_insn *, rtx_insn **, rtx_jump_table_data **)
Definition rtlanal.cc:3535
poly_uint64 subreg_lowpart_offset(machine_mode outermode, machine_mode innermode)
Definition rtl.h:3244
rtx_insn * emit_call_insn(rtx)
Definition emit-rtl.cc:5342
bool rtx_addr_can_trap_p(const_rtx)
Definition rtlanal.cc:695
int rtx_cost(rtx, machine_mode, enum rtx_code, int, bool)
Definition rtlanal.cc:4534
void reg_scan(rtx_insn *, unsigned int)
Definition reginfo.cc:1008
rtx_jump_table_data * emit_jump_table_data(rtx)
Definition emit-rtl.cc:5391
#define GET_MODE(RTX)
Definition rtl.h:729
machine_mode wider_subreg_mode(machine_mode outermode, machine_mode innermode)
Definition rtl.h:3265
void vt_equate_reg_base_value(const_rtx, const_rtx)
Definition alias.cc:3551
void split_const(rtx, rtx *, rtx *)
Definition rtlanal.cc:927
bool may_trap_p(const_rtx)
Definition rtlanal.cc:3294
bool vec_series_p(const_rtx x, rtx *base_out, rtx *step_out)
Definition rtl.h:3119
double_int rtx_to_double_int(const_rtx)
Definition emit-rtl.cc:615
rtx simplify_relational_operation(rtx_code code, machine_mode mode, machine_mode op_mode, rtx op0, rtx op1)
Definition rtl.h:3520
void rebuild_jump_labels_chain(rtx_insn *)
Definition jump.cc:105
void PUT_MODE(rtx x, machine_mode mode)
Definition rtl.h:4023
bool invert_jump_1(rtx_jump_insn *, rtx)
Definition jump.cc:1601
rtx_insn * next_nonnote_nondebug_insn_bb(rtx_insn *)
Definition emit-rtl.cc:3683
rtx_insn * remove_free_INSN_LIST_node(rtx_insn_list **)
Definition lists.cc:221
bool costs_lt_p(struct full_rtx_costs *a, struct full_rtx_costs *b, bool speed)
Definition rtl.h:2105
void note_stores(const rtx_insn *, void(*)(rtx, const_rtx, void *), void *)
Definition rtlanal.cc:1990
rtx alloc_reg_note(enum reg_note, rtx, rtx)
Definition rtlanal.cc:2713
poly_uint64 subreg_lsb_1(machine_mode outer_mode, machine_mode inner_mode, poly_uint64 subreg_byte)
Definition rtl.h:2461
rtx_insn * emit_unlikely_jump_insn(rtx)
Definition emit-rtl.cc:5331
signop
Definition signop.h:28
#define MEM_STAT_DECL
Definition statistics.h:52
#define CXX_MEM_STAT_INFO
Definition statistics.h:58
tree variable_size(tree size)
Definition stor-layout.cc:67
Definition rtl.h:130
unsigned min_after_vec
Definition rtl.h:135
unsigned max_after_vec
Definition rtl.h:137
unsigned min_align
Definition rtl.h:132
unsigned min_after_base
Definition rtl.h:139
unsigned max_after_base
Definition rtl.h:141
unsigned base_after_vec
Definition rtl.h:134
unsigned offset_unsigned
Definition rtl.h:144
unsigned scale
Definition rtl.h:146
Definition rtl.h:2192
machine_mode mode
Definition rtl.h:2195
rtx * disp
Definition rtl.h:2251
addr_space_t as
Definition rtl.h:2198
rtx * segment_term
Definition rtl.h:2253
enum rtx_code base_outer_code
Definition rtl.h:2267
bool autoinc_p
Definition rtl.h:2201
rtx * inner
Definition rtl.h:2218
enum rtx_code addr_outer_code
Definition rtl.h:2264
rtx * base
Definition rtl.h:2249
rtx * base_term
Definition rtl.h:2254
rtx * outer
Definition rtl.h:2204
rtx * base_term2
Definition rtl.h:2260
rtx * segment
Definition rtl.h:2248
rtx * index_term
Definition rtl.h:2255
rtx * index
Definition rtl.h:2250
rtx * disp_term
Definition rtl.h:2256
Definition var-tracking.cc:242
Definition rtl.h:238
rtunion fld[2]
Definition rtl.h:240
struct object_block * block
Definition rtl.h:243
HOST_WIDE_INT offset
Definition rtl.h:247
Definition rtl.h:4579
HARD_REG_SET function_used_regs
Definition rtl.h:4584
unsigned int preferred_incoming_stack_boundary
Definition rtl.h:4580
Definition rtl.h:293
trailing_wide_ints< NUM_POLY_INT_COEFFS > coeffs
Definition rtl.h:294
Definition cselib.h:25
Definition double-int.h:50
Definition dwarf2out.h:57
Definition fixed-value.h:24
Definition rtl.h:2081
int size
Definition rtl.h:2083
int speed
Definition rtl.h:2082
Definition function.h:249
Definition rtl.h:283
HOST_WIDE_INT elem[1]
Definition rtl.h:284
static bool test(U *p)
Definition rtl.h:252
section * sect
Definition rtl.h:254
vec< rtx, va_gc > * objects
Definition rtl.h:270
HOST_WIDE_INT size
Definition rtl.h:260
unsigned int alignment
Definition rtl.h:257
vec< rtx, va_gc > * anchors
Definition rtl.h:280
Definition real.h:39
Definition rtl.h:223
unsigned int regno
Definition rtl.h:225
unsigned int nregs
Definition rtl.h:228
reg_attrs * attrs
Definition rtl.h:232
unsigned int unused
Definition rtl.h:229
Definition rtl.h:4535
rtx(* gen_lowpart)(machine_mode, rtx)
Definition rtl.h:4536
rtx(* reg_num_sign_bit_copies)(const_rtx, scalar_int_mode, scalar_int_mode, unsigned int *)
Definition rtl.h:4540
bool(* reg_truncated_to_mode)(machine_mode, const_rtx)
Definition rtl.h:4542
rtx(* reg_nonzero_bits)(const_rtx, scalar_int_mode, scalar_int_mode, unsigned HOST_WIDE_INT *)
Definition rtl.h:4538
rtx(* gen_lowpart_no_emit)(machine_mode, rtx)
Definition rtl.h:4537
Definition rtl.h:736
rtx elem[1]
Definition rtl.h:738
int num_elem
Definition rtl.h:737
Definition rtl.h:668
Definition rtl.h:629
Definition rtl.h:679
Definition rtl.h:4639
rtx op0
Definition rtl.h:4641
rtx op1
Definition rtl.h:4641
rtx_code code
Definition rtl.h:4640
machine_mode mode
Definition rtl.h:4642
Definition rtl.h:580
Definition rtl.h:312
enum var_init_status var_location_status
Definition rtl.h:421
unsigned int original_regno
Definition rtl.h:412
unsigned int call
Definition rtl.h:337
unsigned return_val
Definition rtl.h:403
unsigned int num_elem
Definition rtl.h:425
unsigned int in_struct
Definition rtl.h:378
unsigned int unchanging
Definition rtl.h:349
unsigned frame_related
Definition rtl.h:396
unsigned int used
Definition rtl.h:387
enum rtx_code code
Definition rtl.h:317
union rtx_def::@172124305105153346067300352223047126326240001260 u2
struct rtx_def::@172124305105153346067300352223047126326240001260::@102127077064127000005021335374023015057026123037 const_vector
unsigned int npatterns
Definition rtl.h:431
unsigned int symbol_ref_flags
Definition rtl.h:418
union rtx_def::u u
unsigned int jump
Definition rtl.h:330
unsigned int volatil
Definition rtl.h:363
unsigned int nelts_per_pattern
Definition rtl.h:434
int insn_uid
Definition rtl.h:415
enum machine_mode mode
Definition rtl.h:314
unsigned int unused
Definition rtl.h:437
Definition rtl.h:459
rtx element() const
Definition rtl.h:1410
rtx_expr_list * next() const
Definition rtl.h:1404
Definition rtl.h:480
rtx_insn * insn() const
Definition rtl.h:1423
rtx_insn_list * next() const
Definition rtl.h:1417
Definition rtl.h:546
void set_deleted()
Definition rtl.h:570
bool deleted() const
Definition rtl.h:566
void set_undeleted()
Definition rtl.h:574
Definition rtl.h:602
rtx jump_label() const
Definition rtl.h:1881
rtx_code_label * jump_target() const
Definition rtl.h:1886
void set_jump_target(rtx_code_label *)
Definition rtl.h:1891
Definition rtl.h:642
rtvec get_labels() const
Definition rtl.h:1540
scalar_int_mode get_data_mode() const
Definition rtl.h:1553
Definition rtl.h:591
Definition rtl.h:690
Definition rtl.h:513
rtx element(int index) const
Definition rtl.h:1436
rtx_insn * insn(int index) const
Definition rtl.h:1441
int len() const
Definition rtl.h:1431
Definition rtl.h:3759
bool representable_p
Definition rtl.h:3769
int nregs
Definition rtl.h:3766
int offset
Definition rtl.h:3761
Definition rtl.h:3899
rtx x_global_rtl[GR_MAX]
Definition rtl.h:3915
rtx x_top_of_stack[MAX_MACHINE_MODE]
Definition rtl.h:3932
rtx x_initial_regno_reg_rtx[FIRST_PSEUDO_REGISTER]
Definition rtl.h:3929
bool target_specific_initialized
Definition rtl.h:3942
rtx x_pic_offset_table_rtx
Definition rtl.h:3918
rtx x_static_reg_base_value[FIRST_PSEUDO_REGISTER]
Definition rtl.h:3936
class mem_attrs * x_mode_mem_attrs[(int) MAX_MACHINE_MODE]
Definition rtl.h:3939
rtx x_return_address_pointer_rtx
Definition rtl.h:3923
Definition wide-int.h:1758
Definition vec.h:450
static const bool is_sign_extended
Definition rtl.h:2284
static unsigned int get_precision(const rtx_mode_t &)
Definition rtl.h:2293
static wi::storage_ref decompose(HOST_WIDE_INT *, unsigned int, const rtx_mode_t &)
Definition rtl.h:2299
static const bool host_dependent_precision
Definition rtl.h:2281
static enum precision_type precision_type
Definition rtl.h:2280
static const bool needs_write_val_arg
Definition rtl.h:2285
Definition wide-int.h:427
#define NULL
Definition system.h:50
#define gcc_unreachable()
Definition system.h:841
#define bool
Definition system.h:886
#define STATIC_ASSERT(X)
Definition system.h:864
#define gcc_checking_assert(EXPR)
Definition system.h:821
Definition rtl.h:204
basic_block rt_bb
Definition rtl.h:216
struct dw_cfi_node * rt_cfi
Definition rtl.h:219
rtx rt_rtx
Definition rtl.h:210
location_t rt_loc
Definition rtl.h:207
struct cselib_val * rt_cselib
Definition rtl.h:214
tree rt_tree
Definition rtl.h:215
poly_uint16 rt_subreg
Definition rtl.h:208
const char * rt_str
Definition rtl.h:209
machine_mode rt_type
Definition rtl.h:212
int rt_int
Definition rtl.h:205
class constant_descriptor_rtx * rt_constant
Definition rtl.h:218
rtvec rt_rtvec
Definition rtl.h:211
unsigned int rt_uint
Definition rtl.h:206
mem_attrs * rt_mem
Definition rtl.h:217
addr_diff_vec_flags rt_addr_diff_vec_flags
Definition rtl.h:213
Definition rtl.h:444
struct fixed_value fv
Definition rtl.h:450
struct const_poly_int_def cpi
Definition rtl.h:452
struct reg_info reg
Definition rtl.h:447
struct real_value rv
Definition rtl.h:449
struct block_symbol block_sym
Definition rtl.h:448
struct hwivec_def hwiv
Definition rtl.h:451
HOST_WIDE_INT hwint[1]
Definition rtl.h:446
rtunion fld[1]
Definition rtl.h:445
Definition output.h:517
#define WIDE_INT_REF_FOR(T)
Definition wide-int.h:362
generic_wide_int< wide_int_storage > wide_int
Definition wide-int.h:343
const T2 & y
Definition wide-int.h:3870