Bug Summary

File:build/gcc/rtl.h
Warning:line 1472, column 3
Returning null reference

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-suse-linux -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name read-rtl-function.cc -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=cplusplus -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -analyzer-config-compatibility-mode=true -mrelocation-model static -mframe-pointer=none -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/gcc -resource-dir /usr/lib64/clang/15.0.7 -D IN_GCC -D HAVE_CONFIG_H -I . -I . -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/. -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../include -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libcpp/include -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libcody -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libdecnumber -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libdecnumber/bid -I ../libdecnumber -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libbacktrace -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13/x86_64-suse-linux -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13/backward -internal-isystem /usr/lib64/clang/15.0.7/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wno-narrowing -Wwrite-strings -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fdeprecated-macro -fdebug-compilation-dir=/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/gcc -ferror-limit 19 -fno-rtti -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -analyzer-output=plist-html -analyzer-config silence-checkers=core.NullDereference -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /buildworker/marxinbox-gcc-clang-static-analyzer/objdir/clang-static-analyzer/2023-03-27-141847-20772-1/report-WSXKi5.plist -x c++ /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc

/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc

1/* read-rtl-function.cc - Reader for RTL function dumps
2 Copyright (C) 2016-2023 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#include "config.h"
21#include "system.h"
22#include "coretypes.h"
23#include "target.h"
24#include "tree.h"
25#include "diagnostic.h"
26#include "read-md.h"
27#include "rtl.h"
28#include "cfghooks.h"
29#include "stringpool.h"
30#include "function.h"
31#include "tree-cfg.h"
32#include "cfg.h"
33#include "basic-block.h"
34#include "cfgrtl.h"
35#include "memmodel.h"
36#include "emit-rtl.h"
37#include "cgraph.h"
38#include "tree-pass.h"
39#include "toplev.h"
40#include "varasm.h"
41#include "read-rtl-function.h"
42#include "selftest.h"
43#include "selftest-rtl.h"
44#include "regs.h"
45#include "function-abi.h"
46
47/* Forward decls. */
48class function_reader;
49class fixup;
50
51/* Edges are recorded when parsing the "insn-chain" directive,
52 and created at the end when all the blocks ought to exist.
53 This struct records an "edge-from" or "edge-to" directive seen
54 at LOC, which will be turned into an actual CFG edge once
55 the "insn-chain" is fully parsed. */
56
57class deferred_edge
58{
59public:
60 deferred_edge (file_location loc, int src_bb_idx, int dest_bb_idx, int flags)
61 : m_loc (loc), m_src_bb_idx (src_bb_idx), m_dest_bb_idx (dest_bb_idx),
62 m_flags (flags)
63 {}
64
65 file_location m_loc;
66 int m_src_bb_idx;
67 int m_dest_bb_idx;
68 int m_flags;
69};
70
71/* Subclass of rtx_reader for reading function dumps. */
72
73class function_reader : public rtx_reader
74{
75 public:
76 function_reader ();
77 ~function_reader ();
78
79 /* Overridden vfuncs of class md_reader. */
80 void handle_unknown_directive (file_location, const char *) final override;
81
82 /* Overridden vfuncs of class rtx_reader. */
83 rtx read_rtx_operand (rtx x, int idx) final override;
84 void handle_any_trailing_information (rtx x) final override;
85 rtx postprocess (rtx) final override;
86 const char *finalize_string (char *stringbuf) final override;
87
88 rtx_insn **get_insn_by_uid (int uid);
89 tree parse_mem_expr (const char *desc);
90
91 private:
92 void parse_function ();
93 void create_function ();
94 void parse_param ();
95 void parse_insn_chain ();
96 void parse_block ();
97 int parse_bb_idx ();
98 void parse_edge (basic_block block, bool from);
99 rtx_insn *parse_insn (file_location loc, const char *name);
100 void parse_cfg (file_location loc);
101 void parse_crtl (file_location loc);
102 void create_edges ();
103
104 int parse_enum_value (int num_values, const char *const *strings);
105
106 void read_rtx_operand_u (rtx x, int idx);
107 void read_rtx_operand_i_or_n (rtx x, int idx, char format_char);
108 rtx read_rtx_operand_r (rtx x);
109 rtx extra_parsing_for_operand_code_0 (rtx x, int idx);
110
111 void add_fixup_insn_uid (file_location loc, rtx insn, int operand_idx,
112 int insn_uid);
113
114 void add_fixup_note_insn_basic_block (file_location loc, rtx insn,
115 int operand_idx, int bb_idx);
116
117 void add_fixup_source_location (file_location loc, rtx_insn *insn,
118 const char *filename, int lineno, int colno);
119
120 void add_fixup_expr (file_location loc, rtx x,
121 const char *desc);
122
123 rtx consolidate_singletons (rtx x);
124 rtx parse_rtx ();
125 void maybe_read_location (rtx_insn *insn);
126
127 void handle_insn_uids ();
128 void apply_fixups ();
129
130 private:
131 struct uid_hash : int_hash <int, -1, -2> {};
132 hash_map<uid_hash, rtx_insn *> m_insns_by_uid;
133 auto_vec<fixup *> m_fixups;
134 rtx_insn *m_first_insn;
135 auto_vec<tree> m_fake_scope;
136 char *m_name;
137 bool m_have_crtl_directive;
138 basic_block m_bb_to_insert_after;
139 auto_vec <deferred_edge> m_deferred_edges;
140 int m_highest_bb_idx;
141};
142
143/* Abstract base class for recording post-processing steps that must be
144 done after reading a .rtl file. */
145
146class fixup
147{
148 public:
149 /* Constructor for a fixup at LOC affecting X. */
150 fixup (file_location loc, rtx x)
151 : m_loc (loc), m_rtx (x)
152 {}
153 virtual ~fixup () {}
154
155 virtual void apply (function_reader *reader) const = 0;
156
157 protected:
158 file_location m_loc;
159 rtx m_rtx;
160};
161
162/* An abstract subclass of fixup for post-processing steps that
163 act on a specific operand of a specific instruction. */
164
165class operand_fixup : public fixup
166{
167 public:
168 /* Constructor for a fixup at LOC affecting INSN's operand
169 with index OPERAND_IDX. */
170 operand_fixup (file_location loc, rtx insn, int operand_idx)
171 : fixup (loc, insn), m_operand_idx (operand_idx)
172 {}
173
174 protected:
175 int m_operand_idx;
176};
177
178/* A concrete subclass of operand_fixup: fixup an rtx_insn *
179 field based on an integer UID. */
180
181class fixup_insn_uid : public operand_fixup
182{
183 public:
184 /* Constructor for a fixup at LOC affecting INSN's operand
185 with index OPERAND_IDX. Record INSN_UID as the uid. */
186 fixup_insn_uid (file_location loc, rtx insn, int operand_idx, int insn_uid)
187 : operand_fixup (loc, insn, operand_idx),
188 m_insn_uid (insn_uid)
189 {}
190
191 void apply (function_reader *reader) const final override;
192
193 private:
194 int m_insn_uid;
195};
196
197/* A concrete subclass of operand_fixup: fix up a
198 NOTE_INSN_BASIC_BLOCK based on an integer block ID. */
199
200class fixup_note_insn_basic_block : public operand_fixup
201{
202 public:
203 fixup_note_insn_basic_block (file_location loc, rtx insn, int operand_idx,
204 int bb_idx)
205 : operand_fixup (loc, insn, operand_idx),
206 m_bb_idx (bb_idx)
207 {}
208
209 void apply (function_reader *reader) const final override;
210
211 private:
212 int m_bb_idx;
213};
214
215/* A concrete subclass of fixup (not operand_fixup): fix up
216 the expr of an rtx (REG or MEM) based on a textual dump. */
217
218class fixup_expr : public fixup
219{
220 public:
221 fixup_expr (file_location loc, rtx x, const char *desc)
222 : fixup (loc, x),
223 m_desc (xstrdup (desc))
224 {}
225
226 ~fixup_expr () { free (m_desc); }
227
228 void apply (function_reader *reader) const final override;
229
230 private:
231 char *m_desc;
232};
233
234/* Return a textual description of the operand of INSN with
235 index OPERAND_IDX. */
236
237static const char *
238get_operand_name (rtx insn, int operand_idx)
239{
240 gcc_assert (is_a <rtx_insn *> (insn))((void)(!(is_a <rtx_insn *> (insn)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 240, __FUNCTION__), 0 : 0))
;
241 switch (operand_idx)
242 {
243 case 0:
244 return "PREV_INSN";
245 case 1:
246 return "NEXT_INSN";
247 default:
248 return NULLnullptr;
249 }
250}
251
252/* Fixup an rtx_insn * field based on an integer UID, as read by READER. */
253
254void
255fixup_insn_uid::apply (function_reader *reader) const
256{
257 rtx_insn **insn_from_uid = reader->get_insn_by_uid (m_insn_uid);
258 if (insn_from_uid)
259 XEXP (m_rtx, m_operand_idx)(((m_rtx)->u.fld[m_operand_idx]).rt_rtx) = *insn_from_uid;
260 else
261 {
262 const char *op_name = get_operand_name (m_rtx, m_operand_idx);
263 if (op_name)
264 error_at (m_loc,
265 "insn with UID %i not found for operand %i (`%s') of insn %i",
266 m_insn_uid, m_operand_idx, op_name, INSN_UID (m_rtx));
267 else
268 error_at (m_loc,
269 "insn with UID %i not found for operand %i of insn %i",
270 m_insn_uid, m_operand_idx, INSN_UID (m_rtx));
271 }
272}
273
274/* Fix up a NOTE_INSN_BASIC_BLOCK based on an integer block ID. */
275
276void
277fixup_note_insn_basic_block::apply (function_reader *) const
278{
279 basic_block bb = BASIC_BLOCK_FOR_FN (cfun, m_bb_idx)((*(((cfun + 0))->cfg->x_basic_block_info))[(m_bb_idx)]
)
;
280 gcc_assert (bb)((void)(!(bb) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 280, __FUNCTION__), 0 : 0))
;
281 NOTE_BASIC_BLOCK (m_rtx)(((m_rtx)->u.fld[3]).rt_bb) = bb;
282}
283
284/* Fix up the expr of an rtx (REG or MEM) based on a textual dump
285 read by READER. */
286
287void
288fixup_expr::apply (function_reader *reader) const
289{
290 tree expr = reader->parse_mem_expr (m_desc);
291 switch (GET_CODE (m_rtx)((enum rtx_code) (m_rtx)->code))
292 {
293 case REG:
294 set_reg_attrs_for_decl_rtl (expr, m_rtx);
295 break;
296 case MEM:
297 set_mem_expr (m_rtx, expr);
298 break;
299 default:
300 gcc_unreachable ()(fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 300, __FUNCTION__))
;
301 }
302}
303
304/* Strip trailing whitespace from DESC. */
305
306static void
307strip_trailing_whitespace (char *desc)
308{
309 char *terminator = desc + strlen (desc);
310 while (desc < terminator)
311 {
312 terminator--;
313 if (ISSPACE (*terminator)(_sch_istable[(*terminator) & 0xff] & (unsigned short
)(_sch_isspace))
)
314 *terminator = '\0';
315 else
316 break;
317 }
318}
319
320/* Return the numeric value n for GET_NOTE_INSN_NAME (n) for STRING,
321 or fail if STRING isn't recognized. */
322
323static int
324parse_note_insn_name (const char *string)
325{
326 for (int i = 0; i < NOTE_INSN_MAX; i++)
327 if (strcmp (string, GET_NOTE_INSN_NAME (i)(note_insn_name[(i)])) == 0)
328 return i;
329 fatal_with_file_and_line ("unrecognized NOTE_INSN name: `%s'", string);
330}
331
332/* Return the register number for NAME, or return -1 if it isn't
333 recognized. */
334
335static int
336lookup_reg_by_dump_name (const char *name)
337{
338 for (int i = 0; i < FIRST_PSEUDO_REGISTER76; i++)
339 if (reg_names(this_target_hard_regs->x_reg_names)[i][0]
340 && ! strcmp (name, reg_names(this_target_hard_regs->x_reg_names)[i]))
341 return i;
342
343 /* Also lookup virtuals. */
344 if (!strcmp (name, "virtual-incoming-args"))
345 return VIRTUAL_INCOMING_ARGS_REGNUM((76));
346 if (!strcmp (name, "virtual-stack-vars"))
347 return VIRTUAL_STACK_VARS_REGNUM(((76)) + 1);
348 if (!strcmp (name, "virtual-stack-dynamic"))
349 return VIRTUAL_STACK_DYNAMIC_REGNUM(((76)) + 2);
350 if (!strcmp (name, "virtual-outgoing-args"))
351 return VIRTUAL_OUTGOING_ARGS_REGNUM(((76)) + 3);
352 if (!strcmp (name, "virtual-cfa"))
353 return VIRTUAL_CFA_REGNUM(((76)) + 4);
354 if (!strcmp (name, "virtual-preferred-stack-boundary"))
355 return VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM(((76)) + 5);
356 /* TODO: handle "virtual-reg-%d". */
357
358 /* In compact mode, pseudos are printed with '< and '>' wrapping the regno,
359 offseting it by (LAST_VIRTUAL_REGISTER + 1), so that the
360 first non-virtual pseudo is dumped as "<0>". */
361 if (name[0] == '<' && name[strlen (name) - 1] == '>')
362 {
363 int dump_num = atoi (name + 1);
364 return dump_num + LAST_VIRTUAL_REGISTER(((76)) + 5) + 1;
365 }
366
367 /* Not found. */
368 return -1;
369}
370
371/* class function_reader : public rtx_reader */
372
373/* function_reader's constructor. */
374
375function_reader::function_reader ()
376: rtx_reader (true),
377 m_first_insn (NULLnullptr),
378 m_name (NULLnullptr),
379 m_have_crtl_directive (false),
380 m_bb_to_insert_after (NULLnullptr),
381 m_highest_bb_idx (EXIT_BLOCK(1))
382{
383}
384
385/* function_reader's destructor. */
386
387function_reader::~function_reader ()
388{
389 int i;
390 fixup *f;
391 FOR_EACH_VEC_ELT (m_fixups, i, f)for (i = 0; (m_fixups).iterate ((i), &(f)); ++(i))
392 delete f;
393
394 free (m_name);
395}
396
397/* Implementation of rtx_reader::handle_unknown_directive,
398 for parsing the remainder of a directive with name NAME
399 seen at START_LOC.
400
401 Require a top-level "function" directive, as emitted by
402 print_rtx_function, and parse it. */
403
404void
405function_reader::handle_unknown_directive (file_location start_loc,
406 const char *name)
407{
408 if (strcmp (name, "function"))
1
Taking false branch
409 fatal_at (start_loc, "expected 'function'");
410
411 if (flag_ltoglobal_options.x_flag_lto)
2
Assuming field 'x_flag_lto' is null
3
Taking false branch
412 error ("%<__RTL%> function cannot be compiled with %<-flto%>");
413
414 parse_function ();
4
Calling 'function_reader::parse_function'
415}
416
417/* Parse the output of print_rtx_function (or hand-written data in the
418 same format), having already parsed the "(function" heading, and
419 finishing immediately before the final ")".
420
421 The "param" and "crtl" clauses are optional. */
422
423void
424function_reader::parse_function ()
425{
426 m_name = xstrdup (read_string (0));
427
428 create_function ();
429
430 while (1)
5
Loop condition is true. Entering loop body
431 {
432 int c = read_skip_spaces ();
433 if (c == ')')
6
Assuming the condition is false
7
Taking false branch
434 {
435 unread_char (c);
436 break;
437 }
438 unread_char (c);
439 require_char ('(');
440 file_location loc = get_current_location ();
441 struct md_name directive;
442 read_name (&directive);
443 if (strcmp (directive.string, "param") == 0)
8
Assuming the condition is false
9
Taking false branch
444 parse_param ();
445 else if (strcmp (directive.string, "insn-chain") == 0)
10
Taking true branch
446 parse_insn_chain ();
11
Calling 'function_reader::parse_insn_chain'
447 else if (strcmp (directive.string, "crtl") == 0)
448 parse_crtl (loc);
449 else
450 fatal_with_file_and_line ("unrecognized directive: %s",
451 directive.string);
452 }
453
454 handle_insn_uids ();
455
456 apply_fixups ();
457
458 /* Rebuild the JUMP_LABEL field of any JUMP_INSNs in the chain, and the
459 LABEL_NUSES of any CODE_LABELs.
460
461 This has to happen after apply_fixups, since only after then do
462 LABEL_REFs have their label_ref_label set up. */
463 rebuild_jump_labels (get_insns ());
464
465 crtl(&x_rtl)->init_stack_alignment ();
466}
467
468/* Set up state for the function *before* fixups are applied.
469
470 Create "cfun" and a decl for the function.
471 By default, every function decl is hardcoded as
472 int test_1 (int i, int j, int k);
473 Set up various other state:
474 - the cfg and basic blocks (edges are created later, *after* fixups
475 are applied).
476 - add the function to the callgraph. */
477
478void
479function_reader::create_function ()
480{
481 /* We start in cfgrtl mode, rather than cfglayout mode. */
482 rtl_register_cfg_hooks ();
483
484 /* When run from selftests or "rtl1", cfun is NULL.
485 When run from "cc1" for a C function tagged with __RTL, cfun is the
486 tagged function. */
487 if (!cfun(cfun + 0))
488 {
489 tree fn_name = get_identifier (m_name ? m_name : "test_1")(__builtin_constant_p (m_name ? m_name : "test_1") ? get_identifier_with_length
((m_name ? m_name : "test_1"), strlen (m_name ? m_name : "test_1"
)) : get_identifier (m_name ? m_name : "test_1"))
;
490 tree int_type = integer_type_nodeinteger_types[itk_int];
491 tree return_type = int_type;
492 tree arg_types[3] = {int_type, int_type, int_type};
493 tree fn_type = build_function_type_array (return_type, 3, arg_types);
494 tree fndecl = build_decl (UNKNOWN_LOCATION((location_t) 0), FUNCTION_DECL, fn_name, fn_type);
495 tree resdecl = build_decl (UNKNOWN_LOCATION((location_t) 0), RESULT_DECL, NULL_TREE(tree) nullptr,
496 return_type);
497 DECL_ARTIFICIAL (resdecl)((contains_struct_check ((resdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 497, __FUNCTION__))->decl_common.artificial_flag)
= 1;
498 DECL_IGNORED_P (resdecl)((contains_struct_check ((resdecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 498, __FUNCTION__))->decl_common.ignored_flag)
= 1;
499 DECL_RESULT (fndecl)((tree_check ((fndecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 499, __FUNCTION__, (FUNCTION_DECL)))->decl_non_common.result
)
= resdecl;
500 allocate_struct_function (fndecl, false);
501 /* This sets cfun. */
502 current_function_decl = fndecl;
503 }
504
505 gcc_assert (cfun)((void)(!((cfun + 0)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 505, __FUNCTION__), 0 : 0))
;
506 gcc_assert (current_function_decl)((void)(!(current_function_decl) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 506, __FUNCTION__), 0 : 0))
;
507 tree fndecl = current_function_decl;
508
509 /* Mark this function as being specified as __RTL. */
510 cfun(cfun + 0)->curr_properties |= PROP_rtl(1 << 7);
511
512 /* cc1 normally inits DECL_INITIAL (fndecl) to be error_mark_node.
513 Create a dummy block for it. */
514 DECL_INITIAL (fndecl)((contains_struct_check ((fndecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 514, __FUNCTION__))->decl_common.initial)
= make_node (BLOCK);
515
516 cfun(cfun + 0)->curr_properties = (PROP_cfg(1 << 3) | PROP_rtl(1 << 7));
517
518 /* Do we need this to force cgraphunit.cc to output the function? */
519 DECL_EXTERNAL (fndecl)((contains_struct_check ((fndecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 519, __FUNCTION__))->decl_common.decl_flag_1)
= 0;
520 DECL_PRESERVE_P (fndecl)(contains_struct_check ((fndecl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 520, __FUNCTION__))->decl_common.preserve_flag
= 1;
521
522 /* Add to cgraph. */
523 cgraph_node::finalize_function (fndecl, false);
524
525 /* Create bare-bones cfg. This creates the entry and exit blocks. */
526 init_empty_tree_cfg_for_function (cfun(cfun + 0));
527 ENTRY_BLOCK_PTR_FOR_FN (cfun)(((cfun + 0))->cfg->x_entry_block_ptr)->flags |= BB_RTL;
528 EXIT_BLOCK_PTR_FOR_FN (cfun)(((cfun + 0))->cfg->x_exit_block_ptr)->flags |= BB_RTL;
529 init_rtl_bb_info (ENTRY_BLOCK_PTR_FOR_FN (cfun)(((cfun + 0))->cfg->x_entry_block_ptr));
530 init_rtl_bb_info (EXIT_BLOCK_PTR_FOR_FN (cfun)(((cfun + 0))->cfg->x_exit_block_ptr));
531 m_bb_to_insert_after = ENTRY_BLOCK_PTR_FOR_FN (cfun)(((cfun + 0))->cfg->x_entry_block_ptr);
532
533}
534
535/* Look within the params of FNDECL for a param named NAME.
536 Return NULL_TREE if one isn't found. */
537
538static tree
539find_param_by_name (tree fndecl, const char *name)
540{
541 for (tree arg = DECL_ARGUMENTS (fndecl)((tree_check ((fndecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 541, __FUNCTION__, (FUNCTION_DECL)))->function_decl.arguments
)
; arg; arg = TREE_CHAIN (arg)((contains_struct_check ((arg), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 541, __FUNCTION__))->common.chain)
)
542 if (id_equal (DECL_NAME (arg)((contains_struct_check ((arg), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 542, __FUNCTION__))->decl_minimal.name)
, name))
543 return arg;
544 return NULL_TREE(tree) nullptr;
545}
546
547/* Parse the content of a "param" directive, having already parsed the
548 "(param". Consume the trailing ')'. */
549
550void
551function_reader::parse_param ()
552{
553 require_char_ws ('"');
554 file_location loc = get_current_location ();
555 char *name = read_quoted_string ();
556
557 /* Lookup param by name. */
558 tree t_param = find_param_by_name (cfun(cfun + 0)->decl, name);
559 if (!t_param)
560 fatal_at (loc, "param not found: %s", name);
561
562 /* Parse DECL_RTL. */
563 require_char_ws ('(');
564 require_word_ws ("DECL_RTL");
565 DECL_WRTL_CHECK (t_param)(contains_struct_check ((t_param), (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 565, __FUNCTION__))
->decl_with_rtl.rtl = parse_rtx ();
566 require_char_ws (')');
567
568 /* Parse DECL_RTL_INCOMING. */
569 require_char_ws ('(');
570 require_word_ws ("DECL_RTL_INCOMING");
571 DECL_INCOMING_RTL (t_param)((tree_check ((t_param), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 571, __FUNCTION__, (PARM_DECL)))->parm_decl.incoming_rtl
)
= parse_rtx ();
572 require_char_ws (')');
573
574 require_char_ws (')');
575}
576
577/* Parse zero or more child insn elements within an
578 "insn-chain" element. Consume the trailing ')'. */
579
580void
581function_reader::parse_insn_chain ()
582{
583 while (1)
12
Loop condition is true. Entering loop body
584 {
585 int c = read_skip_spaces ();
586 file_location loc = get_current_location ();
587 if (c == ')')
13
Assuming the condition is false
14
Taking false branch
588 break;
589 else if (c == '(')
15
Assuming the condition is true
16
Taking true branch
590 {
591 struct md_name directive;
592 read_name (&directive);
593 if (strcmp (directive.string, "block") == 0)
17
Taking true branch
594 parse_block ();
18
Calling 'function_reader::parse_block'
595 else
596 parse_insn (loc, directive.string);
597 }
598 else
599 fatal_at (loc, "expected '(' or ')'");
600 }
601
602 create_edges ();
603}
604
605/* Parse zero or more child directives (edges and insns) within a
606 "block" directive, having already parsed the "(block " heading.
607 Consume the trailing ')'. */
608
609void
610function_reader::parse_block ()
611{
612 /* Parse the index value from the dump. This will be an integer;
613 we don't support "entry" or "exit" here (unlike for edges). */
614 struct md_name name;
615 read_name (&name);
616 int bb_idx = atoi (name.string);
617
618 /* The term "index" has two meanings for basic blocks in a CFG:
619 (a) the "index" field within struct basic_block_def.
620 (b) the index of a basic_block within the cfg's x_basic_block_info
621 vector, as accessed via BASIC_BLOCK_FOR_FN.
622
623 These can get out-of-sync when basic blocks are optimized away.
624 They get back in sync by "compact_blocks".
625 We reconstruct cfun->cfg->x_basic_block_info->address () pointed
626 vector elements with NULL values in it for any missing basic blocks,
627 so that (a) == (b) for all of the blocks we create. The
628 doubly-linked list of basic blocks (next_bb/prev_bb) skips over
629 these "holes". */
630
631 if (m_highest_bb_idx < bb_idx)
19
Assuming 'bb_idx' is <= field 'm_highest_bb_idx'
20
Taking false branch
632 m_highest_bb_idx = bb_idx;
633
634 size_t new_size = m_highest_bb_idx + 1;
635 if (basic_block_info_for_fn (cfun)(((cfun + 0))->cfg->x_basic_block_info)->length () < new_size)
21
Assuming the condition is false
22
Taking false branch
636 vec_safe_grow_cleared (basic_block_info_for_fn (cfun)(((cfun + 0))->cfg->x_basic_block_info), new_size, true);
637
638 last_basic_block_for_fn (cfun)(((cfun + 0))->cfg->x_last_basic_block) = new_size;
639
640 /* Create the basic block.
641
642 We can't call create_basic_block and use the regular RTL block-creation
643 hooks, since this creates NOTE_INSN_BASIC_BLOCK instances. We don't
644 want to do that; we want to use the notes we were provided with. */
645 basic_block bb = alloc_block ();
646 init_rtl_bb_info (bb);
647 bb->index = bb_idx;
648 bb->flags = BB_NEW | BB_RTL;
649 link_block (bb, m_bb_to_insert_after);
650 m_bb_to_insert_after = bb;
651
652 n_basic_blocks_for_fn (cfun)(((cfun + 0))->cfg->x_n_basic_blocks)++;
653 SET_BASIC_BLOCK_FOR_FN (cfun, bb_idx, bb)((*(((cfun + 0))->cfg->x_basic_block_info))[(bb_idx)] =
(bb))
;
654 BB_SET_PARTITION (bb, BB_UNPARTITIONED)do { basic_block bb_ = (bb); bb_->flags = ((bb_->flags &
~(BB_HOT_PARTITION|BB_COLD_PARTITION)) | (0)); } while (0)
;
23
Loop condition is false. Exiting loop
655
656 /* Handle insns, edge-from and edge-to directives. */
657 while (1)
24
Loop condition is true. Entering loop body
658 {
659 int c = read_skip_spaces ();
660 file_location loc = get_current_location ();
661 if (c == ')')
25
Assuming the condition is false
26
Taking false branch
662 break;
663 else if (c == '(')
27
Assuming the condition is true
28
Taking true branch
664 {
665 struct md_name directive;
666 read_name (&directive);
667 if (strcmp (directive.string, "edge-from") == 0)
29
Assuming the condition is false
30
Taking false branch
668 parse_edge (bb, true);
669 else if (strcmp (directive.string, "edge-to") == 0)
31
Assuming the condition is false
32
Taking false branch
670 parse_edge (bb, false);
671 else
672 {
673 rtx_insn *insn = parse_insn (loc, directive.string);
33
Calling 'function_reader::parse_insn'
674 set_block_for_insn (insn, bb);
675 if (!BB_HEAD (bb)(bb)->il.x.head_)
676 BB_HEAD (bb)(bb)->il.x.head_ = insn;
677 BB_END (bb)(bb)->il.x.rtl->end_ = insn;
678 }
679 }
680 else
681 fatal_at (loc, "expected '(' or ')'");
682 }
683}
684
685/* Subroutine of function_reader::parse_edge.
686 Parse a basic block index, handling "entry" and "exit". */
687
688int
689function_reader::parse_bb_idx ()
690{
691 struct md_name name;
692 read_name (&name);
693 if (strcmp (name.string, "entry") == 0)
694 return ENTRY_BLOCK(0);
695 if (strcmp (name.string, "exit") == 0)
696 return EXIT_BLOCK(1);
697 return atoi (name.string);
698}
699
700/* Subroutine of parse_edge_flags.
701 Parse TOK, a token such as "FALLTHRU", converting to the flag value.
702 Issue an error if the token is unrecognized. */
703
704static int
705parse_edge_flag_token (const char *tok)
706{
707#define DEF_EDGE_FLAG(NAME,IDX) \
708 do { \
709 if (strcmp (tok, #NAME) == 0) \
710 return EDGE_##NAME; \
711 } while (0);
712#include "cfg-flags.def"
713#undef DEF_EDGE_FLAG
714 error ("unrecognized edge flag: %qs", tok);
715 return 0;
716}
717
718/* Subroutine of function_reader::parse_edge.
719 Parse STR and convert to a flag value (or issue an error).
720 The parser uses strtok and hence modifiers STR in-place. */
721
722static int
723parse_edge_flags (char *str)
724{
725 int result = 0;
726
727 char *tok = strtok (str, "| ");
728 while (tok)
729 {
730 result |= parse_edge_flag_token (tok);
731 tok = strtok (NULLnullptr, "| ");
732 }
733
734 return result;
735}
736
737/* Parse an "edge-from" or "edge-to" directive within the "block"
738 directive for BLOCK, having already parsed the "(edge" heading.
739 Consume the final ")". Record the edge within m_deferred_edges.
740 FROM is true for an "edge-from" directive, false for an "edge-to"
741 directive. */
742
743void
744function_reader::parse_edge (basic_block block, bool from)
745{
746 gcc_assert (block)((void)(!(block) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 746, __FUNCTION__), 0 : 0))
;
747 int this_bb_idx = block->index;
748 file_location loc = get_current_location ();
749 int other_bb_idx = parse_bb_idx ();
750
751 /* "(edge-from 2)" means src = 2, dest = this_bb_idx, whereas
752 "(edge-to 3)" means src = this_bb_idx, dest = 3. */
753 int src_idx = from ? other_bb_idx : this_bb_idx;
754 int dest_idx = from ? this_bb_idx : other_bb_idx;
755
756 /* Optional "(flags)". */
757 int flags = 0;
758 int c = read_skip_spaces ();
759 if (c == '(')
760 {
761 require_word_ws ("flags");
762 require_char_ws ('"');
763 char *str = read_quoted_string ();
764 flags = parse_edge_flags (str);
765 require_char_ws (')');
766 }
767 else
768 unread_char (c);
769
770 require_char_ws (')');
771
772 /* This BB already exists, but the other BB might not yet.
773 For now, save the edges, and create them at the end of insn-chain
774 processing. */
775 /* For now, only process the (edge-from) to this BB, and (edge-to)
776 that go to the exit block.
777 FIXME: we don't yet verify that the edge-from and edge-to directives
778 are consistent. */
779 if (from || dest_idx == EXIT_BLOCK(1))
780 m_deferred_edges.safe_push (deferred_edge (loc, src_idx, dest_idx, flags));
781}
782
783/* Parse an rtx instruction, having parsed the opening and parenthesis, and
784 name NAME, seen at START_LOC, by calling read_rtx_code, calling
785 set_first_insn and set_last_insn as appropriate, and
786 adding the insn to the insn chain.
787 Consume the trailing ')'. */
788
789rtx_insn *
790function_reader::parse_insn (file_location start_loc, const char *name)
791{
792 rtx x = read_rtx_code (name);
793 if (!x)
34
Assuming 'x' is non-null
35
Taking false branch
794 fatal_at (start_loc, "expected insn type; got '%s'", name);
795 rtx_insn *insn = dyn_cast <rtx_insn *> (x);
36
'insn' initialized here
796 if (!insn)
37
Assuming 'insn' is null
38
Taking true branch
797 fatal_at (start_loc, "expected insn type; got '%s'", name);
798
799 /* Consume the trailing ')'. */
800 require_char_ws (')');
801
802 rtx_insn *last_insn = get_last_insn ();
803
804 /* Add "insn" to the insn chain. */
805 if (last_insn)
39
Assuming 'last_insn' is null
40
Taking false branch
806 {
807 gcc_assert (NEXT_INSN (last_insn) == NULL)((void)(!(NEXT_INSN (last_insn) == nullptr) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 807, __FUNCTION__), 0 : 0))
;
808 SET_NEXT_INSN (last_insn) = insn;
809 }
810 SET_PREV_INSN (insn) = last_insn;
41
Passing null pointer value via 1st parameter 'insn'
42
Calling 'SET_PREV_INSN'
811
812 /* Add it to the sequence. */
813 set_last_insn (insn);
814 if (!m_first_insn)
815 {
816 m_first_insn = insn;
817 set_first_insn (insn);
818 }
819
820 if (rtx_code_label *label = dyn_cast <rtx_code_label *> (insn))
821 maybe_set_max_label_num (label);
822
823 return insn;
824}
825
826/* Postprocessing subroutine for parse_insn_chain: all the basic blocks
827 should have been created by now; create the edges that were seen. */
828
829void
830function_reader::create_edges ()
831{
832 int i;
833 deferred_edge *de;
834 FOR_EACH_VEC_ELT (m_deferred_edges, i, de)for (i = 0; (m_deferred_edges).iterate ((i), &(de)); ++(i
))
835 {
836 /* The BBs should already have been created by parse_block. */
837 basic_block src = BASIC_BLOCK_FOR_FN (cfun, de->m_src_bb_idx)((*(((cfun + 0))->cfg->x_basic_block_info))[(de->m_src_bb_idx
)])
;
838 if (!src)
839 fatal_at (de->m_loc, "error: block index %i not found",
840 de->m_src_bb_idx);
841 basic_block dst = BASIC_BLOCK_FOR_FN (cfun, de->m_dest_bb_idx)((*(((cfun + 0))->cfg->x_basic_block_info))[(de->m_dest_bb_idx
)])
;
842 if (!dst)
843 fatal_at (de->m_loc, "error: block with index %i not found",
844 de->m_dest_bb_idx);
845 unchecked_make_edge (src, dst, de->m_flags);
846 }
847}
848
849/* Parse a "crtl" directive, having already parsed the "(crtl" heading
850 at location LOC.
851 Consume the final ")". */
852
853void
854function_reader::parse_crtl (file_location loc)
855{
856 if (m_have_crtl_directive)
857 error_at (loc, "more than one 'crtl' directive");
858 m_have_crtl_directive = true;
859
860 /* return_rtx. */
861 require_char_ws ('(');
862 require_word_ws ("return_rtx");
863 crtl(&x_rtl)->return_rtx = parse_rtx ();
864 require_char_ws (')');
865
866 require_char_ws (')');
867}
868
869/* Parse operand IDX of X, returning X, or an equivalent rtx
870 expression (for consolidating singletons).
871 This is an overridden implementation of rtx_reader::read_rtx_operand for
872 function_reader, handling various extra data printed by print_rtx,
873 and sometimes calling the base class implementation. */
874
875rtx
876function_reader::read_rtx_operand (rtx x, int idx)
877{
878 RTX_CODEenum rtx_code code = GET_CODE (x)((enum rtx_code) (x)->code);
879 const char *format_ptr = GET_RTX_FORMAT (code)(rtx_format[(int) (code)]);
880 const char format_char = format_ptr[idx];
881 struct md_name name;
882
883 /* Override the regular parser for some format codes. */
884 switch (format_char)
885 {
886 case 'e':
887 if (idx == 7 && CALL_P (x)(((enum rtx_code) (x)->code) == CALL_INSN))
888 {
889 m_in_call_function_usage = true;
890 rtx tem = rtx_reader::read_rtx_operand (x, idx);
891 m_in_call_function_usage = false;
892 return tem;
893 }
894 else
895 return rtx_reader::read_rtx_operand (x, idx);
896 break;
897
898 case 'u':
899 read_rtx_operand_u (x, idx);
900 /* Don't run regular parser for 'u'. */
901 return x;
902
903 case 'i':
904 case 'n':
905 read_rtx_operand_i_or_n (x, idx, format_char);
906 /* Don't run regular parser for these codes. */
907 return x;
908
909 case 'B':
910 gcc_assert (is_compact ())((void)(!(is_compact ()) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 910, __FUNCTION__), 0 : 0))
;
911 /* Compact mode doesn't store BBs. */
912 /* Don't run regular parser. */
913 return x;
914
915 case 'r':
916 /* Don't run regular parser for 'r'. */
917 return read_rtx_operand_r (x);
918
919 default:
920 break;
921 }
922
923 /* Call base class implementation. */
924 x = rtx_reader::read_rtx_operand (x, idx);
925
926 /* Handle any additional parsing needed to handle what the dump
927 could contain. */
928 switch (format_char)
929 {
930 case '0':
931 x = extra_parsing_for_operand_code_0 (x, idx);
932 break;
933
934 case 'w':
935 if (!is_compact ())
936 {
937 /* Strip away the redundant hex dump of the value. */
938 require_char_ws ('[');
939 read_name (&name);
940 require_char_ws (']');
941 }
942 break;
943
944 default:
945 break;
946 }
947
948 return x;
949}
950
951/* Parse operand IDX of X, of code 'u', when reading function dumps.
952
953 The RTL file recorded the ID of an insn (or 0 for NULL); we
954 must store this as a pointer, but the insn might not have
955 been loaded yet. Store the ID away for now, via a fixup. */
956
957void
958function_reader::read_rtx_operand_u (rtx x, int idx)
959{
960 /* In compact mode, the PREV/NEXT insn uids are not dumped, so skip
961 the "uu" when reading. */
962 if (is_compact () && GET_CODE (x)((enum rtx_code) (x)->code) != LABEL_REF)
963 return;
964
965 struct md_name name;
966 file_location loc = read_name (&name);
967 int insn_id = atoi (name.string);
968 if (insn_id)
969 add_fixup_insn_uid (loc, x, idx, insn_id);
970}
971
972/* Read a name, looking for a match against a string found in array
973 STRINGS of size NUM_VALUES.
974 Return the index of the matched string, or emit an error. */
975
976int
977function_reader::parse_enum_value (int num_values, const char *const *strings)
978{
979 struct md_name name;
980 read_name (&name);
981 for (int i = 0; i < num_values; i++)
982 {
983 if (strcmp (name.string, strings[i]) == 0)
984 return i;
985 }
986 error ("unrecognized enum value: %qs", name.string);
987 return 0;
988}
989
990/* Parse operand IDX of X, of code 'i' or 'n' (as specified by FORMAT_CHAR).
991 Special-cased handling of these, for reading function dumps. */
992
993void
994function_reader::read_rtx_operand_i_or_n (rtx x, int idx,
995 char format_char)
996{
997 /* Handle some of the extra information that print_rtx
998 can write out for these cases. */
999 /* print_rtx only writes out operand 5 for notes
1000 for NOTE_KIND values NOTE_INSN_DELETED_LABEL
1001 and NOTE_INSN_DELETED_DEBUG_LABEL. */
1002 if (idx == 5 && NOTE_P (x)(((enum rtx_code) (x)->code) == NOTE))
1003 return;
1004
1005 if (idx == 4 && INSN_P (x)(((((enum rtx_code) (x)->code) == INSN) || (((enum rtx_code
) (x)->code) == JUMP_INSN) || (((enum rtx_code) (x)->code
) == CALL_INSN)) || (((enum rtx_code) (x)->code) == DEBUG_INSN
))
)
1006 {
1007 maybe_read_location (as_a <rtx_insn *> (x));
1008 return;
1009 }
1010
1011 /* INSN_CODEs aren't printed in compact mode, so don't attempt to
1012 parse them. */
1013 if (is_compact ()
1014 && INSN_P (x)(((((enum rtx_code) (x)->code) == INSN) || (((enum rtx_code
) (x)->code) == JUMP_INSN) || (((enum rtx_code) (x)->code
) == CALL_INSN)) || (((enum rtx_code) (x)->code) == DEBUG_INSN
))
1015 && &INSN_CODE (x)(((x)->u.fld[5]).rt_int) == &XINT (x, idx)(((x)->u.fld[idx]).rt_int))
1016 {
1017 INSN_CODE (x)(((x)->u.fld[5]).rt_int) = -1;
1018 return;
1019 }
1020
1021 /* Handle UNSPEC and UNSPEC_VOLATILE's operand 1. */
1022#if !defined(GENERATOR_FILE) && NUM_UNSPECV_VALUES109 > 0
1023 if (idx == 1
1024 && GET_CODE (x)((enum rtx_code) (x)->code) == UNSPEC_VOLATILE)
1025 {
1026 XINT (x, 1)(((x)->u.fld[1]).rt_int)
1027 = parse_enum_value (NUM_UNSPECV_VALUES109, unspecv_strings);
1028 return;
1029 }
1030#endif
1031#if !defined(GENERATOR_FILE) && NUM_UNSPEC_VALUES234 > 0
1032 if (idx == 1
1033 && (GET_CODE (x)((enum rtx_code) (x)->code) == UNSPEC
1034 || GET_CODE (x)((enum rtx_code) (x)->code) == UNSPEC_VOLATILE))
1035 {
1036 XINT (x, 1)(((x)->u.fld[1]).rt_int)
1037 = parse_enum_value (NUM_UNSPEC_VALUES234, unspec_strings);
1038 return;
1039 }
1040#endif
1041
1042 struct md_name name;
1043 read_name (&name);
1044 int value;
1045 if (format_char == 'n')
1046 value = parse_note_insn_name (name.string);
1047 else
1048 value = atoi (name.string);
1049 XINT (x, idx)(((x)->u.fld[idx]).rt_int) = value;
1050}
1051
1052/* Parse the 'r' operand of X, returning X, or an equivalent rtx
1053 expression (for consolidating singletons).
1054 Special-cased handling of code 'r' for reading function dumps. */
1055
1056rtx
1057function_reader::read_rtx_operand_r (rtx x)
1058{
1059 struct md_name name;
1060 file_location loc = read_name (&name);
1061 int regno = lookup_reg_by_dump_name (name.string);
1062 if (regno == -1)
1063 fatal_at (loc, "unrecognized register: '%s'", name.string);
1064
1065 set_regno_raw (x, regno, 1);
1066
1067 /* Consolidate singletons. */
1068 x = consolidate_singletons (x);
1069
1070 ORIGINAL_REGNO (x)(__extension__ ({ __typeof ((x)) const _rtx = ((x)); if (((enum
rtx_code) (_rtx)->code) != REG) rtl_check_failed_flag ("ORIGINAL_REGNO"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1070, __FUNCTION__); _rtx; })->u2.original_regno)
= regno;
1071
1072 /* Parse extra stuff at end of 'r'.
1073 We may have zero, one, or two sections marked by square
1074 brackets. */
1075 int ch = read_skip_spaces ();
1076 bool expect_original_regno = false;
1077 if (ch == '[')
1078 {
1079 file_location loc = get_current_location ();
1080 char *desc = read_until ("]", true);
1081 strip_trailing_whitespace (desc);
1082 const char *desc_start = desc;
1083 /* If ORIGINAL_REGNO (rtx) != regno, we will have:
1084 "orig:%i", ORIGINAL_REGNO (rtx).
1085 Consume it, we don't set ORIGINAL_REGNO, since we can
1086 get that from the 2nd copy later. */
1087 if (startswith (desc, "orig:"))
1088 {
1089 expect_original_regno = true;
1090 desc_start += 5;
1091 /* Skip to any whitespace following the integer. */
1092 const char *space = strchr (desc_start, ' ');
1093 if (space)
1094 desc_start = space + 1;
1095 }
1096 /* Any remaining text may be the REG_EXPR. Alternatively we have
1097 no REG_ATTRS, and instead we have ORIGINAL_REGNO. */
1098 if (ISDIGIT (*desc_start)(_sch_istable[(*desc_start) & 0xff] & (unsigned short
)(_sch_isdigit))
)
1099 {
1100 /* Assume we have ORIGINAL_REGNO. */
1101 ORIGINAL_REGNO (x)(__extension__ ({ __typeof ((x)) const _rtx = ((x)); if (((enum
rtx_code) (_rtx)->code) != REG) rtl_check_failed_flag ("ORIGINAL_REGNO"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1101, __FUNCTION__); _rtx; })->u2.original_regno)
= atoi (desc_start);
1102 }
1103 else
1104 {
1105 /* Assume we have REG_EXPR. */
1106 add_fixup_expr (loc, x, desc_start);
1107 }
1108 free (desc);
1109 }
1110 else
1111 unread_char (ch);
1112 if (expect_original_regno)
1113 {
1114 require_char_ws ('[');
1115 char *desc = read_until ("]", true);
1116 ORIGINAL_REGNO (x)(__extension__ ({ __typeof ((x)) const _rtx = ((x)); if (((enum
rtx_code) (_rtx)->code) != REG) rtl_check_failed_flag ("ORIGINAL_REGNO"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1116, __FUNCTION__); _rtx; })->u2.original_regno)
= atoi (desc);
1117 free (desc);
1118 }
1119
1120 return x;
1121}
1122
1123/* Additional parsing for format code '0' in dumps, handling a variety
1124 of special-cases in print_rtx, when parsing operand IDX of X.
1125 Return X, or possibly a reallocated copy of X. */
1126
1127rtx
1128function_reader::extra_parsing_for_operand_code_0 (rtx x, int idx)
1129{
1130 RTX_CODEenum rtx_code code = GET_CODE (x)((enum rtx_code) (x)->code);
1131 int c;
1132 struct md_name name;
1133
1134 if (idx == 1 && code == SYMBOL_REF)
1135 {
1136 /* Possibly wrote " [flags %#x]", SYMBOL_REF_FLAGS (in_rtx). */
1137 c = read_skip_spaces ();
1138 if (c == '[')
1139 {
1140 file_location loc = read_name (&name);
1141 if (strcmp (name.string, "flags"))
1142 error_at (loc, "was expecting `%s'", "flags");
1143 read_name (&name);
1144 SYMBOL_REF_FLAGS (x)(__extension__ ({ __typeof ((x)) const _rtx = ((x)); if (((enum
rtx_code) (_rtx)->code) != SYMBOL_REF) rtl_check_failed_flag
("SYMBOL_REF_FLAGS", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1144, __FUNCTION__); _rtx; }) ->u2.symbol_ref_flags)
= strtol (name.string, NULLnullptr, 16);
1145
1146 /* The standard RTX_CODE_SIZE (SYMBOL_REF) used when allocating
1147 x doesn't have space for the block_symbol information, so
1148 we must reallocate it if this flag is set. */
1149 if (SYMBOL_REF_HAS_BLOCK_INFO_P (x)(((__extension__ ({ __typeof ((x)) const _rtx = ((x)); if (((
enum rtx_code) (_rtx)->code) != SYMBOL_REF) rtl_check_failed_flag
("SYMBOL_REF_FLAGS", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1149, __FUNCTION__); _rtx; }) ->u2.symbol_ref_flags) &
(1 << 7)) != 0)
)
1150 {
1151 /* Emulate the allocation normally done by
1152 varasm.cc:create_block_symbol. */
1153 unsigned int size = RTX_HDR_SIZE__builtin_offsetof(struct rtx_def, u) + sizeof (struct block_symbol);
1154 rtx new_x = (rtx) ggc_internal_alloc (size);
1155
1156 /* Copy data over from the smaller SYMBOL_REF. */
1157 memcpy (new_x, x, RTX_CODE_SIZE (SYMBOL_REF)rtx_code_size[SYMBOL_REF]);
1158 x = new_x;
1159
1160 /* We can't reconstruct SYMBOL_REF_BLOCK; set it to NULL. */
1161 SYMBOL_REF_BLOCK (x)((&(x)->u.block_sym)->block) = NULLnullptr;
1162
1163 /* Zero the offset. */
1164 SYMBOL_REF_BLOCK_OFFSET (x)((&(x)->u.block_sym)->offset) = 0;
1165 }
1166
1167 require_char (']');
1168 }
1169 else
1170 unread_char (c);
1171
1172 /* If X had a non-NULL SYMBOL_REF_DECL,
1173 rtx_writer::print_rtx_operand_code_0 would have dumped it
1174 using print_node_brief.
1175 Skip the content for now. */
1176 c = read_skip_spaces ();
1177 if (c == '<')
1178 {
1179 while (1)
1180 {
1181 char ch = read_char ();
1182 if (ch == '>')
1183 break;
1184 }
1185 }
1186 else
1187 unread_char (c);
1188 }
1189 else if (idx == 3 && code == NOTE)
1190 {
1191 /* Note-specific data appears for operand 3, which annoyingly
1192 is before the enum specifying which kind of note we have
1193 (operand 4). */
1194 c = read_skip_spaces ();
1195 if (c == '[')
1196 {
1197 /* Possibly data for a NOTE_INSN_BASIC_BLOCK, of the form:
1198 [bb %d]. */
1199 file_location bb_loc = read_name (&name);
1200 if (strcmp (name.string, "bb"))
1201 error_at (bb_loc, "was expecting `%s'", "bb");
1202 read_name (&name);
1203 int bb_idx = atoi (name.string);
1204 add_fixup_note_insn_basic_block (bb_loc, x, idx,
1205 bb_idx);
1206 require_char_ws (']');
1207 }
1208 else
1209 unread_char (c);
1210 }
1211
1212 return x;
1213}
1214
1215/* Implementation of rtx_reader::handle_any_trailing_information.
1216 Handle the various additional information that print-rtl.cc can
1217 write after the regular fields, when parsing X. */
1218
1219void
1220function_reader::handle_any_trailing_information (rtx x)
1221{
1222 struct md_name name;
1223
1224 switch (GET_CODE (x)((enum rtx_code) (x)->code))
1225 {
1226 case MEM:
1227 {
1228 int ch;
1229 require_char_ws ('[');
1230 read_name (&name);
1231 set_mem_alias_set (x, atoi (name.string));
1232 /* We have either a MEM_EXPR, or a space. */
1233 if (peek_char () != ' ')
1234 {
1235 file_location loc = get_current_location ();
1236 char *desc = read_until (" +", false);
1237 add_fixup_expr (loc, consolidate_singletons (x), desc);
1238 free (desc);
1239 }
1240 else
1241 read_char ();
1242
1243 /* We may optionally have '+' for MEM_OFFSET_KNOWN_P. */
1244 ch = read_skip_spaces ();
1245 if (ch == '+')
1246 {
1247 read_name (&name);
1248 set_mem_offset (x, atoi (name.string));
1249 }
1250 else
1251 unread_char (ch);
1252
1253 /* Handle optional " S" for MEM_SIZE. */
1254 ch = read_skip_spaces ();
1255 if (ch == 'S')
1256 {
1257 read_name (&name);
1258 set_mem_size (x, atoi (name.string));
1259 }
1260 else
1261 unread_char (ch);
1262
1263 /* Handle optional " A" for MEM_ALIGN. */
1264 ch = read_skip_spaces ();
1265 if (ch == 'A' && peek_char () != 'S')
1266 {
1267 read_name (&name);
1268 set_mem_align (x, atoi (name.string));
1269 }
1270 else
1271 unread_char (ch);
1272
1273 /* Handle optional " AS" for MEM_ADDR_SPACE. */
1274 ch = read_skip_spaces ();
1275 if (ch == 'A' && peek_char () == 'S')
1276 {
1277 read_char ();
1278 read_name (&name);
1279 set_mem_addr_space (x, atoi (name.string));
1280 }
1281 else
1282 unread_char (ch);
1283
1284 require_char (']');
1285 }
1286 break;
1287
1288 case CODE_LABEL:
1289 /* Assume that LABEL_NUSES was not dumped. */
1290 /* TODO: parse LABEL_KIND. */
1291 /* For now, skip until closing ')'. */
1292 do
1293 {
1294 char ch = read_char ();
1295 if (ch == ')')
1296 {
1297 unread_char (ch);
1298 break;
1299 }
1300 }
1301 while (1);
1302 break;
1303
1304 default:
1305 break;
1306 }
1307}
1308
1309/* Parse a tree dump for a MEM_EXPR in DESC and turn it back into a tree.
1310 We handle "<retval>" and param names within cfun, but for anything else
1311 we "cheat" by building a global VAR_DECL of type "int" with that name
1312 (returning the same global for a name if we see the same name more
1313 than once). */
1314
1315tree
1316function_reader::parse_mem_expr (const char *desc)
1317{
1318 tree fndecl = cfun(cfun + 0)->decl;
1319
1320 if (strcmp (desc, "<retval>") == 0)
1321 return DECL_RESULT (fndecl)((tree_check ((fndecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1321, __FUNCTION__, (FUNCTION_DECL)))->decl_non_common.result
)
;
1322
1323 tree param = find_param_by_name (fndecl, desc);
1324 if (param)
1325 return param;
1326
1327 /* Search within decls we already created.
1328 FIXME: use a hash rather than linear search. */
1329 int i;
1330 tree t;
1331 FOR_EACH_VEC_ELT (m_fake_scope, i, t)for (i = 0; (m_fake_scope).iterate ((i), &(t)); ++(i))
1332 if (id_equal (DECL_NAME (t)((contains_struct_check ((t), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1332, __FUNCTION__))->decl_minimal.name)
, desc))
1333 return t;
1334
1335 /* Not found? Create it.
1336 This allows mimicking of real data but avoids having to specify
1337 e.g. names of locals, params etc.
1338 Though this way we don't know if we have a PARM_DECL vs a VAR_DECL,
1339 and we don't know the types. Fake it by making everything be
1340 a VAR_DECL of "int" type. */
1341 t = build_decl (UNKNOWN_LOCATION((location_t) 0), VAR_DECL,
1342 get_identifier (desc)(__builtin_constant_p (desc) ? get_identifier_with_length ((desc
), strlen (desc)) : get_identifier (desc))
,
1343 integer_type_nodeinteger_types[itk_int]);
1344 m_fake_scope.safe_push (t);
1345 return t;
1346}
1347
1348/* Record that at LOC we saw an insn uid INSN_UID for the operand with index
1349 OPERAND_IDX within INSN, so that the pointer value can be fixed up in
1350 later post-processing. */
1351
1352void
1353function_reader::add_fixup_insn_uid (file_location loc, rtx insn, int operand_idx,
1354 int insn_uid)
1355{
1356 m_fixups.safe_push (new fixup_insn_uid (loc, insn, operand_idx, insn_uid));
1357}
1358
1359/* Record that at LOC we saw an basic block index BB_IDX for the operand with index
1360 OPERAND_IDX within INSN, so that the pointer value can be fixed up in
1361 later post-processing. */
1362
1363void
1364function_reader::add_fixup_note_insn_basic_block (file_location loc, rtx insn,
1365 int operand_idx, int bb_idx)
1366{
1367 m_fixups.safe_push (new fixup_note_insn_basic_block (loc, insn, operand_idx,
1368 bb_idx));
1369}
1370
1371/* Placeholder hook for recording source location information seen in a dump.
1372 This is empty for now. */
1373
1374void
1375function_reader::add_fixup_source_location (file_location, rtx_insn *,
1376 const char *, int, int)
1377{
1378}
1379
1380/* Record that at LOC we saw textual description DESC of the MEM_EXPR or REG_EXPR
1381 of INSN, so that the fields can be fixed up in later post-processing. */
1382
1383void
1384function_reader::add_fixup_expr (file_location loc, rtx insn,
1385 const char *desc)
1386{
1387 gcc_assert (desc)((void)(!(desc) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1387, __FUNCTION__), 0 : 0))
;
1388 /* Fail early if the RTL reader erroneously hands us an int. */
1389 gcc_assert (!ISDIGIT (desc[0]))((void)(!(!(_sch_istable[(desc[0]) & 0xff] & (unsigned
short)(_sch_isdigit))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1389, __FUNCTION__), 0 : 0))
;
1390
1391 m_fixups.safe_push (new fixup_expr (loc, insn, desc));
1392}
1393
1394/* Helper function for consolidate_reg. Return the global rtx for
1395 the register with regno REGNO. */
1396
1397static rtx
1398lookup_global_register (int regno)
1399{
1400 /* We can't use a switch here, as some of the REGNUMs might not be constants
1401 for some targets. */
1402 if (regno == STACK_POINTER_REGNUM7)
1403 return stack_pointer_rtx((this_target_rtl->x_global_rtl)[GR_STACK_POINTER]);
1404 else if (regno == FRAME_POINTER_REGNUM19)
1405 return frame_pointer_rtx((this_target_rtl->x_global_rtl)[GR_FRAME_POINTER]);
1406 else if (regno == HARD_FRAME_POINTER_REGNUM6)
1407 return hard_frame_pointer_rtx((this_target_rtl->x_global_rtl)[GR_HARD_FRAME_POINTER]);
1408 else if (regno == ARG_POINTER_REGNUM16)
1409 return arg_pointer_rtx((this_target_rtl->x_global_rtl)[GR_ARG_POINTER]);
1410 else if (regno == VIRTUAL_INCOMING_ARGS_REGNUM((76)))
1411 return virtual_incoming_args_rtx((this_target_rtl->x_global_rtl)[GR_VIRTUAL_INCOMING_ARGS]
)
;
1412 else if (regno == VIRTUAL_STACK_VARS_REGNUM(((76)) + 1))
1413 return virtual_stack_vars_rtx((this_target_rtl->x_global_rtl)[GR_VIRTUAL_STACK_ARGS]);
1414 else if (regno == VIRTUAL_STACK_DYNAMIC_REGNUM(((76)) + 2))
1415 return virtual_stack_dynamic_rtx((this_target_rtl->x_global_rtl)[GR_VIRTUAL_STACK_DYNAMIC]
)
;
1416 else if (regno == VIRTUAL_OUTGOING_ARGS_REGNUM(((76)) + 3))
1417 return virtual_outgoing_args_rtx((this_target_rtl->x_global_rtl)[GR_VIRTUAL_OUTGOING_ARGS]
)
;
1418 else if (regno == VIRTUAL_CFA_REGNUM(((76)) + 4))
1419 return virtual_cfa_rtx((this_target_rtl->x_global_rtl)[GR_VIRTUAL_CFA]);
1420 else if (regno == VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM(((76)) + 5))
1421 return virtual_preferred_stack_boundary_rtx((this_target_rtl->x_global_rtl)[GR_VIRTUAL_PREFERRED_STACK_BOUNDARY
])
;
1422#ifdef return_ADDRESS_POINTER_REGNUM
1423 else if (regno == RETURN_ADDRESS_POINTER_REGNUM)
1424 return return_address_pointer_rtx(this_target_rtl->x_return_address_pointer_rtx);
1425#endif
1426
1427 return NULLnullptr;
1428}
1429
1430/* Ensure that the backend can cope with a REG with regno REGNO.
1431 Normally REG instances are created by gen_reg_rtx which updates
1432 regno_reg_rtx, growing it as necessary.
1433 The REG instances created from the dumpfile weren't created this
1434 way, so we need to manually update regno_reg_rtx. */
1435
1436static void
1437ensure_regno (int regno)
1438{
1439 if (reg_rtx_no((&x_rtl)->emit.x_reg_rtx_no) < regno + 1)
1440 reg_rtx_no((&x_rtl)->emit.x_reg_rtx_no) = regno + 1;
1441
1442 crtl(&x_rtl)->emit.ensure_regno_capacity ();
1443 gcc_assert (regno < crtl->emit.regno_pointer_align_length)((void)(!(regno < (&x_rtl)->emit.regno_pointer_align_length
) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1443, __FUNCTION__), 0 : 0))
;
1444}
1445
1446/* Helper function for consolidate_singletons, for handling REG instances.
1447 Given REG instance X of some regno, return the singleton rtx for that
1448 regno, if it exists, or X. */
1449
1450static rtx
1451consolidate_reg (rtx x)
1452{
1453 gcc_assert (GET_CODE (x) == REG)((void)(!(((enum rtx_code) (x)->code) == REG) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1453, __FUNCTION__), 0 : 0))
;
1454
1455 unsigned int regno = REGNO (x)(rhs_regno(x));
1456
1457 ensure_regno (regno);
1458
1459 /* Some register numbers have their rtx created in init_emit_regs
1460 e.g. stack_pointer_rtx for STACK_POINTER_REGNUM.
1461 Consolidate on this. */
1462 rtx global_reg = lookup_global_register (regno);
1463 if (global_reg)
1464 return global_reg;
1465
1466 /* Populate regno_reg_rtx if necessary. */
1467 if (regno_reg_rtx[regno] == NULLnullptr)
1468 regno_reg_rtx[regno] = x;
1469 /* Use it. */
1470 gcc_assert (GET_CODE (regno_reg_rtx[regno]) == REG)((void)(!(((enum rtx_code) (regno_reg_rtx[regno])->code) ==
REG) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1470, __FUNCTION__), 0 : 0))
;
1471 gcc_assert (REGNO (regno_reg_rtx[regno]) == regno)((void)(!((rhs_regno(regno_reg_rtx[regno])) == regno) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1471, __FUNCTION__), 0 : 0))
;
1472 if (GET_MODE (x)((machine_mode) (x)->mode) == GET_MODE (regno_reg_rtx[regno])((machine_mode) (regno_reg_rtx[regno])->mode))
1473 return regno_reg_rtx[regno];
1474
1475 return x;
1476}
1477
1478/* When reading RTL function dumps, we must consolidate some
1479 rtx so that we use singletons where singletons are expected
1480 (e.g. we don't want multiple "(const_int 0 [0])" rtx, since
1481 these are tested via pointer equality against const0_rtx.
1482
1483 Return the equivalent singleton rtx for X, if any, otherwise X. */
1484
1485rtx
1486function_reader::consolidate_singletons (rtx x)
1487{
1488 if (!x)
1489 return x;
1490
1491 switch (GET_CODE (x)((enum rtx_code) (x)->code))
1492 {
1493 case PC: return pc_rtx;
1494 case RETURN: return ret_rtx;
1495 case SIMPLE_RETURN: return simple_return_rtx;
1496
1497 case REG:
1498 return consolidate_reg (x);
1499
1500 case CONST_INT:
1501 return gen_rtx_CONST_INT (GET_MODE (x)((machine_mode) (x)->mode), INTVAL (x)((x)->u.hwint[0]));
1502
1503 case CONST_VECTOR:
1504 return gen_rtx_CONST_VECTOR (GET_MODE (x)((machine_mode) (x)->mode), XVEC (x, 0)(((x)->u.fld[0]).rt_rtvec));
1505
1506 default:
1507 break;
1508 }
1509
1510 return x;
1511}
1512
1513/* Parse an rtx directive, including both the opening/closing parentheses,
1514 and the name. */
1515
1516rtx
1517function_reader::parse_rtx ()
1518{
1519 require_char_ws ('(');
1520 struct md_name directive;
1521 read_name (&directive);
1522 rtx result
1523 = consolidate_singletons (read_rtx_code (directive.string));
1524 require_char_ws (')');
1525
1526 return result;
1527}
1528
1529/* Implementation of rtx_reader::postprocess for reading function dumps.
1530 Return the equivalent singleton rtx for X, if any, otherwise X. */
1531
1532rtx
1533function_reader::postprocess (rtx x)
1534{
1535 return consolidate_singletons (x);
1536}
1537
1538/* Implementation of rtx_reader::finalize_string for reading function dumps.
1539 Make a GC-managed copy of STRINGBUF. */
1540
1541const char *
1542function_reader::finalize_string (char *stringbuf)
1543{
1544 return ggc_strdup (stringbuf)ggc_alloc_string ((stringbuf), -1 );
1545}
1546
1547/* Attempt to parse optional location information for insn INSN, as
1548 potentially written out by rtx_writer::print_rtx_operand_code_i.
1549 We look for a quoted string followed by a colon. */
1550
1551void
1552function_reader::maybe_read_location (rtx_insn *insn)
1553{
1554 file_location loc = get_current_location ();
1555
1556 /* Attempt to parse a quoted string. */
1557 int ch = read_skip_spaces ();
1558 if (ch == '"')
1559 {
1560 char *filename = read_quoted_string ();
1561 require_char (':');
1562 struct md_name line_num;
1563 read_name (&line_num);
1564
1565 int column = 0;
1566 int ch = read_char ();
1567 if (ch == ':')
1568 {
1569 struct md_name column_num;
1570 read_name (&column_num);
1571 column = atoi (column_num.string);
1572 }
1573 else
1574 unread_char (ch);
1575 add_fixup_source_location (loc, insn, filename,
1576 atoi (line_num.string),
1577 column);
1578 }
1579 else
1580 unread_char (ch);
1581}
1582
1583/* Postprocessing subroutine of function_reader::parse_function.
1584 Populate m_insns_by_uid. */
1585
1586void
1587function_reader::handle_insn_uids ()
1588{
1589 /* Locate the currently assigned INSN_UID values, storing
1590 them in m_insns_by_uid. */
1591 int max_uid = 0;
1592 for (rtx_insn *insn = get_insns (); insn; insn = NEXT_INSN (insn))
1593 {
1594 if (m_insns_by_uid.get (INSN_UID (insn)))
1595 error ("duplicate insn UID: %i", INSN_UID (insn));
1596 m_insns_by_uid.put (INSN_UID (insn), insn);
1597 if (INSN_UID (insn) > max_uid)
1598 max_uid = INSN_UID (insn);
1599 }
1600
1601 /* Ensure x_cur_insn_uid is 1 more than the biggest insn UID seen.
1602 This is normally updated by the various make_*insn_raw functions. */
1603 crtl(&x_rtl)->emit.x_cur_insn_uid = max_uid + 1;
1604}
1605
1606/* Apply all of the recorded fixups. */
1607
1608void
1609function_reader::apply_fixups ()
1610{
1611 int i;
1612 fixup *f;
1613 FOR_EACH_VEC_ELT (m_fixups, i, f)for (i = 0; (m_fixups).iterate ((i), &(f)); ++(i))
1614 f->apply (this);
1615}
1616
1617/* Given a UID value, try to locate a pointer to the corresponding
1618 rtx_insn *, or NULL if it can't be found. */
1619
1620rtx_insn **
1621function_reader::get_insn_by_uid (int uid)
1622{
1623 return m_insns_by_uid.get (uid);
1624}
1625
1626/* Run the RTL dump parser, parsing a dump located at PATH.
1627 Return true iff the file was successfully parsed. */
1628
1629bool
1630read_rtl_function_body (const char *path)
1631{
1632 initialize_rtl ();
1633 crtl(&x_rtl)->abi = &default_function_abi(this_target_function_abi_info->x_function_abis[0]);
1634 init_emit ();
1635 init_varasm_status ();
1636
1637 function_reader reader;
1638 if (!reader.read_file (path))
1639 return false;
1640
1641 return true;
1642}
1643
1644/* Run the RTL dump parser on the range of lines between START_LOC and
1645 END_LOC (including those lines). */
1646
1647bool
1648read_rtl_function_body_from_file_range (location_t start_loc,
1649 location_t end_loc)
1650{
1651 expanded_location exploc_start = expand_location (start_loc);
1652 expanded_location exploc_end = expand_location (end_loc);
1653
1654 if (exploc_start.file != exploc_end.file)
1655 {
1656 error_at (end_loc, "start/end of RTL fragment are in different files");
1657 return false;
1658 }
1659 if (exploc_start.line >= exploc_end.line)
1660 {
1661 error_at (end_loc,
1662 "start of RTL fragment must be on an earlier line than end");
1663 return false;
1664 }
1665
1666 initialize_rtl ();
1667 crtl(&x_rtl)->abi = &fndecl_abi (cfun(cfun + 0)->decl).base_abi ();
1668 init_emit ();
1669 init_varasm_status ();
1670
1671 function_reader reader;
1672 if (!reader.read_file_fragment (exploc_start.file, exploc_start.line,
1673 exploc_end.line - 1))
1674 return false;
1675
1676 return true;
1677}
1678
1679#if CHECKING_P1
1680
1681namespace selftest {
1682
1683/* Verify that parse_edge_flags works. */
1684
1685static void
1686test_edge_flags ()
1687{
1688 /* parse_edge_flags modifies its input (due to strtok), so we must make
1689 a copy of the literals. */
1690#define ASSERT_PARSE_EDGE_FLAGS(EXPECTED, STR) \
1691 do { \
1692 char *str = xstrdup (STR); \
1693 ASSERT_EQ (EXPECTED, parse_edge_flags (str))do { const char *desc_ = "ASSERT_EQ (" "(EXPECTED)" ", " "(parse_edge_flags (str))"
")"; if (((EXPECTED)) == ((parse_edge_flags (str)))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1693, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1693, __FUNCTION__)))), desc_); } while (0)
; \
1694 free (str); \
1695 } while (0)
1696
1697 ASSERT_PARSE_EDGE_FLAGS (0, "");
1698 ASSERT_PARSE_EDGE_FLAGS (EDGE_FALLTHRU, "FALLTHRU");
1699 ASSERT_PARSE_EDGE_FLAGS (EDGE_ABNORMAL_CALL, "ABNORMAL_CALL");
1700 ASSERT_PARSE_EDGE_FLAGS (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL,
1701 "ABNORMAL | ABNORMAL_CALL");
1702
1703#undef ASSERT_PARSE_EDGE_FLAGS
1704}
1705
1706/* Verify that lookup_reg_by_dump_name works. */
1707
1708static void
1709test_parsing_regnos ()
1710{
1711 ASSERT_EQ (-1, lookup_reg_by_dump_name ("this is not a register"))do { const char *desc_ = "ASSERT_EQ (" "(-1)" ", " "(lookup_reg_by_dump_name (\"this is not a register\"))"
")"; if (((-1)) == ((lookup_reg_by_dump_name ("this is not a register"
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1711, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1711, __FUNCTION__)))), desc_); } while (0)
;
1712
1713 /* Verify lookup of virtual registers. */
1714 ASSERT_EQ (VIRTUAL_INCOMING_ARGS_REGNUM,do { const char *desc_ = "ASSERT_EQ (" "(((76)))" ", " "(lookup_reg_by_dump_name (\"virtual-incoming-args\"))"
")"; if (((((76)))) == ((lookup_reg_by_dump_name ("virtual-incoming-args"
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1715, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1715, __FUNCTION__)))), desc_); } while (0)
1715 lookup_reg_by_dump_name ("virtual-incoming-args"))do { const char *desc_ = "ASSERT_EQ (" "(((76)))" ", " "(lookup_reg_by_dump_name (\"virtual-incoming-args\"))"
")"; if (((((76)))) == ((lookup_reg_by_dump_name ("virtual-incoming-args"
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1715, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1715, __FUNCTION__)))), desc_); } while (0)
;
1716 ASSERT_EQ (VIRTUAL_STACK_VARS_REGNUM,do { const char *desc_ = "ASSERT_EQ (" "((((76)) + 1))" ", " "(lookup_reg_by_dump_name (\"virtual-stack-vars\"))"
")"; if ((((((76)) + 1))) == ((lookup_reg_by_dump_name ("virtual-stack-vars"
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1717, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1717, __FUNCTION__)))), desc_); } while (0)
1717 lookup_reg_by_dump_name ("virtual-stack-vars"))do { const char *desc_ = "ASSERT_EQ (" "((((76)) + 1))" ", " "(lookup_reg_by_dump_name (\"virtual-stack-vars\"))"
")"; if ((((((76)) + 1))) == ((lookup_reg_by_dump_name ("virtual-stack-vars"
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1717, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1717, __FUNCTION__)))), desc_); } while (0)
;
1718 ASSERT_EQ (VIRTUAL_STACK_DYNAMIC_REGNUM,do { const char *desc_ = "ASSERT_EQ (" "((((76)) + 2))" ", " "(lookup_reg_by_dump_name (\"virtual-stack-dynamic\"))"
")"; if ((((((76)) + 2))) == ((lookup_reg_by_dump_name ("virtual-stack-dynamic"
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1719, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1719, __FUNCTION__)))), desc_); } while (0)
1719 lookup_reg_by_dump_name ("virtual-stack-dynamic"))do { const char *desc_ = "ASSERT_EQ (" "((((76)) + 2))" ", " "(lookup_reg_by_dump_name (\"virtual-stack-dynamic\"))"
")"; if ((((((76)) + 2))) == ((lookup_reg_by_dump_name ("virtual-stack-dynamic"
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1719, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1719, __FUNCTION__)))), desc_); } while (0)
;
1720 ASSERT_EQ (VIRTUAL_OUTGOING_ARGS_REGNUM,do { const char *desc_ = "ASSERT_EQ (" "((((76)) + 3))" ", " "(lookup_reg_by_dump_name (\"virtual-outgoing-args\"))"
")"; if ((((((76)) + 3))) == ((lookup_reg_by_dump_name ("virtual-outgoing-args"
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1721, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1721, __FUNCTION__)))), desc_); } while (0)
1721 lookup_reg_by_dump_name ("virtual-outgoing-args"))do { const char *desc_ = "ASSERT_EQ (" "((((76)) + 3))" ", " "(lookup_reg_by_dump_name (\"virtual-outgoing-args\"))"
")"; if ((((((76)) + 3))) == ((lookup_reg_by_dump_name ("virtual-outgoing-args"
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1721, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1721, __FUNCTION__)))), desc_); } while (0)
;
1722 ASSERT_EQ (VIRTUAL_CFA_REGNUM,do { const char *desc_ = "ASSERT_EQ (" "((((76)) + 4))" ", " "(lookup_reg_by_dump_name (\"virtual-cfa\"))"
")"; if ((((((76)) + 4))) == ((lookup_reg_by_dump_name ("virtual-cfa"
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1723, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1723, __FUNCTION__)))), desc_); } while (0)
1723 lookup_reg_by_dump_name ("virtual-cfa"))do { const char *desc_ = "ASSERT_EQ (" "((((76)) + 4))" ", " "(lookup_reg_by_dump_name (\"virtual-cfa\"))"
")"; if ((((((76)) + 4))) == ((lookup_reg_by_dump_name ("virtual-cfa"
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1723, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1723, __FUNCTION__)))), desc_); } while (0)
;
1724 ASSERT_EQ (VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM,do { const char *desc_ = "ASSERT_EQ (" "((((76)) + 5))" ", " "(lookup_reg_by_dump_name (\"virtual-preferred-stack-boundary\"))"
")"; if ((((((76)) + 5))) == ((lookup_reg_by_dump_name ("virtual-preferred-stack-boundary"
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1725, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1725, __FUNCTION__)))), desc_); } while (0)
1725 lookup_reg_by_dump_name ("virtual-preferred-stack-boundary"))do { const char *desc_ = "ASSERT_EQ (" "((((76)) + 5))" ", " "(lookup_reg_by_dump_name (\"virtual-preferred-stack-boundary\"))"
")"; if ((((((76)) + 5))) == ((lookup_reg_by_dump_name ("virtual-preferred-stack-boundary"
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1725, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1725, __FUNCTION__)))), desc_); } while (0)
;
1726
1727 /* Verify lookup of non-virtual pseudos. */
1728 ASSERT_EQ (LAST_VIRTUAL_REGISTER + 1, lookup_reg_by_dump_name ("<0>"))do { const char *desc_ = "ASSERT_EQ (" "((((76)) + 5) + 1)" ", "
"(lookup_reg_by_dump_name (\"<0>\"))" ")"; if ((((((76
)) + 5) + 1)) == ((lookup_reg_by_dump_name ("<0>")))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1728, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1728, __FUNCTION__)))), desc_); } while (0)
;
1729 ASSERT_EQ (LAST_VIRTUAL_REGISTER + 2, lookup_reg_by_dump_name ("<1>"))do { const char *desc_ = "ASSERT_EQ (" "((((76)) + 5) + 2)" ", "
"(lookup_reg_by_dump_name (\"<1>\"))" ")"; if ((((((76
)) + 5) + 2)) == ((lookup_reg_by_dump_name ("<1>")))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1729, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1729, __FUNCTION__)))), desc_); } while (0)
;
1730}
1731
1732/* Verify that edge E is as expected, with the src and dest basic blocks
1733 having indices EXPECTED_SRC_IDX and EXPECTED_DEST_IDX respectively, and
1734 the edge having flags equal to EXPECTED_FLAGS.
1735 Use LOC as the effective location when reporting failures. */
1736
1737static void
1738assert_edge_at (const location &loc, edge e, int expected_src_idx,
1739 int expected_dest_idx, int expected_flags)
1740{
1741 ASSERT_EQ_AT (loc, expected_src_idx, e->src->index)do { const char *desc_ = "ASSERT_EQ (" "expected_src_idx" ", "
"e->src->index" ")"; if ((expected_src_idx) == (e->
src->index)) ::selftest::pass ((loc), desc_); else ::selftest
::fail ((loc), desc_); } while (0)
;
1742 ASSERT_EQ_AT (loc, expected_dest_idx, e->dest->index)do { const char *desc_ = "ASSERT_EQ (" "expected_dest_idx" ", "
"e->dest->index" ")"; if ((expected_dest_idx) == (e->
dest->index)) ::selftest::pass ((loc), desc_); else ::selftest
::fail ((loc), desc_); } while (0)
;
1743 ASSERT_EQ_AT (loc, expected_flags, e->flags)do { const char *desc_ = "ASSERT_EQ (" "expected_flags" ", " "e->flags"
")"; if ((expected_flags) == (e->flags)) ::selftest::pass
((loc), desc_); else ::selftest::fail ((loc), desc_); } while
(0)
;
1744}
1745
1746/* Verify that edge EDGE is as expected, with the src and dest basic blocks
1747 having indices EXPECTED_SRC_IDX and EXPECTED_DEST_IDX respectively, and
1748 the edge having flags equal to EXPECTED_FLAGS. */
1749
1750#define ASSERT_EDGE(EDGE, EXPECTED_SRC_IDX, EXPECTED_DEST_IDX, \assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1751, __FUNCTION__)), EDGE, EXPECTED_SRC_IDX, EXPECTED_DEST_IDX
, EXPECTED_FLAGS)
1751 EXPECTED_FLAGS)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1751, __FUNCTION__)), EDGE, EXPECTED_SRC_IDX, EXPECTED_DEST_IDX
, EXPECTED_FLAGS)
\
1752 assert_edge_at (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1752, __FUNCTION__))
, EDGE, EXPECTED_SRC_IDX, \
1753 EXPECTED_DEST_IDX, EXPECTED_FLAGS)
1754
1755/* Verify that we can load RTL dumps. */
1756
1757static void
1758test_loading_dump_fragment_1 ()
1759{
1760 // TODO: filter on target?
1761 rtl_dump_test t (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1761, __FUNCTION__))
, locate_file ("asr_div1.rtl"));
1762
1763 /* Verify that the insns were loaded correctly. */
1764 rtx_insn *insn_1 = get_insns ();
1765 ASSERT_TRUE (insn_1)do { const char *desc_ = "ASSERT_TRUE (" "(insn_1)" ")"; bool
actual_ = ((insn_1)); if (actual_) ::selftest::pass (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1765, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1765, __FUNCTION__))), desc_); } while (0)
;
1766 ASSERT_EQ (1, INSN_UID (insn_1))do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "(INSN_UID (insn_1))"
")"; if (((1)) == ((INSN_UID (insn_1)))) ::selftest::pass ((
((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1766, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1766, __FUNCTION__)))), desc_); } while (0)
;
1767 ASSERT_EQ (INSN, GET_CODE (insn_1))do { const char *desc_ = "ASSERT_EQ (" "(INSN)" ", " "(((enum rtx_code) (insn_1)->code))"
")"; if (((INSN)) == ((((enum rtx_code) (insn_1)->code)))
) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1767, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1767, __FUNCTION__)))), desc_); } while (0)
;
1768 ASSERT_EQ (SET, GET_CODE (PATTERN (insn_1)))do { const char *desc_ = "ASSERT_EQ (" "(SET)" ", " "(((enum rtx_code) (PATTERN (insn_1))->code))"
")"; if (((SET)) == ((((enum rtx_code) (PATTERN (insn_1))->
code)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1768, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1768, __FUNCTION__)))), desc_); } while (0)
;
1769 ASSERT_EQ (NULL, PREV_INSN (insn_1))do { const char *desc_ = "ASSERT_EQ (" "(nullptr)" ", " "(PREV_INSN (insn_1))"
")"; if (((nullptr)) == ((PREV_INSN (insn_1)))) ::selftest::
pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1769, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1769, __FUNCTION__)))), desc_); } while (0)
;
1770
1771 rtx_insn *insn_2 = NEXT_INSN (insn_1);
1772 ASSERT_TRUE (insn_2)do { const char *desc_ = "ASSERT_TRUE (" "(insn_2)" ")"; bool
actual_ = ((insn_2)); if (actual_) ::selftest::pass (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1772, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1772, __FUNCTION__))), desc_); } while (0)
;
1773 ASSERT_EQ (2, INSN_UID (insn_2))do { const char *desc_ = "ASSERT_EQ (" "(2)" ", " "(INSN_UID (insn_2))"
")"; if (((2)) == ((INSN_UID (insn_2)))) ::selftest::pass ((
((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1773, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1773, __FUNCTION__)))), desc_); } while (0)
;
1774 ASSERT_EQ (INSN, GET_CODE (insn_2))do { const char *desc_ = "ASSERT_EQ (" "(INSN)" ", " "(((enum rtx_code) (insn_2)->code))"
")"; if (((INSN)) == ((((enum rtx_code) (insn_2)->code)))
) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1774, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1774, __FUNCTION__)))), desc_); } while (0)
;
1775 ASSERT_EQ (insn_1, PREV_INSN (insn_2))do { const char *desc_ = "ASSERT_EQ (" "(insn_1)" ", " "(PREV_INSN (insn_2))"
")"; if (((insn_1)) == ((PREV_INSN (insn_2)))) ::selftest::pass
((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1775, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1775, __FUNCTION__)))), desc_); } while (0)
;
1776 ASSERT_EQ (NULL, NEXT_INSN (insn_2))do { const char *desc_ = "ASSERT_EQ (" "(nullptr)" ", " "(NEXT_INSN (insn_2))"
")"; if (((nullptr)) == ((NEXT_INSN (insn_2)))) ::selftest::
pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1776, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1776, __FUNCTION__)))), desc_); } while (0)
;
1777
1778 /* Verify that registers were loaded correctly. */
1779 rtx insn_1_dest = SET_DEST (PATTERN (insn_1))(((PATTERN (insn_1))->u.fld[0]).rt_rtx);
1780 ASSERT_EQ (REG, GET_CODE (insn_1_dest))do { const char *desc_ = "ASSERT_EQ (" "(REG)" ", " "(((enum rtx_code) (insn_1_dest)->code))"
")"; if (((REG)) == ((((enum rtx_code) (insn_1_dest)->code
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1780, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1780, __FUNCTION__)))), desc_); } while (0)
;
1781 ASSERT_EQ ((LAST_VIRTUAL_REGISTER + 1) + 2, REGNO (insn_1_dest))do { const char *desc_ = "ASSERT_EQ (" "(((((76)) + 5) + 1) + 2)"
", " "((rhs_regno(insn_1_dest)))" ")"; if (((((((76)) + 5) +
1) + 2)) == (((rhs_regno(insn_1_dest))))) ::selftest::pass (
(((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1781, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1781, __FUNCTION__)))), desc_); } while (0)
;
1782 rtx insn_1_src = SET_SRC (PATTERN (insn_1))(((PATTERN (insn_1))->u.fld[1]).rt_rtx);
1783 ASSERT_EQ (LSHIFTRT, GET_CODE (insn_1_src))do { const char *desc_ = "ASSERT_EQ (" "(LSHIFTRT)" ", " "(((enum rtx_code) (insn_1_src)->code))"
")"; if (((LSHIFTRT)) == ((((enum rtx_code) (insn_1_src)->
code)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1783, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1783, __FUNCTION__)))), desc_); } while (0)
;
1784 rtx reg = XEXP (insn_1_src, 0)(((insn_1_src)->u.fld[0]).rt_rtx);
1785 ASSERT_EQ (REG, GET_CODE (reg))do { const char *desc_ = "ASSERT_EQ (" "(REG)" ", " "(((enum rtx_code) (reg)->code))"
")"; if (((REG)) == ((((enum rtx_code) (reg)->code)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1785, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1785, __FUNCTION__)))), desc_); } while (0)
;
1786 ASSERT_EQ (LAST_VIRTUAL_REGISTER + 1, REGNO (reg))do { const char *desc_ = "ASSERT_EQ (" "((((76)) + 5) + 1)" ", "
"((rhs_regno(reg)))" ")"; if ((((((76)) + 5) + 1)) == (((rhs_regno
(reg))))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1786, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1786, __FUNCTION__)))), desc_); } while (0)
;
1787
1788 /* Verify that get_insn_by_uid works. */
1789 ASSERT_EQ (insn_1, get_insn_by_uid (1))do { const char *desc_ = "ASSERT_EQ (" "(insn_1)" ", " "(get_insn_by_uid (1))"
")"; if (((insn_1)) == ((get_insn_by_uid (1)))) ::selftest::
pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1789, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1789, __FUNCTION__)))), desc_); } while (0)
;
1790 ASSERT_EQ (insn_2, get_insn_by_uid (2))do { const char *desc_ = "ASSERT_EQ (" "(insn_2)" ", " "(get_insn_by_uid (2))"
")"; if (((insn_2)) == ((get_insn_by_uid (2)))) ::selftest::
pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1790, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1790, __FUNCTION__)))), desc_); } while (0)
;
1791
1792 /* Verify that basic blocks were created. */
1793 ASSERT_EQ (2, BLOCK_FOR_INSN (insn_1)->index)do { const char *desc_ = "ASSERT_EQ (" "(2)" ", " "(BLOCK_FOR_INSN (insn_1)->index)"
")"; if (((2)) == ((BLOCK_FOR_INSN (insn_1)->index))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1793, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1793, __FUNCTION__)))), desc_); } while (0)
;
1794 ASSERT_EQ (2, BLOCK_FOR_INSN (insn_2)->index)do { const char *desc_ = "ASSERT_EQ (" "(2)" ", " "(BLOCK_FOR_INSN (insn_2)->index)"
")"; if (((2)) == ((BLOCK_FOR_INSN (insn_2)->index))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1794, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1794, __FUNCTION__)))), desc_); } while (0)
;
1795
1796 /* Verify that the CFG was recreated. */
1797 ASSERT_TRUE (cfun)do { const char *desc_ = "ASSERT_TRUE (" "((cfun + 0))" ")"; bool
actual_ = (((cfun + 0))); if (actual_) ::selftest::pass (((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1797, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1797, __FUNCTION__))), desc_); } while (0)
;
1798 verify_three_block_rtl_cfg (cfun(cfun + 0));
1799 basic_block bb2 = BASIC_BLOCK_FOR_FN (cfun, 2)((*(((cfun + 0))->cfg->x_basic_block_info))[(2)]);
1800 ASSERT_TRUE (bb2 != NULL)do { const char *desc_ = "ASSERT_TRUE (" "(bb2 != nullptr)" ")"
; bool actual_ = ((bb2 != nullptr)); if (actual_) ::selftest::
pass (((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1800, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1800, __FUNCTION__))), desc_); } while (0)
;
1801 ASSERT_EQ (BB_RTL, bb2->flags & BB_RTL)do { const char *desc_ = "ASSERT_EQ (" "(BB_RTL)" ", " "(bb2->flags & BB_RTL)"
")"; if (((BB_RTL)) == ((bb2->flags & BB_RTL))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1801, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1801, __FUNCTION__)))), desc_); } while (0)
;
1802 ASSERT_EQ (2, bb2->index)do { const char *desc_ = "ASSERT_EQ (" "(2)" ", " "(bb2->index)"
")"; if (((2)) == ((bb2->index))) ::selftest::pass ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1802, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1802, __FUNCTION__)))), desc_); } while (0)
;
1803 ASSERT_EQ (insn_1, BB_HEAD (bb2))do { const char *desc_ = "ASSERT_EQ (" "(insn_1)" ", " "((bb2)->il.x.head_)"
")"; if (((insn_1)) == (((bb2)->il.x.head_))) ::selftest::
pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1803, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1803, __FUNCTION__)))), desc_); } while (0)
;
1804 ASSERT_EQ (insn_2, BB_END (bb2))do { const char *desc_ = "ASSERT_EQ (" "(insn_2)" ", " "((bb2)->il.x.rtl->end_)"
")"; if (((insn_2)) == (((bb2)->il.x.rtl->end_))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1804, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1804, __FUNCTION__)))), desc_); } while (0)
;
1805}
1806
1807/* Verify loading another RTL dump. */
1808
1809static void
1810test_loading_dump_fragment_2 ()
1811{
1812 rtl_dump_test t (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1812, __FUNCTION__))
, locate_file ("simple-cse.rtl"));
1813
1814 rtx_insn *insn_1 = get_insn_by_uid (1);
1815 rtx_insn *insn_2 = get_insn_by_uid (2);
1816 rtx_insn *insn_3 = get_insn_by_uid (3);
1817
1818 rtx set1 = single_set (insn_1);
1819 ASSERT_NE (NULL, set1)do { const char *desc_ = "ASSERT_NE (" "NULL" ", " "set1" ")"
; if ((nullptr) != (set1)) ::selftest::pass ((::selftest::location
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1819, __FUNCTION__)), desc_); else ::selftest::fail ((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1819, __FUNCTION__)), desc_); } while (0)
;
1820 rtx set2 = single_set (insn_2);
1821 ASSERT_NE (NULL, set2)do { const char *desc_ = "ASSERT_NE (" "NULL" ", " "set2" ")"
; if ((nullptr) != (set2)) ::selftest::pass ((::selftest::location
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1821, __FUNCTION__)), desc_); else ::selftest::fail ((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1821, __FUNCTION__)), desc_); } while (0)
;
1822 rtx set3 = single_set (insn_3);
1823 ASSERT_NE (NULL, set3)do { const char *desc_ = "ASSERT_NE (" "NULL" ", " "set3" ")"
; if ((nullptr) != (set3)) ::selftest::pass ((::selftest::location
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1823, __FUNCTION__)), desc_); else ::selftest::fail ((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1823, __FUNCTION__)), desc_); } while (0)
;
1824
1825 rtx src1 = SET_SRC (set1)(((set1)->u.fld[1]).rt_rtx);
1826 ASSERT_EQ (PLUS, GET_CODE (src1))do { const char *desc_ = "ASSERT_EQ (" "(PLUS)" ", " "(((enum rtx_code) (src1)->code))"
")"; if (((PLUS)) == ((((enum rtx_code) (src1)->code)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1826, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1826, __FUNCTION__)))), desc_); } while (0)
;
1827
1828 rtx src2 = SET_SRC (set2)(((set2)->u.fld[1]).rt_rtx);
1829 ASSERT_EQ (PLUS, GET_CODE (src2))do { const char *desc_ = "ASSERT_EQ (" "(PLUS)" ", " "(((enum rtx_code) (src2)->code))"
")"; if (((PLUS)) == ((((enum rtx_code) (src2)->code)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1829, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1829, __FUNCTION__)))), desc_); } while (0)
;
1830
1831 /* Both src1 and src2 refer to "(reg:SI %0)".
1832 Verify that we have pointer equality. */
1833 rtx lhs1 = XEXP (src1, 0)(((src1)->u.fld[0]).rt_rtx);
1834 rtx lhs2 = XEXP (src2, 0)(((src2)->u.fld[0]).rt_rtx);
1835 ASSERT_EQ (lhs1, lhs2)do { const char *desc_ = "ASSERT_EQ (" "(lhs1)" ", " "(lhs2)"
")"; if (((lhs1)) == ((lhs2))) ::selftest::pass ((((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1835, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1835, __FUNCTION__)))), desc_); } while (0)
;
1836
1837 /* Verify that the CFG was recreated. */
1838 ASSERT_TRUE (cfun)do { const char *desc_ = "ASSERT_TRUE (" "((cfun + 0))" ")"; bool
actual_ = (((cfun + 0))); if (actual_) ::selftest::pass (((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1838, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1838, __FUNCTION__))), desc_); } while (0)
;
1839 verify_three_block_rtl_cfg (cfun(cfun + 0));
1840}
1841
1842/* Verify that CODE_LABEL insns are loaded correctly. */
1843
1844static void
1845test_loading_labels ()
1846{
1847 rtl_dump_test t (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1847, __FUNCTION__))
, locate_file ("example-labels.rtl"));
1848
1849 rtx_insn *insn_100 = get_insn_by_uid (100);
1850 ASSERT_EQ (CODE_LABEL, GET_CODE (insn_100))do { const char *desc_ = "ASSERT_EQ (" "(CODE_LABEL)" ", " "(((enum rtx_code) (insn_100)->code))"
")"; if (((CODE_LABEL)) == ((((enum rtx_code) (insn_100)->
code)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1850, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1850, __FUNCTION__)))), desc_); } while (0)
;
1851 ASSERT_EQ (100, INSN_UID (insn_100))do { const char *desc_ = "ASSERT_EQ (" "(100)" ", " "(INSN_UID (insn_100))"
")"; if (((100)) == ((INSN_UID (insn_100)))) ::selftest::pass
((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1851, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1851, __FUNCTION__)))), desc_); } while (0)
;
1852 ASSERT_EQ (NULL, LABEL_NAME (insn_100))do { const char *desc_ = "ASSERT_EQ (" "(nullptr)" ", " "((((insn_100)->u.fld[6]).rt_str))"
")"; if (((nullptr)) == (((((insn_100)->u.fld[6]).rt_str)
))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1852, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1852, __FUNCTION__)))), desc_); } while (0)
;
1853 ASSERT_EQ (0, LABEL_NUSES (insn_100))do { const char *desc_ = "ASSERT_EQ (" "(0)" ", " "((((insn_100)->u.fld[4]).rt_int))"
")"; if (((0)) == (((((insn_100)->u.fld[4]).rt_int)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1853, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1853, __FUNCTION__)))), desc_); } while (0)
;
1854 ASSERT_EQ (30, CODE_LABEL_NUMBER (insn_100))do { const char *desc_ = "ASSERT_EQ (" "(30)" ", " "((((insn_100)->u.fld[5]).rt_int))"
")"; if (((30)) == (((((insn_100)->u.fld[5]).rt_int)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1854, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1854, __FUNCTION__)))), desc_); } while (0)
;
1855
1856 rtx_insn *insn_200 = get_insn_by_uid (200);
1857 ASSERT_EQ (CODE_LABEL, GET_CODE (insn_200))do { const char *desc_ = "ASSERT_EQ (" "(CODE_LABEL)" ", " "(((enum rtx_code) (insn_200)->code))"
")"; if (((CODE_LABEL)) == ((((enum rtx_code) (insn_200)->
code)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1857, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1857, __FUNCTION__)))), desc_); } while (0)
;
1858 ASSERT_EQ (200, INSN_UID (insn_200))do { const char *desc_ = "ASSERT_EQ (" "(200)" ", " "(INSN_UID (insn_200))"
")"; if (((200)) == ((INSN_UID (insn_200)))) ::selftest::pass
((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1858, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1858, __FUNCTION__)))), desc_); } while (0)
;
1859 ASSERT_STREQ ("some_label_name", LABEL_NAME (insn_200))do { ::selftest::assert_streq ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1859, __FUNCTION__)), "\"some_label_name\"", "LABEL_NAME (insn_200)"
, ("some_label_name"), ((((insn_200)->u.fld[6]).rt_str)));
} while (0)
;
1860 ASSERT_EQ (0, LABEL_NUSES (insn_200))do { const char *desc_ = "ASSERT_EQ (" "(0)" ", " "((((insn_200)->u.fld[4]).rt_int))"
")"; if (((0)) == (((((insn_200)->u.fld[4]).rt_int)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1860, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1860, __FUNCTION__)))), desc_); } while (0)
;
1861 ASSERT_EQ (40, CODE_LABEL_NUMBER (insn_200))do { const char *desc_ = "ASSERT_EQ (" "(40)" ", " "((((insn_200)->u.fld[5]).rt_int))"
")"; if (((40)) == (((((insn_200)->u.fld[5]).rt_int)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1861, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1861, __FUNCTION__)))), desc_); } while (0)
;
1862
1863 /* Ensure that the presence of CODE_LABEL_NUMBER == 40
1864 means that the next label num to be handed out will be 41. */
1865 ASSERT_EQ (41, max_label_num ())do { const char *desc_ = "ASSERT_EQ (" "(41)" ", " "(max_label_num ())"
")"; if (((41)) == ((max_label_num ()))) ::selftest::pass ((
((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1865, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1865, __FUNCTION__)))), desc_); } while (0)
;
1866
1867 /* Ensure that label names read from a dump are GC-managed
1868 and are found through the insn. */
1869 ggc_collect (GGC_COLLECT_FORCE);
1870 ASSERT_TRUE (ggc_marked_p (insn_200))do { const char *desc_ = "ASSERT_TRUE (" "(ggc_marked_p (insn_200))"
")"; bool actual_ = ((ggc_marked_p (insn_200))); if (actual_
) ::selftest::pass (((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1870, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1870, __FUNCTION__))), desc_); } while (0)
;
1871 ASSERT_TRUE (ggc_marked_p (LABEL_NAME (insn_200)))do { const char *desc_ = "ASSERT_TRUE (" "(ggc_marked_p ((((insn_200)->u.fld[6]).rt_str)))"
")"; bool actual_ = ((ggc_marked_p ((((insn_200)->u.fld[6
]).rt_str)))); if (actual_) ::selftest::pass (((::selftest::location
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1871, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1871, __FUNCTION__))), desc_); } while (0)
;
1872}
1873
1874/* Verify that the loader copes with an insn with a mode. */
1875
1876static void
1877test_loading_insn_with_mode ()
1878{
1879 rtl_dump_test t (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1879, __FUNCTION__))
, locate_file ("insn-with-mode.rtl"));
1880 rtx_insn *insn = get_insns ();
1881 ASSERT_EQ (INSN, GET_CODE (insn))do { const char *desc_ = "ASSERT_EQ (" "(INSN)" ", " "(((enum rtx_code) (insn)->code))"
")"; if (((INSN)) == ((((enum rtx_code) (insn)->code)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1881, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1881, __FUNCTION__)))), desc_); } while (0)
;
1882
1883 /* Verify that the "TI" mode was set from "insn:TI". */
1884 ASSERT_EQ (TImode, GET_MODE (insn))do { const char *desc_ = "ASSERT_EQ (" "((scalar_int_mode ((scalar_int_mode::from_int) E_TImode)))"
", " "(((machine_mode) (insn)->mode))" ")"; if ((((scalar_int_mode
((scalar_int_mode::from_int) E_TImode)))) == ((((machine_mode
) (insn)->mode)))) ::selftest::pass ((((::selftest::location
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1884, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1884, __FUNCTION__)))), desc_); } while (0)
;
1885}
1886
1887/* Verify that the loader copes with a jump_insn to a label_ref. */
1888
1889static void
1890test_loading_jump_to_label_ref ()
1891{
1892 rtl_dump_test t (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1892, __FUNCTION__))
, locate_file ("jump-to-label-ref.rtl"));
1893
1894 rtx_insn *jump_insn = get_insn_by_uid (1);
1895 ASSERT_EQ (JUMP_INSN, GET_CODE (jump_insn))do { const char *desc_ = "ASSERT_EQ (" "(JUMP_INSN)" ", " "(((enum rtx_code) (jump_insn)->code))"
")"; if (((JUMP_INSN)) == ((((enum rtx_code) (jump_insn)->
code)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1895, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1895, __FUNCTION__)))), desc_); } while (0)
;
1896
1897 rtx_insn *barrier = get_insn_by_uid (2);
1898 ASSERT_EQ (BARRIER, GET_CODE (barrier))do { const char *desc_ = "ASSERT_EQ (" "(BARRIER)" ", " "(((enum rtx_code) (barrier)->code))"
")"; if (((BARRIER)) == ((((enum rtx_code) (barrier)->code
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1898, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1898, __FUNCTION__)))), desc_); } while (0)
;
1899
1900 rtx_insn *code_label = get_insn_by_uid (100);
1901 ASSERT_EQ (CODE_LABEL, GET_CODE (code_label))do { const char *desc_ = "ASSERT_EQ (" "(CODE_LABEL)" ", " "(((enum rtx_code) (code_label)->code))"
")"; if (((CODE_LABEL)) == ((((enum rtx_code) (code_label)->
code)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1901, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1901, __FUNCTION__)))), desc_); } while (0)
;
1902
1903 /* Verify the jump_insn. */
1904 ASSERT_EQ (4, BLOCK_FOR_INSN (jump_insn)->index)do { const char *desc_ = "ASSERT_EQ (" "(4)" ", " "(BLOCK_FOR_INSN (jump_insn)->index)"
")"; if (((4)) == ((BLOCK_FOR_INSN (jump_insn)->index))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1904, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1904, __FUNCTION__)))), desc_); } while (0)
;
1905 ASSERT_EQ (SET, GET_CODE (PATTERN (jump_insn)))do { const char *desc_ = "ASSERT_EQ (" "(SET)" ", " "(((enum rtx_code) (PATTERN (jump_insn))->code))"
")"; if (((SET)) == ((((enum rtx_code) (PATTERN (jump_insn))
->code)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1905, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1905, __FUNCTION__)))), desc_); } while (0)
;
1906 /* Ensure that the "(pc)" is using the global singleton. */
1907 ASSERT_RTX_PTR_EQ (pc_rtx, SET_DEST (PATTERN (jump_insn)))do { const char *desc_ = "ASSERT_RTX_PTR_EQ (" "pc_rtx" ", " "SET_DEST (PATTERN (jump_insn))"
")"; ::selftest::assert_rtx_ptr_eq_at ((::selftest::location
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1907, __FUNCTION__)), desc_, (pc_rtx), ((((PATTERN (jump_insn
))->u.fld[0]).rt_rtx))); } while (0)
;
1908 rtx label_ref = SET_SRC (PATTERN (jump_insn))(((PATTERN (jump_insn))->u.fld[1]).rt_rtx);
1909 ASSERT_EQ (LABEL_REF, GET_CODE (label_ref))do { const char *desc_ = "ASSERT_EQ (" "(LABEL_REF)" ", " "(((enum rtx_code) (label_ref)->code))"
")"; if (((LABEL_REF)) == ((((enum rtx_code) (label_ref)->
code)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1909, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1909, __FUNCTION__)))), desc_); } while (0)
;
1910 ASSERT_EQ (code_label, label_ref_label (label_ref))do { const char *desc_ = "ASSERT_EQ (" "(code_label)" ", " "(label_ref_label (label_ref))"
")"; if (((code_label)) == ((label_ref_label (label_ref)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1910, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1910, __FUNCTION__)))), desc_); } while (0)
;
1911 ASSERT_EQ (code_label, JUMP_LABEL (jump_insn))do { const char *desc_ = "ASSERT_EQ (" "(code_label)" ", " "((((jump_insn)->u.fld[7]).rt_rtx))"
")"; if (((code_label)) == (((((jump_insn)->u.fld[7]).rt_rtx
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1911, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1911, __FUNCTION__)))), desc_); } while (0)
;
1912
1913 /* Verify the code_label. */
1914 ASSERT_EQ (5, BLOCK_FOR_INSN (code_label)->index)do { const char *desc_ = "ASSERT_EQ (" "(5)" ", " "(BLOCK_FOR_INSN (code_label)->index)"
")"; if (((5)) == ((BLOCK_FOR_INSN (code_label)->index)))
::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1914, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1914, __FUNCTION__)))), desc_); } while (0)
;
1915 ASSERT_EQ (NULL, LABEL_NAME (code_label))do { const char *desc_ = "ASSERT_EQ (" "(nullptr)" ", " "((((code_label)->u.fld[6]).rt_str))"
")"; if (((nullptr)) == (((((code_label)->u.fld[6]).rt_str
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1915, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1915, __FUNCTION__)))), desc_); } while (0)
;
1916 ASSERT_EQ (1, LABEL_NUSES (code_label))do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "((((code_label)->u.fld[4]).rt_int))"
")"; if (((1)) == (((((code_label)->u.fld[4]).rt_int)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1916, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1916, __FUNCTION__)))), desc_); } while (0)
;
1917
1918 /* Verify the generated CFG. */
1919
1920 /* Locate blocks. */
1921 basic_block entry = ENTRY_BLOCK_PTR_FOR_FN (cfun)(((cfun + 0))->cfg->x_entry_block_ptr);
1922 ASSERT_TRUE (entry != NULL)do { const char *desc_ = "ASSERT_TRUE (" "(entry != nullptr)"
")"; bool actual_ = ((entry != nullptr)); if (actual_) ::selftest
::pass (((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1922, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1922, __FUNCTION__))), desc_); } while (0)
;
1923 ASSERT_EQ (ENTRY_BLOCK, entry->index)do { const char *desc_ = "ASSERT_EQ (" "((0))" ", " "(entry->index)"
")"; if ((((0))) == ((entry->index))) ::selftest::pass ((
((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1923, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1923, __FUNCTION__)))), desc_); } while (0)
;
1924
1925 basic_block exit = EXIT_BLOCK_PTR_FOR_FN (cfun)(((cfun + 0))->cfg->x_exit_block_ptr);
1926 ASSERT_TRUE (exit != NULL)do { const char *desc_ = "ASSERT_TRUE (" "(exit != nullptr)" ")"
; bool actual_ = ((exit != nullptr)); if (actual_) ::selftest
::pass (((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1926, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1926, __FUNCTION__))), desc_); } while (0)
;
1927 ASSERT_EQ (EXIT_BLOCK, exit->index)do { const char *desc_ = "ASSERT_EQ (" "((1))" ", " "(exit->index)"
")"; if ((((1))) == ((exit->index))) ::selftest::pass (((
(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1927, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1927, __FUNCTION__)))), desc_); } while (0)
;
1928
1929 basic_block bb4 = (*cfun(cfun + 0)->cfg->x_basic_block_info)[4];
1930 basic_block bb5 = (*cfun(cfun + 0)->cfg->x_basic_block_info)[5];
1931 ASSERT_EQ (4, bb4->index)do { const char *desc_ = "ASSERT_EQ (" "(4)" ", " "(bb4->index)"
")"; if (((4)) == ((bb4->index))) ::selftest::pass ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1931, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1931, __FUNCTION__)))), desc_); } while (0)
;
1932 ASSERT_EQ (5, bb5->index)do { const char *desc_ = "ASSERT_EQ (" "(5)" ", " "(bb5->index)"
")"; if (((5)) == ((bb5->index))) ::selftest::pass ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1932, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1932, __FUNCTION__)))), desc_); } while (0)
;
1933
1934 /* Entry block. */
1935 ASSERT_EQ (NULL, entry->preds)do { const char *desc_ = "ASSERT_EQ (" "(nullptr)" ", " "(entry->preds)"
")"; if (((nullptr)) == ((entry->preds))) ::selftest::pass
((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1935, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1935, __FUNCTION__)))), desc_); } while (0)
;
1936 ASSERT_EQ (1, entry->succs->length ())do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "(entry->succs->length ())"
")"; if (((1)) == ((entry->succs->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1936, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1936, __FUNCTION__)))), desc_); } while (0)
;
1937 ASSERT_EDGE ((*entry->succs)[0], 0, 4, EDGE_FALLTHRU)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1937, __FUNCTION__)), (*entry->succs)[0], 0, 4, EDGE_FALLTHRU
)
;
1938
1939 /* bb4. */
1940 ASSERT_EQ (1, bb4->preds->length ())do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "(bb4->preds->length ())"
")"; if (((1)) == ((bb4->preds->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1940, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1940, __FUNCTION__)))), desc_); } while (0)
;
1941 ASSERT_EDGE ((*bb4->preds)[0], 0, 4, EDGE_FALLTHRU)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1941, __FUNCTION__)), (*bb4->preds)[0], 0, 4, EDGE_FALLTHRU
)
;
1942 ASSERT_EQ (1, bb4->succs->length ())do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "(bb4->succs->length ())"
")"; if (((1)) == ((bb4->succs->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1942, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1942, __FUNCTION__)))), desc_); } while (0)
;
1943 ASSERT_EDGE ((*bb4->succs)[0], 4, 5, 0x0)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1943, __FUNCTION__)), (*bb4->succs)[0], 4, 5, 0x0)
;
1944
1945 /* bb5. */
1946 ASSERT_EQ (1, bb5->preds->length ())do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "(bb5->preds->length ())"
")"; if (((1)) == ((bb5->preds->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1946, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1946, __FUNCTION__)))), desc_); } while (0)
;
1947 ASSERT_EDGE ((*bb5->preds)[0], 4, 5, 0x0)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1947, __FUNCTION__)), (*bb5->preds)[0], 4, 5, 0x0)
;
1948 ASSERT_EQ (1, bb5->succs->length ())do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "(bb5->succs->length ())"
")"; if (((1)) == ((bb5->succs->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1948, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1948, __FUNCTION__)))), desc_); } while (0)
;
1949 ASSERT_EDGE ((*bb5->succs)[0], 5, 1, EDGE_FALLTHRU)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1949, __FUNCTION__)), (*bb5->succs)[0], 5, 1, EDGE_FALLTHRU
)
;
1950
1951 /* Exit block. */
1952 ASSERT_EQ (1, exit->preds->length ())do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "(exit->preds->length ())"
")"; if (((1)) == ((exit->preds->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1952, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1952, __FUNCTION__)))), desc_); } while (0)
;
1953 ASSERT_EDGE ((*exit->preds)[0], 5, 1, EDGE_FALLTHRU)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1953, __FUNCTION__)), (*exit->preds)[0], 5, 1, EDGE_FALLTHRU
)
;
1954 ASSERT_EQ (NULL, exit->succs)do { const char *desc_ = "ASSERT_EQ (" "(nullptr)" ", " "(exit->succs)"
")"; if (((nullptr)) == ((exit->succs))) ::selftest::pass
((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1954, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1954, __FUNCTION__)))), desc_); } while (0)
;
1955}
1956
1957/* Verify that the loader copes with a jump_insn to a label_ref
1958 marked "return". */
1959
1960static void
1961test_loading_jump_to_return ()
1962{
1963 rtl_dump_test t (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1963, __FUNCTION__))
, locate_file ("jump-to-return.rtl"));
1964
1965 rtx_insn *jump_insn = get_insn_by_uid (1);
1966 ASSERT_EQ (JUMP_INSN, GET_CODE (jump_insn))do { const char *desc_ = "ASSERT_EQ (" "(JUMP_INSN)" ", " "(((enum rtx_code) (jump_insn)->code))"
")"; if (((JUMP_INSN)) == ((((enum rtx_code) (jump_insn)->
code)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1966, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1966, __FUNCTION__)))), desc_); } while (0)
;
1967 ASSERT_RTX_PTR_EQ (ret_rtx, JUMP_LABEL (jump_insn))do { const char *desc_ = "ASSERT_RTX_PTR_EQ (" "ret_rtx" ", "
"JUMP_LABEL (jump_insn)" ")"; ::selftest::assert_rtx_ptr_eq_at
((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1967, __FUNCTION__)), desc_, (ret_rtx), ((((jump_insn)->
u.fld[7]).rt_rtx))); } while (0)
;
1968}
1969
1970/* Verify that the loader copes with a jump_insn to a label_ref
1971 marked "simple_return". */
1972
1973static void
1974test_loading_jump_to_simple_return ()
1975{
1976 rtl_dump_test t (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1976, __FUNCTION__))
,
1977 locate_file ("jump-to-simple-return.rtl"));
1978
1979 rtx_insn *jump_insn = get_insn_by_uid (1);
1980 ASSERT_EQ (JUMP_INSN, GET_CODE (jump_insn))do { const char *desc_ = "ASSERT_EQ (" "(JUMP_INSN)" ", " "(((enum rtx_code) (jump_insn)->code))"
")"; if (((JUMP_INSN)) == ((((enum rtx_code) (jump_insn)->
code)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1980, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1980, __FUNCTION__)))), desc_); } while (0)
;
1981 ASSERT_RTX_PTR_EQ (simple_return_rtx, JUMP_LABEL (jump_insn))do { const char *desc_ = "ASSERT_RTX_PTR_EQ (" "simple_return_rtx"
", " "JUMP_LABEL (jump_insn)" ")"; ::selftest::assert_rtx_ptr_eq_at
((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1981, __FUNCTION__)), desc_, (simple_return_rtx), ((((jump_insn
)->u.fld[7]).rt_rtx))); } while (0)
;
1982}
1983
1984/* Verify that the loader copes with a NOTE_INSN_BASIC_BLOCK. */
1985
1986static void
1987test_loading_note_insn_basic_block ()
1988{
1989 rtl_dump_test t (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1989, __FUNCTION__))
,
1990 locate_file ("note_insn_basic_block.rtl"));
1991
1992 rtx_insn *note = get_insn_by_uid (1);
1993 ASSERT_EQ (NOTE, GET_CODE (note))do { const char *desc_ = "ASSERT_EQ (" "(NOTE)" ", " "(((enum rtx_code) (note)->code))"
")"; if (((NOTE)) == ((((enum rtx_code) (note)->code)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1993, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1993, __FUNCTION__)))), desc_); } while (0)
;
1994 ASSERT_EQ (2, BLOCK_FOR_INSN (note)->index)do { const char *desc_ = "ASSERT_EQ (" "(2)" ", " "(BLOCK_FOR_INSN (note)->index)"
")"; if (((2)) == ((BLOCK_FOR_INSN (note)->index))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1994, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1994, __FUNCTION__)))), desc_); } while (0)
;
1995
1996 ASSERT_EQ (NOTE_INSN_BASIC_BLOCK, NOTE_KIND (note))do { const char *desc_ = "ASSERT_EQ (" "(NOTE_INSN_BASIC_BLOCK)"
", " "((((note)->u.fld[4]).rt_int))" ")"; if (((NOTE_INSN_BASIC_BLOCK
)) == (((((note)->u.fld[4]).rt_int)))) ::selftest::pass ((
((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1996, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1996, __FUNCTION__)))), desc_); } while (0)
;
1997 ASSERT_EQ (2, NOTE_BASIC_BLOCK (note)->index)do { const char *desc_ = "ASSERT_EQ (" "(2)" ", " "((((note)->u.fld[3]).rt_bb)->index)"
")"; if (((2)) == (((((note)->u.fld[3]).rt_bb)->index)
)) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1997, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1997, __FUNCTION__)))), desc_); } while (0)
;
1998 ASSERT_EQ (BASIC_BLOCK_FOR_FN (cfun, 2), NOTE_BASIC_BLOCK (note))do { const char *desc_ = "ASSERT_EQ (" "(((*(((cfun + 0))->cfg->x_basic_block_info))[(2)]))"
", " "((((note)->u.fld[3]).rt_bb))" ")"; if (((((*(((cfun
+ 0))->cfg->x_basic_block_info))[(2)]))) == (((((note)
->u.fld[3]).rt_bb)))) ::selftest::pass ((((::selftest::location
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1998, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 1998, __FUNCTION__)))), desc_); } while (0)
;
1999}
2000
2001/* Verify that the loader copes with a NOTE_INSN_DELETED. */
2002
2003static void
2004test_loading_note_insn_deleted ()
2005{
2006 rtl_dump_test t (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2006, __FUNCTION__))
, locate_file ("note-insn-deleted.rtl"));
2007
2008 rtx_insn *note = get_insn_by_uid (1);
2009 ASSERT_EQ (NOTE, GET_CODE (note))do { const char *desc_ = "ASSERT_EQ (" "(NOTE)" ", " "(((enum rtx_code) (note)->code))"
")"; if (((NOTE)) == ((((enum rtx_code) (note)->code)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2009, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2009, __FUNCTION__)))), desc_); } while (0)
;
2010 ASSERT_EQ (NOTE_INSN_DELETED, NOTE_KIND (note))do { const char *desc_ = "ASSERT_EQ (" "(NOTE_INSN_DELETED)" ", "
"((((note)->u.fld[4]).rt_int))" ")"; if (((NOTE_INSN_DELETED
)) == (((((note)->u.fld[4]).rt_int)))) ::selftest::pass ((
((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2010, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2010, __FUNCTION__)))), desc_); } while (0)
;
2011}
2012
2013/* Verify that the const_int values are consolidated, since
2014 pointer equality corresponds to value equality.
2015 TODO: do this for all in CASE_CONST_UNIQUE. */
2016
2017static void
2018test_loading_const_int ()
2019{
2020 rtl_dump_test t (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2020, __FUNCTION__))
, locate_file ("const-int.rtl"));
2021
2022 /* Verify that const_int values below MAX_SAVED_CONST_INT use
2023 the global values. */
2024 ASSERT_EQ (const0_rtx, SET_SRC (PATTERN (get_insn_by_uid (1))))do { const char *desc_ = "ASSERT_EQ (" "((const_int_rtx[64]))"
", " "((((PATTERN (get_insn_by_uid (1)))->u.fld[1]).rt_rtx))"
")"; if ((((const_int_rtx[64]))) == (((((PATTERN (get_insn_by_uid
(1)))->u.fld[1]).rt_rtx)))) ::selftest::pass ((((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2024, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2024, __FUNCTION__)))), desc_); } while (0)
;
2025 ASSERT_EQ (const1_rtx, SET_SRC (PATTERN (get_insn_by_uid (2))))do { const char *desc_ = "ASSERT_EQ (" "((const_int_rtx[64+1]))"
", " "((((PATTERN (get_insn_by_uid (2)))->u.fld[1]).rt_rtx))"
")"; if ((((const_int_rtx[64 +1]))) == (((((PATTERN (get_insn_by_uid
(2)))->u.fld[1]).rt_rtx)))) ::selftest::pass ((((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2025, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2025, __FUNCTION__)))), desc_); } while (0)
;
2026 ASSERT_EQ (constm1_rtx, SET_SRC (PATTERN (get_insn_by_uid (3))))do { const char *desc_ = "ASSERT_EQ (" "((const_int_rtx[64-1]))"
", " "((((PATTERN (get_insn_by_uid (3)))->u.fld[1]).rt_rtx))"
")"; if ((((const_int_rtx[64 -1]))) == (((((PATTERN (get_insn_by_uid
(3)))->u.fld[1]).rt_rtx)))) ::selftest::pass ((((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2026, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2026, __FUNCTION__)))), desc_); } while (0)
;
2027
2028 /* Verify that other const_int values are consolidated. */
2029 rtx int256 = gen_rtx_CONST_INT (SImode(scalar_int_mode ((scalar_int_mode::from_int) E_SImode)), 256);
2030 ASSERT_EQ (int256, SET_SRC (PATTERN (get_insn_by_uid (4))))do { const char *desc_ = "ASSERT_EQ (" "(int256)" ", " "((((PATTERN (get_insn_by_uid (4)))->u.fld[1]).rt_rtx))"
")"; if (((int256)) == (((((PATTERN (get_insn_by_uid (4)))->
u.fld[1]).rt_rtx)))) ::selftest::pass ((((::selftest::location
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2030, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2030, __FUNCTION__)))), desc_); } while (0)
;
2031}
2032
2033/* Verify that the loader copes with a SYMBOL_REF. */
2034
2035static void
2036test_loading_symbol_ref ()
2037{
2038 rtl_dump_test t (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2038, __FUNCTION__))
, locate_file ("symbol-ref.rtl"));
2039
2040 rtx_insn *insn = get_insns ();
2041
2042 rtx high = SET_SRC (PATTERN (insn))(((PATTERN (insn))->u.fld[1]).rt_rtx);
2043 ASSERT_EQ (HIGH, GET_CODE (high))do { const char *desc_ = "ASSERT_EQ (" "(HIGH)" ", " "(((enum rtx_code) (high)->code))"
")"; if (((HIGH)) == ((((enum rtx_code) (high)->code)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2043, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2043, __FUNCTION__)))), desc_); } while (0)
;
2044
2045 rtx symbol_ref = XEXP (high, 0)(((high)->u.fld[0]).rt_rtx);
2046 ASSERT_EQ (SYMBOL_REF, GET_CODE (symbol_ref))do { const char *desc_ = "ASSERT_EQ (" "(SYMBOL_REF)" ", " "(((enum rtx_code) (symbol_ref)->code))"
")"; if (((SYMBOL_REF)) == ((((enum rtx_code) (symbol_ref)->
code)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2046, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2046, __FUNCTION__)))), desc_); } while (0)
;
2047
2048 /* Verify that "[flags 0xc0]" was parsed. */
2049 ASSERT_EQ (0xc0, SYMBOL_REF_FLAGS (symbol_ref))do { const char *desc_ = "ASSERT_EQ (" "(0xc0)" ", " "((__extension__ ({ __typeof ((symbol_ref)) const _rtx = ((symbol_ref)); if (((enum rtx_code) (_rtx)->code) != SYMBOL_REF) rtl_check_failed_flag (\"SYMBOL_REF_FLAGS\", _rtx, \"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc\", 2049, __FUNCTION__); _rtx; }) ->u2.symbol_ref_flags))"
")"; if (((0xc0)) == (((__extension__ ({ __typeof ((symbol_ref
)) const _rtx = ((symbol_ref)); if (((enum rtx_code) (_rtx)->
code) != SYMBOL_REF) rtl_check_failed_flag ("SYMBOL_REF_FLAGS"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2049, __FUNCTION__); _rtx; }) ->u2.symbol_ref_flags)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2049, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2049, __FUNCTION__)))), desc_); } while (0)
;
2050 /* TODO: we don't yet load SYMBOL_REF_DECL. */
2051}
2052
2053/* Verify that the loader can rebuild a CFG. */
2054
2055static void
2056test_loading_cfg ()
2057{
2058 rtl_dump_test t (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2058, __FUNCTION__))
, locate_file ("cfg-test.rtl"));
2059
2060 ASSERT_STREQ ("cfg_test", IDENTIFIER_POINTER (DECL_NAME (cfun->decl)))do { ::selftest::assert_streq ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2060, __FUNCTION__)), "\"cfg_test\"", "IDENTIFIER_POINTER (DECL_NAME (cfun->decl))"
, ("cfg_test"), (((const char *) (tree_check ((((contains_struct_check
(((cfun + 0)->decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2060, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2060, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.str
))); } while (0)
;
2061
2062 ASSERT_TRUE (cfun)do { const char *desc_ = "ASSERT_TRUE (" "((cfun + 0))" ")"; bool
actual_ = (((cfun + 0))); if (actual_) ::selftest::pass (((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2062, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2062, __FUNCTION__))), desc_); } while (0)
;
2063
2064 ASSERT_TRUE (cfun->cfg != NULL)do { const char *desc_ = "ASSERT_TRUE (" "((cfun + 0)->cfg != nullptr)"
")"; bool actual_ = (((cfun + 0)->cfg != nullptr)); if (actual_
) ::selftest::pass (((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2064, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2064, __FUNCTION__))), desc_); } while (0)
;
2065 ASSERT_EQ (6, n_basic_blocks_for_fn (cfun))do { const char *desc_ = "ASSERT_EQ (" "(6)" ", " "((((cfun + 0))->cfg->x_n_basic_blocks))"
")"; if (((6)) == (((((cfun + 0))->cfg->x_n_basic_blocks
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2065, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2065, __FUNCTION__)))), desc_); } while (0)
;
2066 ASSERT_EQ (6, n_edges_for_fn (cfun))do { const char *desc_ = "ASSERT_EQ (" "(6)" ", " "((((cfun + 0))->cfg->x_n_edges))"
")"; if (((6)) == (((((cfun + 0))->cfg->x_n_edges)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2066, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2066, __FUNCTION__)))), desc_); } while (0)
;
2067
2068 /* The "fake" basic blocks. */
2069 basic_block entry = ENTRY_BLOCK_PTR_FOR_FN (cfun)(((cfun + 0))->cfg->x_entry_block_ptr);
2070 ASSERT_TRUE (entry != NULL)do { const char *desc_ = "ASSERT_TRUE (" "(entry != nullptr)"
")"; bool actual_ = ((entry != nullptr)); if (actual_) ::selftest
::pass (((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2070, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2070, __FUNCTION__))), desc_); } while (0)
;
2071 ASSERT_EQ (ENTRY_BLOCK, entry->index)do { const char *desc_ = "ASSERT_EQ (" "((0))" ", " "(entry->index)"
")"; if ((((0))) == ((entry->index))) ::selftest::pass ((
((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2071, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2071, __FUNCTION__)))), desc_); } while (0)
;
2072
2073 basic_block exit = EXIT_BLOCK_PTR_FOR_FN (cfun)(((cfun + 0))->cfg->x_exit_block_ptr);
2074 ASSERT_TRUE (exit != NULL)do { const char *desc_ = "ASSERT_TRUE (" "(exit != nullptr)" ")"
; bool actual_ = ((exit != nullptr)); if (actual_) ::selftest
::pass (((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2074, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2074, __FUNCTION__))), desc_); } while (0)
;
2075 ASSERT_EQ (EXIT_BLOCK, exit->index)do { const char *desc_ = "ASSERT_EQ (" "((1))" ", " "(exit->index)"
")"; if ((((1))) == ((exit->index))) ::selftest::pass (((
(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2075, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2075, __FUNCTION__)))), desc_); } while (0)
;
2076
2077 /* The "real" basic blocks. */
2078 basic_block bb2 = (*cfun(cfun + 0)->cfg->x_basic_block_info)[2];
2079 basic_block bb3 = (*cfun(cfun + 0)->cfg->x_basic_block_info)[3];
2080 basic_block bb4 = (*cfun(cfun + 0)->cfg->x_basic_block_info)[4];
2081 basic_block bb5 = (*cfun(cfun + 0)->cfg->x_basic_block_info)[5];
2082
2083 ASSERT_EQ (2, bb2->index)do { const char *desc_ = "ASSERT_EQ (" "(2)" ", " "(bb2->index)"
")"; if (((2)) == ((bb2->index))) ::selftest::pass ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2083, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2083, __FUNCTION__)))), desc_); } while (0)
;
2084 ASSERT_EQ (3, bb3->index)do { const char *desc_ = "ASSERT_EQ (" "(3)" ", " "(bb3->index)"
")"; if (((3)) == ((bb3->index))) ::selftest::pass ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2084, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2084, __FUNCTION__)))), desc_); } while (0)
;
2085 ASSERT_EQ (4, bb4->index)do { const char *desc_ = "ASSERT_EQ (" "(4)" ", " "(bb4->index)"
")"; if (((4)) == ((bb4->index))) ::selftest::pass ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2085, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2085, __FUNCTION__)))), desc_); } while (0)
;
2086 ASSERT_EQ (5, bb5->index)do { const char *desc_ = "ASSERT_EQ (" "(5)" ", " "(bb5->index)"
")"; if (((5)) == ((bb5->index))) ::selftest::pass ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2086, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2086, __FUNCTION__)))), desc_); } while (0)
;
2087
2088 /* Verify connectivity. */
2089
2090 /* Entry block. */
2091 ASSERT_EQ (NULL, entry->preds)do { const char *desc_ = "ASSERT_EQ (" "(nullptr)" ", " "(entry->preds)"
")"; if (((nullptr)) == ((entry->preds))) ::selftest::pass
((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2091, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2091, __FUNCTION__)))), desc_); } while (0)
;
2092 ASSERT_EQ (1, entry->succs->length ())do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "(entry->succs->length ())"
")"; if (((1)) == ((entry->succs->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2092, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2092, __FUNCTION__)))), desc_); } while (0)
;
2093 ASSERT_EDGE ((*entry->succs)[0], 0, 2, EDGE_FALLTHRU)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2093, __FUNCTION__)), (*entry->succs)[0], 0, 2, EDGE_FALLTHRU
)
;
2094
2095 /* bb2. */
2096 ASSERT_EQ (1, bb2->preds->length ())do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "(bb2->preds->length ())"
")"; if (((1)) == ((bb2->preds->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2096, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2096, __FUNCTION__)))), desc_); } while (0)
;
2097 ASSERT_EDGE ((*bb2->preds)[0], 0, 2, EDGE_FALLTHRU)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2097, __FUNCTION__)), (*bb2->preds)[0], 0, 2, EDGE_FALLTHRU
)
;
2098 ASSERT_EQ (2, bb2->succs->length ())do { const char *desc_ = "ASSERT_EQ (" "(2)" ", " "(bb2->succs->length ())"
")"; if (((2)) == ((bb2->succs->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2098, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2098, __FUNCTION__)))), desc_); } while (0)
;
2099 ASSERT_EDGE ((*bb2->succs)[0], 2, 3, EDGE_TRUE_VALUE)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2099, __FUNCTION__)), (*bb2->succs)[0], 2, 3, EDGE_TRUE_VALUE
)
;
2100 ASSERT_EDGE ((*bb2->succs)[1], 2, 4, EDGE_FALSE_VALUE)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2100, __FUNCTION__)), (*bb2->succs)[1], 2, 4, EDGE_FALSE_VALUE
)
;
2101
2102 /* bb3. */
2103 ASSERT_EQ (1, bb3->preds->length ())do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "(bb3->preds->length ())"
")"; if (((1)) == ((bb3->preds->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2103, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2103, __FUNCTION__)))), desc_); } while (0)
;
2104 ASSERT_EDGE ((*bb3->preds)[0], 2, 3, EDGE_TRUE_VALUE)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2104, __FUNCTION__)), (*bb3->preds)[0], 2, 3, EDGE_TRUE_VALUE
)
;
2105 ASSERT_EQ (1, bb3->succs->length ())do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "(bb3->succs->length ())"
")"; if (((1)) == ((bb3->succs->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2105, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2105, __FUNCTION__)))), desc_); } while (0)
;
2106 ASSERT_EDGE ((*bb3->succs)[0], 3, 5, EDGE_FALLTHRU)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2106, __FUNCTION__)), (*bb3->succs)[0], 3, 5, EDGE_FALLTHRU
)
;
2107
2108 /* bb4. */
2109 ASSERT_EQ (1, bb4->preds->length ())do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "(bb4->preds->length ())"
")"; if (((1)) == ((bb4->preds->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2109, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2109, __FUNCTION__)))), desc_); } while (0)
;
2110 ASSERT_EDGE ((*bb4->preds)[0], 2, 4, EDGE_FALSE_VALUE)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2110, __FUNCTION__)), (*bb4->preds)[0], 2, 4, EDGE_FALSE_VALUE
)
;
2111 ASSERT_EQ (1, bb4->succs->length ())do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "(bb4->succs->length ())"
")"; if (((1)) == ((bb4->succs->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2111, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2111, __FUNCTION__)))), desc_); } while (0)
;
2112 ASSERT_EDGE ((*bb4->succs)[0], 4, 5, EDGE_FALLTHRU)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2112, __FUNCTION__)), (*bb4->succs)[0], 4, 5, EDGE_FALLTHRU
)
;
2113
2114 /* bb5. */
2115 ASSERT_EQ (2, bb5->preds->length ())do { const char *desc_ = "ASSERT_EQ (" "(2)" ", " "(bb5->preds->length ())"
")"; if (((2)) == ((bb5->preds->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2115, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2115, __FUNCTION__)))), desc_); } while (0)
;
2116 ASSERT_EDGE ((*bb5->preds)[0], 3, 5, EDGE_FALLTHRU)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2116, __FUNCTION__)), (*bb5->preds)[0], 3, 5, EDGE_FALLTHRU
)
;
2117 ASSERT_EDGE ((*bb5->preds)[1], 4, 5, EDGE_FALLTHRU)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2117, __FUNCTION__)), (*bb5->preds)[1], 4, 5, EDGE_FALLTHRU
)
;
2118 ASSERT_EQ (1, bb5->succs->length ())do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "(bb5->succs->length ())"
")"; if (((1)) == ((bb5->succs->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2118, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2118, __FUNCTION__)))), desc_); } while (0)
;
2119 ASSERT_EDGE ((*bb5->succs)[0], 5, 1, EDGE_FALLTHRU)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2119, __FUNCTION__)), (*bb5->succs)[0], 5, 1, EDGE_FALLTHRU
)
;
2120
2121 /* Exit block. */
2122 ASSERT_EQ (1, exit->preds->length ())do { const char *desc_ = "ASSERT_EQ (" "(1)" ", " "(exit->preds->length ())"
")"; if (((1)) == ((exit->preds->length ()))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2122, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2122, __FUNCTION__)))), desc_); } while (0)
;
2123 ASSERT_EDGE ((*exit->preds)[0], 5, 1, EDGE_FALLTHRU)assert_edge_at ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2123, __FUNCTION__)), (*exit->preds)[0], 5, 1, EDGE_FALLTHRU
)
;
2124 ASSERT_EQ (NULL, exit->succs)do { const char *desc_ = "ASSERT_EQ (" "(nullptr)" ", " "(exit->succs)"
")"; if (((nullptr)) == ((exit->succs))) ::selftest::pass
((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2124, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2124, __FUNCTION__)))), desc_); } while (0)
;
2125}
2126
2127/* Verify that the loader copes with sparse block indices.
2128 This testcase loads a file with a "(block 42)". */
2129
2130static void
2131test_loading_bb_index ()
2132{
2133 rtl_dump_test t (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2133, __FUNCTION__))
, locate_file ("bb-index.rtl"));
2134
2135 ASSERT_STREQ ("test_bb_index", IDENTIFIER_POINTER (DECL_NAME (cfun->decl)))do { ::selftest::assert_streq ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2135, __FUNCTION__)), "\"test_bb_index\"", "IDENTIFIER_POINTER (DECL_NAME (cfun->decl))"
, ("test_bb_index"), (((const char *) (tree_check ((((contains_struct_check
(((cfun + 0)->decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2135, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2135, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.str
))); } while (0)
;
2136
2137 ASSERT_TRUE (cfun)do { const char *desc_ = "ASSERT_TRUE (" "((cfun + 0))" ")"; bool
actual_ = (((cfun + 0))); if (actual_) ::selftest::pass (((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2137, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2137, __FUNCTION__))), desc_); } while (0)
;
2138
2139 ASSERT_TRUE (cfun->cfg != NULL)do { const char *desc_ = "ASSERT_TRUE (" "((cfun + 0)->cfg != nullptr)"
")"; bool actual_ = (((cfun + 0)->cfg != nullptr)); if (actual_
) ::selftest::pass (((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2139, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2139, __FUNCTION__))), desc_); } while (0)
;
2140 ASSERT_EQ (3, n_basic_blocks_for_fn (cfun))do { const char *desc_ = "ASSERT_EQ (" "(3)" ", " "((((cfun + 0))->cfg->x_n_basic_blocks))"
")"; if (((3)) == (((((cfun + 0))->cfg->x_n_basic_blocks
)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2140, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2140, __FUNCTION__)))), desc_); } while (0)
;
2141 ASSERT_EQ (43, basic_block_info_for_fn (cfun)->length ())do { const char *desc_ = "ASSERT_EQ (" "(43)" ", " "((((cfun + 0))->cfg->x_basic_block_info)->length ())"
")"; if (((43)) == (((((cfun + 0))->cfg->x_basic_block_info
)->length ()))) ::selftest::pass ((((::selftest::location (
"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2141, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2141, __FUNCTION__)))), desc_); } while (0)
;
2142 ASSERT_EQ (2, n_edges_for_fn (cfun))do { const char *desc_ = "ASSERT_EQ (" "(2)" ", " "((((cfun + 0))->cfg->x_n_edges))"
")"; if (((2)) == (((((cfun + 0))->cfg->x_n_edges)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2142, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2142, __FUNCTION__)))), desc_); } while (0)
;
2143
2144 ASSERT_EQ (NULL, (*cfun->cfg->x_basic_block_info)[41])do { const char *desc_ = "ASSERT_EQ (" "(nullptr)" ", " "((*(cfun + 0)->cfg->x_basic_block_info)[41])"
")"; if (((nullptr)) == (((*(cfun + 0)->cfg->x_basic_block_info
)[41]))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2144, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2144, __FUNCTION__)))), desc_); } while (0)
;
2145 basic_block bb42 = (*cfun(cfun + 0)->cfg->x_basic_block_info)[42];
2146 ASSERT_NE (NULL, bb42)do { const char *desc_ = "ASSERT_NE (" "NULL" ", " "bb42" ")"
; if ((nullptr) != (bb42)) ::selftest::pass ((::selftest::location
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2146, __FUNCTION__)), desc_); else ::selftest::fail ((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2146, __FUNCTION__)), desc_); } while (0)
;
2147 ASSERT_EQ (42, bb42->index)do { const char *desc_ = "ASSERT_EQ (" "(42)" ", " "(bb42->index)"
")"; if (((42)) == ((bb42->index))) ::selftest::pass ((((
::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2147, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2147, __FUNCTION__)))), desc_); } while (0)
;
2148}
2149
2150/* Verify that function_reader::handle_any_trailing_information correctly
2151 parses all the possible items emitted for a MEM. */
2152
2153static void
2154test_loading_mem ()
2155{
2156 rtl_dump_test t (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2156, __FUNCTION__))
, locate_file ("mem.rtl"));
2157
2158 ASSERT_STREQ ("test_mem", IDENTIFIER_POINTER (DECL_NAME (cfun->decl)))do { ::selftest::assert_streq ((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2158, __FUNCTION__)), "\"test_mem\"", "IDENTIFIER_POINTER (DECL_NAME (cfun->decl))"
, ("test_mem"), (((const char *) (tree_check ((((contains_struct_check
(((cfun + 0)->decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2158, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2158, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.str
))); } while (0)
;
2159 ASSERT_TRUE (cfun)do { const char *desc_ = "ASSERT_TRUE (" "((cfun + 0))" ")"; bool
actual_ = (((cfun + 0))); if (actual_) ::selftest::pass (((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2159, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2159, __FUNCTION__))), desc_); } while (0)
;
2160
2161 /* Verify parsing of "[42 i+17 S8 A128 AS5]". */
2162 rtx_insn *insn_1 = get_insn_by_uid (1);
2163 rtx set1 = single_set (insn_1);
2164 rtx mem1 = SET_DEST (set1)(((set1)->u.fld[0]).rt_rtx);
2165 ASSERT_EQ (42, MEM_ALIAS_SET (mem1))do { const char *desc_ = "ASSERT_EQ (" "(42)" ", " "((get_mem_attrs (mem1)->alias))"
")"; if (((42)) == (((get_mem_attrs (mem1)->alias)))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2165, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2165, __FUNCTION__)))), desc_); } while (0)
;
2166 /* "+17". */
2167 ASSERT_TRUE (MEM_OFFSET_KNOWN_P (mem1))do { const char *desc_ = "ASSERT_TRUE (" "((get_mem_attrs (mem1)->offset_known_p))"
")"; bool actual_ = (((get_mem_attrs (mem1)->offset_known_p
))); if (actual_) ::selftest::pass (((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2167, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2167, __FUNCTION__))), desc_); } while (0)
;
2168 ASSERT_KNOWN_EQ (17, MEM_OFFSET (mem1))do { const char *desc = "ASSERT_KNOWN_EQ (" "(17)" ", " "((get_mem_attrs (mem1)->offset))"
")"; if ((!maybe_ne ((17), ((get_mem_attrs (mem1)->offset
))))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2168, __FUNCTION__)))), desc); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2168, __FUNCTION__)))), desc); } while (0)
;
2169 /* "S8". */
2170 ASSERT_KNOWN_EQ (8, MEM_SIZE (mem1))do { const char *desc = "ASSERT_KNOWN_EQ (" "(8)" ", " "((get_mem_attrs (mem1)->size))"
")"; if ((!maybe_ne ((8), ((get_mem_attrs (mem1)->size)))
)) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2170, __FUNCTION__)))), desc); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2170, __FUNCTION__)))), desc); } while (0)
;
2171 /* "A128. */
2172 ASSERT_EQ (128, MEM_ALIGN (mem1))do { const char *desc_ = "ASSERT_EQ (" "(128)" ", " "((get_mem_attrs (mem1)->align))"
")"; if (((128)) == (((get_mem_attrs (mem1)->align)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2172, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2172, __FUNCTION__)))), desc_); } while (0)
;
2173 /* "AS5. */
2174 ASSERT_EQ (5, MEM_ADDR_SPACE (mem1))do { const char *desc_ = "ASSERT_EQ (" "(5)" ", " "((get_mem_attrs (mem1)->addrspace))"
")"; if (((5)) == (((get_mem_attrs (mem1)->addrspace)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2174, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2174, __FUNCTION__)))), desc_); } while (0)
;
2175
2176 /* Verify parsing of "43 i+18 S9 AS6"
2177 (an address space without an alignment). */
2178 rtx_insn *insn_2 = get_insn_by_uid (2);
2179 rtx set2 = single_set (insn_2);
2180 rtx mem2 = SET_DEST (set2)(((set2)->u.fld[0]).rt_rtx);
2181 ASSERT_EQ (43, MEM_ALIAS_SET (mem2))do { const char *desc_ = "ASSERT_EQ (" "(43)" ", " "((get_mem_attrs (mem2)->alias))"
")"; if (((43)) == (((get_mem_attrs (mem2)->alias)))) ::selftest
::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2181, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2181, __FUNCTION__)))), desc_); } while (0)
;
2182 /* "+18". */
2183 ASSERT_TRUE (MEM_OFFSET_KNOWN_P (mem2))do { const char *desc_ = "ASSERT_TRUE (" "((get_mem_attrs (mem2)->offset_known_p))"
")"; bool actual_ = (((get_mem_attrs (mem2)->offset_known_p
))); if (actual_) ::selftest::pass (((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2183, __FUNCTION__))), desc_); else ::selftest::fail (((::selftest
::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2183, __FUNCTION__))), desc_); } while (0)
;
2184 ASSERT_KNOWN_EQ (18, MEM_OFFSET (mem2))do { const char *desc = "ASSERT_KNOWN_EQ (" "(18)" ", " "((get_mem_attrs (mem2)->offset))"
")"; if ((!maybe_ne ((18), ((get_mem_attrs (mem2)->offset
))))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2184, __FUNCTION__)))), desc); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2184, __FUNCTION__)))), desc); } while (0)
;
2185 /* "S9". */
2186 ASSERT_KNOWN_EQ (9, MEM_SIZE (mem2))do { const char *desc = "ASSERT_KNOWN_EQ (" "(9)" ", " "((get_mem_attrs (mem2)->size))"
")"; if ((!maybe_ne ((9), ((get_mem_attrs (mem2)->size)))
)) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2186, __FUNCTION__)))), desc); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2186, __FUNCTION__)))), desc); } while (0)
;
2187 /* "AS6. */
2188 ASSERT_EQ (6, MEM_ADDR_SPACE (mem2))do { const char *desc_ = "ASSERT_EQ (" "(6)" ", " "((get_mem_attrs (mem2)->addrspace))"
")"; if (((6)) == (((get_mem_attrs (mem2)->addrspace)))) ::
selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2188, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2188, __FUNCTION__)))), desc_); } while (0)
;
2189}
2190
2191/* Verify that "repeated xN" is read correctly. */
2192
2193static void
2194test_loading_repeat ()
2195{
2196 rtl_dump_test t (SELFTEST_LOCATION(::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2196, __FUNCTION__))
, locate_file ("repeat.rtl"));
2197
2198 rtx_insn *insn_1 = get_insn_by_uid (1);
2199 ASSERT_EQ (PARALLEL, GET_CODE (PATTERN (insn_1)))do { const char *desc_ = "ASSERT_EQ (" "(PARALLEL)" ", " "(((enum rtx_code) (PATTERN (insn_1))->code))"
")"; if (((PARALLEL)) == ((((enum rtx_code) (PATTERN (insn_1
))->code)))) ::selftest::pass ((((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2199, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2199, __FUNCTION__)))), desc_); } while (0)
;
2200 ASSERT_EQ (64, XVECLEN (PATTERN (insn_1), 0))do { const char *desc_ = "ASSERT_EQ (" "(64)" ", " "((((((PATTERN (insn_1))->u.fld[0]).rt_rtvec))->num_elem))"
")"; if (((64)) == (((((((PATTERN (insn_1))->u.fld[0]).rt_rtvec
))->num_elem)))) ::selftest::pass ((((::selftest::location
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2200, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2200, __FUNCTION__)))), desc_); } while (0)
;
2201 for (int i = 0; i < 64; i++)
2202 ASSERT_EQ (const0_rtx, XVECEXP (PATTERN (insn_1), 0, i))do { const char *desc_ = "ASSERT_EQ (" "((const_int_rtx[64]))"
", " "((((((PATTERN (insn_1))->u.fld[0]).rt_rtvec))->elem[i]))"
")"; if ((((const_int_rtx[64]))) == (((((((PATTERN (insn_1))
->u.fld[0]).rt_rtvec))->elem[i])))) ::selftest::pass ((
((::selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2202, __FUNCTION__)))), desc_); else ::selftest::fail ((((::
selftest::location ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/read-rtl-function.cc"
, 2202, __FUNCTION__)))), desc_); } while (0)
;
2203}
2204
2205/* Run all of the selftests within this file. */
2206
2207void
2208read_rtl_function_cc_tests ()
2209{
2210 test_edge_flags ();
2211 test_parsing_regnos ();
2212 test_loading_dump_fragment_1 ();
2213 test_loading_dump_fragment_2 ();
2214 test_loading_labels ();
2215 test_loading_insn_with_mode ();
2216 test_loading_jump_to_label_ref ();
2217 test_loading_jump_to_return ();
2218 test_loading_jump_to_simple_return ();
2219 test_loading_note_insn_basic_block ();
2220 test_loading_note_insn_deleted ();
2221 test_loading_const_int ();
2222 test_loading_symbol_ref ();
2223 test_loading_cfg ();
2224 test_loading_bb_index ();
2225 test_loading_mem ();
2226 test_loading_repeat ();
2227}
2228
2229} // namespace selftest
2230
2231#endif /* #if CHECKING_P */

/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h

1/* Register Transfer Language (RTL) definitions for GCC
2 Copyright (C) 1987-2023 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
39class predefined_function_abi;
40
41/* Value used by some passes to "recognize" noop moves as valid
42 instructions. */
43#define NOOP_MOVE_INSN_CODE2147483647 INT_MAX2147483647
44
45/* Register Transfer Language EXPRESSIONS CODES */
46
47#define RTX_CODEenum rtx_code enum rtx_code
48enum rtx_code {
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) ((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/* Register Transfer Language EXPRESSIONS CODE CLASSES */
67
68enum rtx_class {
69 /* We check bit 0-1 of some rtx class codes in the predicates below. */
70
71 /* Bit 0 = comparison if 0, arithmetic is 1
72 Bit 1 = 1 if commutative. */
73 RTX_COMPARE, /* 0 */
74 RTX_COMM_COMPARE,
75 RTX_BIN_ARITH,
76 RTX_COMM_ARITH,
77
78 /* Must follow the four preceding values. */
79 RTX_UNARY, /* 4 */
80
81 RTX_EXTRA,
82 RTX_MATCH,
83 RTX_INSN,
84
85 /* Bit 0 = 1 if constant. */
86 RTX_OBJ, /* 8 */
87 RTX_CONST_OBJ,
88
89 RTX_TERNARY,
90 RTX_BITFIELD_OPS,
91 RTX_AUTOINC
92};
93
94#define RTX_OBJ_MASK(~1) (~1)
95#define RTX_OBJ_RESULT(RTX_OBJ & (~1)) (RTX_OBJ & RTX_OBJ_MASK(~1))
96#define RTX_COMPARE_MASK(~1) (~1)
97#define RTX_COMPARE_RESULT(RTX_COMPARE & (~1)) (RTX_COMPARE & RTX_COMPARE_MASK(~1))
98#define RTX_ARITHMETIC_MASK(~1) (~1)
99#define RTX_ARITHMETIC_RESULT(RTX_COMM_ARITH & (~1)) (RTX_COMM_ARITH & RTX_ARITHMETIC_MASK(~1))
100#define RTX_BINARY_MASK(~3) (~3)
101#define RTX_BINARY_RESULT(RTX_COMPARE & (~3)) (RTX_COMPARE & RTX_BINARY_MASK(~3))
102#define RTX_COMMUTATIVE_MASK(~2) (~2)
103#define RTX_COMMUTATIVE_RESULT(RTX_COMM_COMPARE & (~2)) (RTX_COMM_COMPARE & RTX_COMMUTATIVE_MASK(~2))
104#define RTX_NON_COMMUTATIVE_RESULT(RTX_COMPARE & (~2)) (RTX_COMPARE & RTX_COMMUTATIVE_MASK(~2))
105
106extern const unsigned char rtx_length[NUM_RTX_CODE((int) LAST_AND_UNUSED_RTX_CODE)];
107#define GET_RTX_LENGTH(CODE)(rtx_length[(int) (CODE)]) (rtx_length[(int) (CODE)])
108
109extern const char * const rtx_name[NUM_RTX_CODE((int) LAST_AND_UNUSED_RTX_CODE)];
110#define GET_RTX_NAME(CODE)(rtx_name[(int) (CODE)]) (rtx_name[(int) (CODE)])
111
112extern const char * const rtx_format[NUM_RTX_CODE((int) LAST_AND_UNUSED_RTX_CODE)];
113#define GET_RTX_FORMAT(CODE)(rtx_format[(int) (CODE)]) (rtx_format[(int) (CODE)])
114
115extern const enum rtx_class rtx_class[NUM_RTX_CODE((int) LAST_AND_UNUSED_RTX_CODE)];
116#define GET_RTX_CLASS(CODE)(rtx_class[(int) (CODE)]) (rtx_class[(int) (CODE)])
117
118/* True if CODE is part of the insn chain (i.e. has INSN_UID, PREV_INSN
119 and NEXT_INSN fields). */
120#define INSN_CHAIN_CODE_P(CODE)((unsigned long) (CODE) - (unsigned long) (DEBUG_INSN) <= (
unsigned long) (NOTE) - (unsigned long) (DEBUG_INSN))
IN_RANGE (CODE, DEBUG_INSN, NOTE)((unsigned long) (CODE) - (unsigned long) (DEBUG_INSN) <= (
unsigned long) (NOTE) - (unsigned long) (DEBUG_INSN))
121
122extern const unsigned char rtx_code_size[NUM_RTX_CODE((int) LAST_AND_UNUSED_RTX_CODE)];
123extern const unsigned char rtx_next[NUM_RTX_CODE((int) LAST_AND_UNUSED_RTX_CODE)];
124
125/* The flags and bitfields of an ADDR_DIFF_VEC. BASE is the base label
126 relative to which the offsets are calculated, as explained in rtl.def. */
127struct addr_diff_vec_flags
128{
129 /* Set at the start of shorten_branches - ONLY WHEN OPTIMIZING - : */
130 unsigned min_align: 8;
131 /* Flags: */
132 unsigned base_after_vec: 1; /* BASE is after the ADDR_DIFF_VEC. */
133 unsigned min_after_vec: 1; /* minimum address target label is
134 after the ADDR_DIFF_VEC. */
135 unsigned max_after_vec: 1; /* maximum address target label is
136 after the ADDR_DIFF_VEC. */
137 unsigned min_after_base: 1; /* minimum address target label is
138 after BASE. */
139 unsigned max_after_base: 1; /* maximum address target label is
140 after BASE. */
141 /* Set by the actual branch shortening process - ONLY WHEN OPTIMIZING - : */
142 unsigned offset_unsigned: 1; /* offsets have to be treated as unsigned. */
143 unsigned : 2;
144 unsigned scale : 8;
145};
146
147/* Structure used to describe the attributes of a MEM. These are hashed
148 so MEMs that the same attributes share a data structure. This means
149 they cannot be modified in place. */
150class GTY(()) mem_attrs
151{
152public:
153 mem_attrs ();
154
155 /* The expression that the MEM accesses, or null if not known.
156 This expression might be larger than the memory reference itself.
157 (In other words, the MEM might access only part of the object.) */
158 tree expr;
159
160 /* The offset of the memory reference from the start of EXPR.
161 Only valid if OFFSET_KNOWN_P. */
162 poly_int64 offset;
163
164 /* The size of the memory reference in bytes. Only valid if
165 SIZE_KNOWN_P. */
166 poly_int64 size;
167
168 /* The alias set of the memory reference. */
169 alias_set_type alias;
170
171 /* The alignment of the reference in bits. Always a multiple of
172 BITS_PER_UNIT. Note that EXPR may have a stricter alignment
173 than the memory reference itself. */
174 unsigned int align;
175
176 /* The address space that the memory reference uses. */
177 unsigned char addrspace;
178
179 /* True if OFFSET is known. */
180 bool offset_known_p;
181
182 /* True if SIZE is known. */
183 bool size_known_p;
184};
185
186/* Structure used to describe the attributes of a REG in similar way as
187 mem_attrs does for MEM above. Note that the OFFSET field is calculated
188 in the same way as for mem_attrs, rather than in the same way as a
189 SUBREG_BYTE. For example, if a big-endian target stores a byte
190 object in the low part of a 4-byte register, the OFFSET field
191 will be -3 rather than 0. */
192
193class GTY((for_user)) reg_attrs {
194public:
195 tree decl; /* decl corresponding to REG. */
196 poly_int64 offset; /* Offset from start of DECL. */
197};
198
199/* Common union for an element of an rtx. */
200
201union rtunion
202{
203 int rt_int;
204 unsigned int rt_uint;
205 poly_uint16_pod rt_subreg;
206 const char *rt_str;
207 rtx rt_rtx;
208 rtvec rt_rtvec;
209 machine_mode rt_type;
210 addr_diff_vec_flags rt_addr_diff_vec_flags;
211 struct cselib_val *rt_cselib;
212 tree rt_tree;
213 basic_block rt_bb;
214 mem_attrs *rt_mem;
215 class constant_descriptor_rtx *rt_constant;
216 struct dw_cfi_node *rt_cfi;
217};
218
219/* Describes the properties of a REG. */
220struct GTY(()) reg_info {
221 /* The value of REGNO. */
222 unsigned int regno;
223
224 /* The value of REG_NREGS. */
225 unsigned int nregs : 8;
226 unsigned int unused : 24;
227
228 /* The value of REG_ATTRS. */
229 reg_attrs *attrs;
230};
231
232/* This structure remembers the position of a SYMBOL_REF within an
233 object_block structure. A SYMBOL_REF only provides this information
234 if SYMBOL_REF_HAS_BLOCK_INFO_P is true. */
235struct GTY(()) block_symbol {
236 /* The usual SYMBOL_REF fields. */
237 rtunion GTY ((skip)) fld[2];
238
239 /* The block that contains this object. */
240 struct object_block *block;
241
242 /* The offset of this object from the start of its block. It is negative
243 if the symbol has not yet been assigned an offset. */
244 HOST_WIDE_INTlong offset;
245};
246
247/* Describes a group of objects that are to be placed together in such
248 a way that their relative positions are known. */
249struct GTY((for_user)) object_block {
250 /* The section in which these objects should be placed. */
251 section *sect;
252
253 /* The alignment of the first object, measured in bits. */
254 unsigned int alignment;
255
256 /* The total size of the objects, measured in bytes. */
257 HOST_WIDE_INTlong size;
258
259 /* The SYMBOL_REFs for each object. The vector is sorted in
260 order of increasing offset and the following conditions will
261 hold for each element X:
262
263 SYMBOL_REF_HAS_BLOCK_INFO_P (X)
264 !SYMBOL_REF_ANCHOR_P (X)
265 SYMBOL_REF_BLOCK (X) == [address of this structure]
266 SYMBOL_REF_BLOCK_OFFSET (X) >= 0. */
267 vec<rtx, va_gc> *objects;
268
269 /* All the anchor SYMBOL_REFs used to address these objects, sorted
270 in order of increasing offset, and then increasing TLS model.
271 The following conditions will hold for each element X in this vector:
272
273 SYMBOL_REF_HAS_BLOCK_INFO_P (X)
274 SYMBOL_REF_ANCHOR_P (X)
275 SYMBOL_REF_BLOCK (X) == [address of this structure]
276 SYMBOL_REF_BLOCK_OFFSET (X) >= 0. */
277 vec<rtx, va_gc> *anchors;
278};
279
280struct GTY((variable_size)) hwivec_def {
281 HOST_WIDE_INTlong elem[1];
282};
283
284/* Number of elements of the HWIVEC if RTX is a CONST_WIDE_INT. */
285#define CWI_GET_NUM_ELEM(RTX)((int)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX));
if (((enum rtx_code) (_rtx)->code) != CONST_WIDE_INT) rtl_check_failed_flag
("CWI_GET_NUM_ELEM", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 285, __FUNCTION__); _rtx; })->u2.num_elem)
\
286 ((int)RTL_FLAG_CHECK1("CWI_GET_NUM_ELEM", (RTX), CONST_WIDE_INT)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != CONST_WIDE_INT) rtl_check_failed_flag
("CWI_GET_NUM_ELEM", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 286, __FUNCTION__); _rtx; })
->u2.num_elem)
287#define CWI_PUT_NUM_ELEM(RTX, NUM)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CONST_WIDE_INT) rtl_check_failed_flag
("CWI_PUT_NUM_ELEM", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 287, __FUNCTION__); _rtx; })->u2.num_elem = (NUM))
\
288 (RTL_FLAG_CHECK1("CWI_PUT_NUM_ELEM", (RTX), CONST_WIDE_INT)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != CONST_WIDE_INT) rtl_check_failed_flag
("CWI_PUT_NUM_ELEM", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 288, __FUNCTION__); _rtx; })
->u2.num_elem = (NUM))
289
290struct GTY((variable_size)) const_poly_int_def {
291 trailing_wide_ints<NUM_POLY_INT_COEFFS1> coeffs;
292};
293
294/* RTL expression ("rtx"). */
295
296/* The GTY "desc" and "tag" options below are a kludge: we need a desc
297 field for gengtype to recognize that inheritance is occurring,
298 so that all subclasses are redirected to the traversal hook for the
299 base class.
300 However, all of the fields are in the base class, and special-casing
301 is at work. Hence we use desc and tag of 0, generating a switch
302 statement of the form:
303 switch (0)
304 {
305 case 0: // all the work happens here
306 }
307 in order to work with the existing special-casing in gengtype. */
308
309struct GTY((desc("0"), tag("0"),
310 chain_next ("RTX_NEXT (&%h)"),
311 chain_prev ("RTX_PREV (&%h)"))) rtx_def {
312 /* The kind of expression this is. */
313 ENUM_BITFIELD(rtx_code)enum rtx_code code: 16;
314
315 /* The kind of value the expression has. */
316 ENUM_BITFIELD(machine_mode)enum machine_mode mode : 8;
317
318 /* 1 in a MEM if we should keep the alias set for this mem unchanged
319 when we access a component.
320 1 in a JUMP_INSN if it is a crossing jump.
321 1 in a CALL_INSN if it is a sibling call.
322 1 in a SET that is for a return.
323 In a CODE_LABEL, part of the two-bit alternate entry field.
324 1 in a CONCAT is VAL_EXPR_IS_COPIED in var-tracking.cc.
325 1 in a VALUE is SP_BASED_VALUE_P in cselib.cc.
326 1 in a SUBREG generated by LRA for reload insns.
327 1 in a REG if this is a static chain register.
328 Dumped as "/j" in RTL dumps. */
329 unsigned int jump : 1;
330 /* In a CODE_LABEL, part of the two-bit alternate entry field.
331 1 in a MEM if it cannot trap.
332 1 in a CALL_INSN logically equivalent to
333 ECF_LOOPING_CONST_OR_PURE and DECL_LOOPING_CONST_OR_PURE_P.
334 1 in a VALUE is SP_DERIVED_VALUE_P in cselib.cc.
335 Dumped as "/c" in RTL dumps. */
336 unsigned int call : 1;
337 /* 1 in a REG, MEM, or CONCAT if the value is set at most once, anywhere.
338 1 in a SUBREG used for SUBREG_PROMOTED_UNSIGNED_P.
339 1 in a SYMBOL_REF if it addresses something in the per-function
340 constants pool.
341 1 in a CALL_INSN logically equivalent to ECF_CONST and TREE_READONLY.
342 1 in a NOTE, or EXPR_LIST for a const call.
343 1 in a JUMP_INSN of an annulling branch.
344 1 in a CONCAT is VAL_EXPR_IS_CLOBBERED in var-tracking.cc.
345 1 in a preserved VALUE is PRESERVED_VALUE_P in cselib.cc.
346 1 in a clobber temporarily created for LRA.
347 Dumped as "/u" in RTL dumps. */
348 unsigned int unchanging : 1;
349 /* 1 in a MEM or ASM_OPERANDS expression if the memory reference is volatile.
350 1 in an INSN, CALL_INSN, JUMP_INSN, CODE_LABEL, BARRIER, or NOTE
351 if it has been deleted.
352 1 in a REG expression if corresponds to a variable declared by the user,
353 0 for an internally generated temporary.
354 1 in a SUBREG used for SUBREG_PROMOTED_UNSIGNED_P.
355 1 in a LABEL_REF, REG_LABEL_TARGET or REG_LABEL_OPERAND note for a
356 non-local label.
357 In a SYMBOL_REF, this flag is used for machine-specific purposes.
358 In a PREFETCH, this flag indicates that it should be considered a
359 scheduling barrier.
360 1 in a CONCAT is VAL_NEEDS_RESOLUTION in var-tracking.cc.
361 Dumped as "/v" in RTL dumps. */
362 unsigned int volatil : 1;
363 /* 1 in a REG if the register is used only in exit code a loop.
364 1 in a SUBREG expression if was generated from a variable with a
365 promoted mode.
366 1 in a CODE_LABEL if the label is used for nonlocal gotos
367 and must not be deleted even if its count is zero.
368 1 in an INSN, JUMP_INSN or CALL_INSN if this insn must be scheduled
369 together with the preceding insn. Valid only within sched.
370 1 in an INSN, JUMP_INSN, or CALL_INSN if insn is in a delay slot and
371 from the target of a branch. Valid from reorg until end of compilation;
372 cleared before used.
373
374 The name of the field is historical. It used to be used in MEMs
375 to record whether the MEM accessed part of a structure.
376 Dumped as "/s" in RTL dumps. */
377 unsigned int in_struct : 1;
378 /* At the end of RTL generation, 1 if this rtx is used. This is used for
379 copying shared structure. See `unshare_all_rtl'.
380 In a REG, this is not needed for that purpose, and used instead
381 in `leaf_renumber_regs_insn'.
382 1 in a SYMBOL_REF, means that emit_library_call
383 has used it as the function.
384 1 in a CONCAT is VAL_HOLDS_TRACK_EXPR in var-tracking.cc.
385 1 in a VALUE or DEBUG_EXPR is VALUE_RECURSED_INTO in var-tracking.cc. */
386 unsigned int used : 1;
387 /* 1 in an INSN or a SET if this rtx is related to the call frame,
388 either changing how we compute the frame address or saving and
389 restoring registers in the prologue and epilogue.
390 1 in a REG or MEM if it is a pointer.
391 1 in a SYMBOL_REF if it addresses something in the per-function
392 constant string pool.
393 1 in a VALUE is VALUE_CHANGED in var-tracking.cc.
394 Dumped as "/f" in RTL dumps. */
395 unsigned frame_related : 1;
396 /* 1 in a REG or PARALLEL that is the current function's return value.
397 1 in a SYMBOL_REF for a weak symbol.
398 1 in a CALL_INSN logically equivalent to ECF_PURE and DECL_PURE_P.
399 1 in a CONCAT is VAL_EXPR_HAS_REVERSE in var-tracking.cc.
400 1 in a VALUE or DEBUG_EXPR is NO_LOC_P in var-tracking.cc.
401 Dumped as "/i" in RTL dumps. */
402 unsigned return_val : 1;
403
404 union {
405 /* The final union field is aligned to 64 bits on LP64 hosts,
406 giving a 32-bit gap after the fields above. We optimize the
407 layout for that case and use the gap for extra code-specific
408 information. */
409
410 /* The ORIGINAL_REGNO of a REG. */
411 unsigned int original_regno;
412
413 /* The INSN_UID of an RTX_INSN-class code. */
414 int insn_uid;
415
416 /* The SYMBOL_REF_FLAGS of a SYMBOL_REF. */
417 unsigned int symbol_ref_flags;
418
419 /* The PAT_VAR_LOCATION_STATUS of a VAR_LOCATION. */
420 enum var_init_status var_location_status;
421
422 /* In a CONST_WIDE_INT (aka hwivec_def), this is the number of
423 HOST_WIDE_INTs in the hwivec_def. */
424 unsigned int num_elem;
425
426 /* Information about a CONST_VECTOR. */
427 struct
428 {
429 /* The value of CONST_VECTOR_NPATTERNS. */
430 unsigned int npatterns : 16;
431
432 /* The value of CONST_VECTOR_NELTS_PER_PATTERN. */
433 unsigned int nelts_per_pattern : 8;
434
435 /* For future expansion. */
436 unsigned int unused : 8;
437 } const_vector;
438 } GTY ((skip)) u2;
439
440 /* The first element of the operands of this rtx.
441 The number of operands and their types are controlled
442 by the `code' field, according to rtl.def. */
443 union u {
444 rtunion fld[1];
445 HOST_WIDE_INTlong hwint[1];
446 struct reg_info reg;
447 struct block_symbol block_sym;
448 struct real_value rv;
449 struct fixed_value fv;
450 struct hwivec_def hwiv;
451 struct const_poly_int_def cpi;
452 } GTY ((special ("rtx_def"), desc ("GET_CODE (&%0)"))) u;
453};
454
455/* A node for constructing singly-linked lists of rtx. */
456
457struct GTY(()) rtx_expr_list : public rtx_def
458{
459private:
460 /* No extra fields, but adds invariant: (GET_CODE (X) == EXPR_LIST). */
461
462public:
463 /* Get next in list. */
464 rtx_expr_list *next () const;
465
466 /* Get at the underlying rtx. */
467 rtx element () const;
468};
469
470template <>
471template <>
472inline bool
473is_a_helper <rtx_expr_list *>::test (rtx rt)
474{
475 return rt->code == EXPR_LIST;
476}
477
478struct GTY(()) rtx_insn_list : public rtx_def
479{
480private:
481 /* No extra fields, but adds invariant: (GET_CODE (X) == INSN_LIST).
482
483 This is an instance of:
484
485 DEF_RTL_EXPR(INSN_LIST, "insn_list", "ue", RTX_EXTRA)
486
487 i.e. a node for constructing singly-linked lists of rtx_insn *, where
488 the list is "external" to the insn (as opposed to the doubly-linked
489 list embedded within rtx_insn itself). */
490
491public:
492 /* Get next in list. */
493 rtx_insn_list *next () const;
494
495 /* Get at the underlying instruction. */
496 rtx_insn *insn () const;
497
498};
499
500template <>
501template <>
502inline bool
503is_a_helper <rtx_insn_list *>::test (rtx rt)
504{
505 return rt->code == INSN_LIST;
506}
507
508/* A node with invariant GET_CODE (X) == SEQUENCE i.e. a vector of rtx,
509 typically (but not always) of rtx_insn *, used in the late passes. */
510
511struct GTY(()) rtx_sequence : public rtx_def
512{
513private:
514 /* No extra fields, but adds invariant: (GET_CODE (X) == SEQUENCE). */
515
516public:
517 /* Get number of elements in sequence. */
518 int len () const;
519
520 /* Get i-th element of the sequence. */
521 rtx element (int index) const;
522
523 /* Get i-th element of the sequence, with a checked cast to
524 rtx_insn *. */
525 rtx_insn *insn (int index) const;
526};
527
528template <>
529template <>
530inline bool
531is_a_helper <rtx_sequence *>::test (rtx rt)
532{
533 return rt->code == SEQUENCE;
534}
535
536template <>
537template <>
538inline bool
539is_a_helper <const rtx_sequence *>::test (const_rtx rt)
540{
541 return rt->code == SEQUENCE;
542}
543
544struct GTY(()) rtx_insn : public rtx_def
545{
546public:
547 /* No extra fields, but adds the invariant:
548
549 (INSN_P (X)
550 || NOTE_P (X)
551 || JUMP_TABLE_DATA_P (X)
552 || BARRIER_P (X)
553 || LABEL_P (X))
554
555 i.e. that we must be able to use the following:
556 INSN_UID ()
557 NEXT_INSN ()
558 PREV_INSN ()
559 i.e. we have an rtx that has an INSN_UID field and can be part of
560 a linked list of insns.
561 */
562
563 /* Returns true if this insn has been deleted. */
564
565 bool deleted () const { return volatil; }
566
567 /* Mark this insn as deleted. */
568
569 void set_deleted () { volatil = true; }
570
571 /* Mark this insn as not deleted. */
572
573 void set_undeleted () { volatil = false; }
574};
575
576/* Subclasses of rtx_insn. */
577
578struct GTY(()) rtx_debug_insn : public rtx_insn
579{
580 /* No extra fields, but adds the invariant:
581 DEBUG_INSN_P (X) aka (GET_CODE (X) == DEBUG_INSN)
582 i.e. an annotation for tracking variable assignments.
583
584 This is an instance of:
585 DEF_RTL_EXPR(DEBUG_INSN, "debug_insn", "uuBeiie", RTX_INSN)
586 from rtl.def. */
587};
588
589struct GTY(()) rtx_nonjump_insn : public rtx_insn
590{
591 /* No extra fields, but adds the invariant:
592 NONJUMP_INSN_P (X) aka (GET_CODE (X) == INSN)
593 i.e an instruction that cannot jump.
594
595 This is an instance of:
596 DEF_RTL_EXPR(INSN, "insn", "uuBeiie", RTX_INSN)
597 from rtl.def. */
598};
599
600struct GTY(()) rtx_jump_insn : public rtx_insn
601{
602public:
603 /* No extra fields, but adds the invariant:
604 JUMP_P (X) aka (GET_CODE (X) == JUMP_INSN)
605 i.e. an instruction that can possibly jump.
606
607 This is an instance of:
608 DEF_RTL_EXPR(JUMP_INSN, "jump_insn", "uuBeiie0", RTX_INSN)
609 from rtl.def. */
610
611 /* Returns jump target of this instruction. The returned value is not
612 necessarily a code label: it may also be a RETURN or SIMPLE_RETURN
613 expression. Also, when the code label is marked "deleted", it is
614 replaced by a NOTE. In some cases the value is NULL_RTX. */
615
616 inline rtx jump_label () const;
617
618 /* Returns jump target cast to rtx_code_label *. */
619
620 inline rtx_code_label *jump_target () const;
621
622 /* Set jump target. */
623
624 inline void set_jump_target (rtx_code_label *);
625};
626
627struct GTY(()) rtx_call_insn : public rtx_insn
628{
629 /* No extra fields, but adds the invariant:
630 CALL_P (X) aka (GET_CODE (X) == CALL_INSN)
631 i.e. an instruction that can possibly call a subroutine
632 but which will not change which instruction comes next
633 in the current function.
634
635 This is an instance of:
636 DEF_RTL_EXPR(CALL_INSN, "call_insn", "uuBeiiee", RTX_INSN)
637 from rtl.def. */
638};
639
640struct GTY(()) rtx_jump_table_data : public rtx_insn
641{
642 /* No extra fields, but adds the invariant:
643 JUMP_TABLE_DATA_P (X) aka (GET_CODE (INSN) == JUMP_TABLE_DATA)
644 i.e. a data for a jump table, considered an instruction for
645 historical reasons.
646
647 This is an instance of:
648 DEF_RTL_EXPR(JUMP_TABLE_DATA, "jump_table_data", "uuBe0000", RTX_INSN)
649 from rtl.def. */
650
651 /* This can be either:
652
653 (a) a table of absolute jumps, in which case PATTERN (this) is an
654 ADDR_VEC with arg 0 a vector of labels, or
655
656 (b) a table of relative jumps (e.g. for -fPIC), in which case
657 PATTERN (this) is an ADDR_DIFF_VEC, with arg 0 a LABEL_REF and
658 arg 1 the vector of labels.
659
660 This method gets the underlying vec. */
661
662 inline rtvec get_labels () const;
663 inline scalar_int_mode get_data_mode () const;
664};
665
666struct GTY(()) rtx_barrier : public rtx_insn
667{
668 /* No extra fields, but adds the invariant:
669 BARRIER_P (X) aka (GET_CODE (X) == BARRIER)
670 i.e. a marker that indicates that control will not flow through.
671
672 This is an instance of:
673 DEF_RTL_EXPR(BARRIER, "barrier", "uu00000", RTX_EXTRA)
674 from rtl.def. */
675};
676
677struct GTY(()) rtx_code_label : public rtx_insn
678{
679 /* No extra fields, but adds the invariant:
680 LABEL_P (X) aka (GET_CODE (X) == CODE_LABEL)
681 i.e. a label in the assembler.
682
683 This is an instance of:
684 DEF_RTL_EXPR(CODE_LABEL, "code_label", "uuB00is", RTX_EXTRA)
685 from rtl.def. */
686};
687
688struct GTY(()) rtx_note : public rtx_insn
689{
690 /* No extra fields, but adds the invariant:
691 NOTE_P(X) aka (GET_CODE (X) == NOTE)
692 i.e. a note about the corresponding source code.
693
694 This is an instance of:
695 DEF_RTL_EXPR(NOTE, "note", "uuB0ni", RTX_EXTRA)
696 from rtl.def. */
697};
698
699/* The size in bytes of an rtx header (code, mode and flags). */
700#define RTX_HDR_SIZE__builtin_offsetof(struct rtx_def, u) offsetof (struct rtx_def, u)__builtin_offsetof(struct rtx_def, u)
701
702/* The size in bytes of an rtx with code CODE. */
703#define RTX_CODE_SIZE(CODE)rtx_code_size[CODE] rtx_code_size[CODE]
704
705#define NULL_RTX(rtx) 0 (rtx) 0
706
707/* The "next" and "previous" RTX, relative to this one. */
708
709#define RTX_NEXT(X)(rtx_next[((enum rtx_code) (X)->code)] == 0 ? nullptr : *(
rtx *)(((char *)X) + rtx_next[((enum rtx_code) (X)->code)]
))
(rtx_next[GET_CODE (X)((enum rtx_code) (X)->code)] == 0 ? NULLnullptr \
710 : *(rtx *)(((char *)X) + rtx_next[GET_CODE (X)((enum rtx_code) (X)->code)]))
711
712/* FIXME: the "NEXT_INSN (PREV_INSN (X)) == X" condition shouldn't be needed.
713 */
714#define RTX_PREV(X)(((((((enum rtx_code) (X)->code) == INSN) || (((enum rtx_code
) (X)->code) == JUMP_INSN) || (((enum rtx_code) (X)->code
) == CALL_INSN)) || (((enum rtx_code) (X)->code) == DEBUG_INSN
)) || (((enum rtx_code) (X)->code) == NOTE) || (((enum rtx_code
) (X)->code) == JUMP_TABLE_DATA) || (((enum rtx_code) (X)->
code) == BARRIER) || (((enum rtx_code) (X)->code) == CODE_LABEL
)) && PREV_INSN (as_a <rtx_insn *> (X)) != nullptr
&& NEXT_INSN (PREV_INSN (as_a <rtx_insn *> (X)
)) == X ? PREV_INSN (as_a <rtx_insn *> (X)) : nullptr)
((INSN_P (X)(((((enum rtx_code) (X)->code) == INSN) || (((enum rtx_code
) (X)->code) == JUMP_INSN) || (((enum rtx_code) (X)->code
) == CALL_INSN)) || (((enum rtx_code) (X)->code) == DEBUG_INSN
))
\
715 || NOTE_P (X)(((enum rtx_code) (X)->code) == NOTE) \
716 || JUMP_TABLE_DATA_P (X)(((enum rtx_code) (X)->code) == JUMP_TABLE_DATA) \
717 || BARRIER_P (X)(((enum rtx_code) (X)->code) == BARRIER) \
718 || LABEL_P (X)(((enum rtx_code) (X)->code) == CODE_LABEL)) \
719 && PREV_INSN (as_a <rtx_insn *> (X)) != NULLnullptr \
720 && NEXT_INSN (PREV_INSN (as_a <rtx_insn *> (X))) == X \
721 ? PREV_INSN (as_a <rtx_insn *> (X)) : NULLnullptr)
722
723/* Define macros to access the `code' field of the rtx. */
724
725#define GET_CODE(RTX)((enum rtx_code) (RTX)->code) ((enum rtx_code) (RTX)->code)
726#define PUT_CODE(RTX, CODE)((RTX)->code = (CODE)) ((RTX)->code = (CODE))
727
728#define GET_MODE(RTX)((machine_mode) (RTX)->mode) ((machine_mode) (RTX)->mode)
729#define PUT_MODE_RAW(RTX, MODE)((RTX)->mode = (MODE)) ((RTX)->mode = (MODE))
730
731/* RTL vector. These appear inside RTX's when there is a need
732 for a variable number of things. The principle use is inside
733 PARALLEL expressions. */
734
735struct GTY(()) rtvec_def {
736 int num_elem; /* number of elements */
737 rtx GTY ((length ("%h.num_elem"))) elem[1];
738};
739
740#define NULL_RTVEC(rtvec) 0 (rtvec) 0
741
742#define GET_NUM_ELEM(RTVEC)((RTVEC)->num_elem) ((RTVEC)->num_elem)
743#define PUT_NUM_ELEM(RTVEC, NUM)((RTVEC)->num_elem = (NUM)) ((RTVEC)->num_elem = (NUM))
744
745/* Predicate yielding nonzero iff X is an rtx for a register. */
746#define REG_P(X)(((enum rtx_code) (X)->code) == REG) (GET_CODE (X)((enum rtx_code) (X)->code) == REG)
747
748/* Predicate yielding nonzero iff X is an rtx for a memory location. */
749#define MEM_P(X)(((enum rtx_code) (X)->code) == MEM) (GET_CODE (X)((enum rtx_code) (X)->code) == MEM)
750
751#if TARGET_SUPPORTS_WIDE_INT1
752
753/* Match CONST_*s that can represent compile-time constant integers. */
754#define CASE_CONST_SCALAR_INTcase CONST_INT: case CONST_WIDE_INT \
755 case CONST_INT: \
756 case CONST_WIDE_INT
757
758/* Match CONST_*s for which pointer equality corresponds to value
759 equality. */
760#define CASE_CONST_UNIQUEcase CONST_INT: case CONST_WIDE_INT: case CONST_POLY_INT: case
CONST_DOUBLE: case CONST_FIXED
\
761 case CONST_INT: \
762 case CONST_WIDE_INT: \
763 case CONST_POLY_INT: \
764 case CONST_DOUBLE: \
765 case CONST_FIXED
766
767/* Match all CONST_* rtxes. */
768#define CASE_CONST_ANYcase CONST_INT: case CONST_WIDE_INT: case CONST_POLY_INT: case
CONST_DOUBLE: case CONST_FIXED: case CONST_VECTOR
\
769 case CONST_INT: \
770 case CONST_WIDE_INT: \
771 case CONST_POLY_INT: \
772 case CONST_DOUBLE: \
773 case CONST_FIXED: \
774 case CONST_VECTOR
775
776#else
777
778/* Match CONST_*s that can represent compile-time constant integers. */
779#define CASE_CONST_SCALAR_INTcase CONST_INT: case CONST_WIDE_INT \
780 case CONST_INT: \
781 case CONST_DOUBLE
782
783/* Match CONST_*s for which pointer equality corresponds to value
784 equality. */
785#define CASE_CONST_UNIQUEcase CONST_INT: case CONST_WIDE_INT: case CONST_POLY_INT: case
CONST_DOUBLE: case CONST_FIXED
\
786 case CONST_INT: \
787 case CONST_DOUBLE: \
788 case CONST_FIXED
789
790/* Match all CONST_* rtxes. */
791#define CASE_CONST_ANYcase CONST_INT: case CONST_WIDE_INT: case CONST_POLY_INT: case
CONST_DOUBLE: case CONST_FIXED: case CONST_VECTOR
\
792 case CONST_INT: \
793 case CONST_DOUBLE: \
794 case CONST_FIXED: \
795 case CONST_VECTOR
796#endif
797
798/* Predicate yielding nonzero iff X is an rtx for a constant integer. */
799#define CONST_INT_P(X)(((enum rtx_code) (X)->code) == CONST_INT) (GET_CODE (X)((enum rtx_code) (X)->code) == CONST_INT)
800
801/* Predicate yielding nonzero iff X is an rtx for a constant integer. */
802#define CONST_WIDE_INT_P(X)(((enum rtx_code) (X)->code) == CONST_WIDE_INT) (GET_CODE (X)((enum rtx_code) (X)->code) == CONST_WIDE_INT)
803
804/* Predicate yielding nonzero iff X is an rtx for a polynomial constant
805 integer. */
806#define CONST_POLY_INT_P(X)(1 > 1 && ((enum rtx_code) (X)->code) == CONST_POLY_INT
)
\
807 (NUM_POLY_INT_COEFFS1 > 1 && GET_CODE (X)((enum rtx_code) (X)->code) == CONST_POLY_INT)
808
809/* Predicate yielding nonzero iff X is an rtx for a constant fixed-point. */
810#define CONST_FIXED_P(X)(((enum rtx_code) (X)->code) == CONST_FIXED) (GET_CODE (X)((enum rtx_code) (X)->code) == CONST_FIXED)
811
812/* Predicate yielding true iff X is an rtx for a double-int
813 or floating point constant. */
814#define CONST_DOUBLE_P(X)(((enum rtx_code) (X)->code) == CONST_DOUBLE) (GET_CODE (X)((enum rtx_code) (X)->code) == CONST_DOUBLE)
815
816/* Predicate yielding true iff X is an rtx for a double-int. */
817#define CONST_DOUBLE_AS_INT_P(X)(((enum rtx_code) (X)->code) == CONST_DOUBLE && ((
machine_mode) (X)->mode) == ((void) 0, E_VOIDmode))
\
818 (GET_CODE (X)((enum rtx_code) (X)->code) == CONST_DOUBLE && GET_MODE (X)((machine_mode) (X)->mode) == VOIDmode((void) 0, E_VOIDmode))
819
820/* Predicate yielding true iff X is an rtx for a integer const. */
821#if TARGET_SUPPORTS_WIDE_INT1
822#define CONST_SCALAR_INT_P(X)((((enum rtx_code) (X)->code) == CONST_INT) || (((enum rtx_code
) (X)->code) == CONST_WIDE_INT))
\
823 (CONST_INT_P (X)(((enum rtx_code) (X)->code) == CONST_INT) || CONST_WIDE_INT_P (X)(((enum rtx_code) (X)->code) == CONST_WIDE_INT))
824#else
825#define CONST_SCALAR_INT_P(X)((((enum rtx_code) (X)->code) == CONST_INT) || (((enum rtx_code
) (X)->code) == CONST_WIDE_INT))
\
826 (CONST_INT_P (X)(((enum rtx_code) (X)->code) == CONST_INT) || CONST_DOUBLE_AS_INT_P (X)(((enum rtx_code) (X)->code) == CONST_DOUBLE && ((
machine_mode) (X)->mode) == ((void) 0, E_VOIDmode))
)
827#endif
828
829/* Predicate yielding true iff X is an rtx for a double-int. */
830#define CONST_DOUBLE_AS_FLOAT_P(X)(((enum rtx_code) (X)->code) == CONST_DOUBLE && ((
machine_mode) (X)->mode) != ((void) 0, E_VOIDmode))
\
831 (GET_CODE (X)((enum rtx_code) (X)->code) == CONST_DOUBLE && GET_MODE (X)((machine_mode) (X)->mode) != VOIDmode((void) 0, E_VOIDmode))
832
833/* Predicate yielding nonzero iff X is an rtx for a constant vector. */
834#define CONST_VECTOR_P(X)(((enum rtx_code) (X)->code) == CONST_VECTOR) (GET_CODE (X)((enum rtx_code) (X)->code) == CONST_VECTOR)
835
836/* Predicate yielding nonzero iff X is a label insn. */
837#define LABEL_P(X)(((enum rtx_code) (X)->code) == CODE_LABEL) (GET_CODE (X)((enum rtx_code) (X)->code) == CODE_LABEL)
838
839/* Predicate yielding nonzero iff X is a jump insn. */
840#define JUMP_P(X)(((enum rtx_code) (X)->code) == JUMP_INSN) (GET_CODE (X)((enum rtx_code) (X)->code) == JUMP_INSN)
841
842/* Predicate yielding nonzero iff X is a call insn. */
843#define CALL_P(X)(((enum rtx_code) (X)->code) == CALL_INSN) (GET_CODE (X)((enum rtx_code) (X)->code) == CALL_INSN)
844
845/* 1 if RTX is a call_insn for a fake call.
846 CALL_INSN use "used" flag to indicate it's a fake call. */
847#define FAKE_CALL_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CALL_INSN) rtl_check_failed_flag
("FAKE_CALL_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 847, __FUNCTION__); _rtx; })->used)
\
848 (RTL_FLAG_CHECK1 ("FAKE_CALL_P", (RTX), CALL_INSN)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != CALL_INSN) rtl_check_failed_flag
("FAKE_CALL_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 848, __FUNCTION__); _rtx; })
->used)
849
850/* Predicate yielding nonzero iff X is an insn that cannot jump. */
851#define NONJUMP_INSN_P(X)(((enum rtx_code) (X)->code) == INSN) (GET_CODE (X)((enum rtx_code) (X)->code) == INSN)
852
853/* Predicate yielding nonzero iff X is a debug note/insn. */
854#define DEBUG_INSN_P(X)(((enum rtx_code) (X)->code) == DEBUG_INSN) (GET_CODE (X)((enum rtx_code) (X)->code) == DEBUG_INSN)
855
856/* Predicate yielding nonzero iff X is an insn that is not a debug insn. */
857#define NONDEBUG_INSN_P(X)((((enum rtx_code) (X)->code) == INSN) || (((enum rtx_code
) (X)->code) == JUMP_INSN) || (((enum rtx_code) (X)->code
) == CALL_INSN))
(NONJUMP_INSN_P (X)(((enum rtx_code) (X)->code) == INSN) || JUMP_P (X)(((enum rtx_code) (X)->code) == JUMP_INSN) || CALL_P (X)(((enum rtx_code) (X)->code) == CALL_INSN))
858
859/* Nonzero if DEBUG_MARKER_INSN_P may possibly hold. */
860#define MAY_HAVE_DEBUG_MARKER_INSNSglobal_options.x_debug_nonbind_markers_p debug_nonbind_markers_pglobal_options.x_debug_nonbind_markers_p
861/* Nonzero if DEBUG_BIND_INSN_P may possibly hold. */
862#define MAY_HAVE_DEBUG_BIND_INSNSglobal_options.x_flag_var_tracking_assignments flag_var_tracking_assignmentsglobal_options.x_flag_var_tracking_assignments
863/* Nonzero if DEBUG_INSN_P may possibly hold. */
864#define MAY_HAVE_DEBUG_INSNS(global_options.x_debug_nonbind_markers_p || global_options.x_flag_var_tracking_assignments
)
\
865 (MAY_HAVE_DEBUG_MARKER_INSNSglobal_options.x_debug_nonbind_markers_p || MAY_HAVE_DEBUG_BIND_INSNSglobal_options.x_flag_var_tracking_assignments)
866
867/* Predicate yielding nonzero iff X is a real insn. */
868#define INSN_P(X)(((((enum rtx_code) (X)->code) == INSN) || (((enum rtx_code
) (X)->code) == JUMP_INSN) || (((enum rtx_code) (X)->code
) == CALL_INSN)) || (((enum rtx_code) (X)->code) == DEBUG_INSN
))
(NONDEBUG_INSN_P (X)((((enum rtx_code) (X)->code) == INSN) || (((enum rtx_code
) (X)->code) == JUMP_INSN) || (((enum rtx_code) (X)->code
) == CALL_INSN))
|| DEBUG_INSN_P (X)(((enum rtx_code) (X)->code) == DEBUG_INSN))
869
870/* Predicate yielding nonzero iff X is a note insn. */
871#define NOTE_P(X)(((enum rtx_code) (X)->code) == NOTE) (GET_CODE (X)((enum rtx_code) (X)->code) == NOTE)
872
873/* Predicate yielding nonzero iff X is a barrier insn. */
874#define BARRIER_P(X)(((enum rtx_code) (X)->code) == BARRIER) (GET_CODE (X)((enum rtx_code) (X)->code) == BARRIER)
875
876/* Predicate yielding nonzero iff X is a data for a jump table. */
877#define JUMP_TABLE_DATA_P(INSN)(((enum rtx_code) (INSN)->code) == JUMP_TABLE_DATA) (GET_CODE (INSN)((enum rtx_code) (INSN)->code) == JUMP_TABLE_DATA)
878
879/* Predicate yielding nonzero iff RTX is a subreg. */
880#define SUBREG_P(RTX)(((enum rtx_code) (RTX)->code) == SUBREG) (GET_CODE (RTX)((enum rtx_code) (RTX)->code) == SUBREG)
881
882/* Predicate yielding true iff RTX is a symbol ref. */
883#define SYMBOL_REF_P(RTX)(((enum rtx_code) (RTX)->code) == SYMBOL_REF) (GET_CODE (RTX)((enum rtx_code) (RTX)->code) == SYMBOL_REF)
884
885template <>
886template <>
887inline bool
888is_a_helper <rtx_insn *>::test (rtx rt)
889{
890 return (INSN_P (rt)(((((enum rtx_code) (rt)->code) == INSN) || (((enum rtx_code
) (rt)->code) == JUMP_INSN) || (((enum rtx_code) (rt)->
code) == CALL_INSN)) || (((enum rtx_code) (rt)->code) == DEBUG_INSN
))
891 || NOTE_P (rt)(((enum rtx_code) (rt)->code) == NOTE)
892 || JUMP_TABLE_DATA_P (rt)(((enum rtx_code) (rt)->code) == JUMP_TABLE_DATA)
893 || BARRIER_P (rt)(((enum rtx_code) (rt)->code) == BARRIER)
894 || LABEL_P (rt)(((enum rtx_code) (rt)->code) == CODE_LABEL));
895}
896
897template <>
898template <>
899inline bool
900is_a_helper <const rtx_insn *>::test (const_rtx rt)
901{
902 return (INSN_P (rt)(((((enum rtx_code) (rt)->code) == INSN) || (((enum rtx_code
) (rt)->code) == JUMP_INSN) || (((enum rtx_code) (rt)->
code) == CALL_INSN)) || (((enum rtx_code) (rt)->code) == DEBUG_INSN
))
903 || NOTE_P (rt)(((enum rtx_code) (rt)->code) == NOTE)
904 || JUMP_TABLE_DATA_P (rt)(((enum rtx_code) (rt)->code) == JUMP_TABLE_DATA)
905 || BARRIER_P (rt)(((enum rtx_code) (rt)->code) == BARRIER)
906 || LABEL_P (rt)(((enum rtx_code) (rt)->code) == CODE_LABEL));
907}
908
909template <>
910template <>
911inline bool
912is_a_helper <rtx_debug_insn *>::test (rtx rt)
913{
914 return DEBUG_INSN_P (rt)(((enum rtx_code) (rt)->code) == DEBUG_INSN);
915}
916
917template <>
918template <>
919inline bool
920is_a_helper <rtx_nonjump_insn *>::test (rtx rt)
921{
922 return NONJUMP_INSN_P (rt)(((enum rtx_code) (rt)->code) == INSN);
923}
924
925template <>
926template <>
927inline bool
928is_a_helper <rtx_jump_insn *>::test (rtx rt)
929{
930 return JUMP_P (rt)(((enum rtx_code) (rt)->code) == JUMP_INSN);
931}
932
933template <>
934template <>
935inline bool
936is_a_helper <rtx_jump_insn *>::test (rtx_insn *insn)
937{
938 return JUMP_P (insn)(((enum rtx_code) (insn)->code) == JUMP_INSN);
939}
940
941template <>
942template <>
943inline bool
944is_a_helper <rtx_call_insn *>::test (rtx rt)
945{
946 return CALL_P (rt)(((enum rtx_code) (rt)->code) == CALL_INSN);
947}
948
949template <>
950template <>
951inline bool
952is_a_helper <rtx_call_insn *>::test (rtx_insn *insn)
953{
954 return CALL_P (insn)(((enum rtx_code) (insn)->code) == CALL_INSN);
955}
956
957template <>
958template <>
959inline bool
960is_a_helper <rtx_jump_table_data *>::test (rtx rt)
961{
962 return JUMP_TABLE_DATA_P (rt)(((enum rtx_code) (rt)->code) == JUMP_TABLE_DATA);
963}
964
965template <>
966template <>
967inline bool
968is_a_helper <rtx_jump_table_data *>::test (rtx_insn *insn)
969{
970 return JUMP_TABLE_DATA_P (insn)(((enum rtx_code) (insn)->code) == JUMP_TABLE_DATA);
971}
972
973template <>
974template <>
975inline bool
976is_a_helper <rtx_barrier *>::test (rtx rt)
977{
978 return BARRIER_P (rt)(((enum rtx_code) (rt)->code) == BARRIER);
979}
980
981template <>
982template <>
983inline bool
984is_a_helper <rtx_code_label *>::test (rtx rt)
985{
986 return LABEL_P (rt)(((enum rtx_code) (rt)->code) == CODE_LABEL);
987}
988
989template <>
990template <>
991inline bool
992is_a_helper <rtx_code_label *>::test (rtx_insn *insn)
993{
994 return LABEL_P (insn)(((enum rtx_code) (insn)->code) == CODE_LABEL);
995}
996
997template <>
998template <>
999inline bool
1000is_a_helper <rtx_note *>::test (rtx rt)
1001{
1002 return NOTE_P (rt)(((enum rtx_code) (rt)->code) == NOTE);
1003}
1004
1005template <>
1006template <>
1007inline bool
1008is_a_helper <rtx_note *>::test (rtx_insn *insn)
1009{
1010 return NOTE_P (insn)(((enum rtx_code) (insn)->code) == NOTE);
1011}
1012
1013/* Predicate yielding nonzero iff X is a return or simple_return. */
1014#define ANY_RETURN_P(X)(((enum rtx_code) (X)->code) == RETURN || ((enum rtx_code)
(X)->code) == SIMPLE_RETURN)
\
1015 (GET_CODE (X)((enum rtx_code) (X)->code) == RETURN || GET_CODE (X)((enum rtx_code) (X)->code) == SIMPLE_RETURN)
1016
1017/* 1 if X is a unary operator. */
1018
1019#define UNARY_P(X)((rtx_class[(int) (((enum rtx_code) (X)->code))]) == RTX_UNARY
)
\
1020 (GET_RTX_CLASS (GET_CODE (X))(rtx_class[(int) (((enum rtx_code) (X)->code))]) == RTX_UNARY)
1021
1022/* 1 if X is a binary operator. */
1023
1024#define BINARY_P(X)(((rtx_class[(int) (((enum rtx_code) (X)->code))]) & (
~3)) == (RTX_COMPARE & (~3)))
\
1025 ((GET_RTX_CLASS (GET_CODE (X))(rtx_class[(int) (((enum rtx_code) (X)->code))]) & RTX_BINARY_MASK(~3)) == RTX_BINARY_RESULT(RTX_COMPARE & (~3)))
1026
1027/* 1 if X is an arithmetic operator. */
1028
1029#define ARITHMETIC_P(X)(((rtx_class[(int) (((enum rtx_code) (X)->code))]) & (
~1)) == (RTX_COMM_ARITH & (~1)))
\
1030 ((GET_RTX_CLASS (GET_CODE (X))(rtx_class[(int) (((enum rtx_code) (X)->code))]) & RTX_ARITHMETIC_MASK(~1)) \
1031 == RTX_ARITHMETIC_RESULT(RTX_COMM_ARITH & (~1)))
1032
1033/* 1 if X is an arithmetic operator. */
1034
1035#define COMMUTATIVE_ARITH_P(X)((rtx_class[(int) (((enum rtx_code) (X)->code))]) == RTX_COMM_ARITH
)
\
1036 (GET_RTX_CLASS (GET_CODE (X))(rtx_class[(int) (((enum rtx_code) (X)->code))]) == RTX_COMM_ARITH)
1037
1038/* 1 if X is a commutative arithmetic operator or a comparison operator.
1039 These two are sometimes selected together because it is possible to
1040 swap the two operands. */
1041
1042#define SWAPPABLE_OPERANDS_P(X)((1 << (rtx_class[(int) (((enum rtx_code) (X)->code)
)])) & ((1 << RTX_COMM_ARITH) | (1 << RTX_COMM_COMPARE
) | (1 << RTX_COMPARE)))
\
1043 ((1 << GET_RTX_CLASS (GET_CODE (X))(rtx_class[(int) (((enum rtx_code) (X)->code))])) \
1044 & ((1 << RTX_COMM_ARITH) | (1 << RTX_COMM_COMPARE) \
1045 | (1 << RTX_COMPARE)))
1046
1047/* 1 if X is a non-commutative operator. */
1048
1049#define NON_COMMUTATIVE_P(X)(((rtx_class[(int) (((enum rtx_code) (X)->code))]) & (
~2)) == (RTX_COMPARE & (~2)))
\
1050 ((GET_RTX_CLASS (GET_CODE (X))(rtx_class[(int) (((enum rtx_code) (X)->code))]) & RTX_COMMUTATIVE_MASK(~2)) \
1051 == RTX_NON_COMMUTATIVE_RESULT(RTX_COMPARE & (~2)))
1052
1053/* 1 if X is a commutative operator on integers. */
1054
1055#define COMMUTATIVE_P(X)(((rtx_class[(int) (((enum rtx_code) (X)->code))]) & (
~2)) == (RTX_COMM_COMPARE & (~2)))
\
1056 ((GET_RTX_CLASS (GET_CODE (X))(rtx_class[(int) (((enum rtx_code) (X)->code))]) & RTX_COMMUTATIVE_MASK(~2)) \
1057 == RTX_COMMUTATIVE_RESULT(RTX_COMM_COMPARE & (~2)))
1058
1059/* 1 if X is a relational operator. */
1060
1061#define COMPARISON_P(X)(((rtx_class[(int) (((enum rtx_code) (X)->code))]) & (
~1)) == (RTX_COMPARE & (~1)))
\
1062 ((GET_RTX_CLASS (GET_CODE (X))(rtx_class[(int) (((enum rtx_code) (X)->code))]) & RTX_COMPARE_MASK(~1)) == RTX_COMPARE_RESULT(RTX_COMPARE & (~1)))
1063
1064/* 1 if X is a constant value that is an integer. */
1065
1066#define CONSTANT_P(X)((rtx_class[(int) (((enum rtx_code) (X)->code))]) == RTX_CONST_OBJ
)
\
1067 (GET_RTX_CLASS (GET_CODE (X))(rtx_class[(int) (((enum rtx_code) (X)->code))]) == RTX_CONST_OBJ)
1068
1069/* 1 if X is a LABEL_REF. */
1070#define LABEL_REF_P(X)(((enum rtx_code) (X)->code) == LABEL_REF) \
1071 (GET_CODE (X)((enum rtx_code) (X)->code) == LABEL_REF)
1072
1073/* 1 if X can be used to represent an object. */
1074#define OBJECT_P(X)(((rtx_class[(int) (((enum rtx_code) (X)->code))]) & (
~1)) == (RTX_OBJ & (~1)))
\
1075 ((GET_RTX_CLASS (GET_CODE (X))(rtx_class[(int) (((enum rtx_code) (X)->code))]) & RTX_OBJ_MASK(~1)) == RTX_OBJ_RESULT(RTX_OBJ & (~1)))
1076
1077/* General accessor macros for accessing the fields of an rtx. */
1078
1079#if defined ENABLE_RTL_CHECKING && (GCC_VERSION(4 * 1000 + 2) >= 2007)
1080/* The bit with a star outside the statement expr and an & inside is
1081 so that N can be evaluated only once. */
1082#define RTL_CHECK1(RTX, N, C1)((RTX)->u.fld[N]) __extension__ \
1083(*({ __typeof (RTX) const _rtx = (RTX); const int _n = (N); \
1084 const enum rtx_code _code = GET_CODE (_rtx)((enum rtx_code) (_rtx)->code); \
1085 if (_n < 0 || _n >= GET_RTX_LENGTH (_code)(rtx_length[(int) (_code)])) \
1086 rtl_check_failed_bounds (_rtx, _n, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1086, \
1087 __FUNCTION__); \
1088 if (GET_RTX_FORMAT (_code)(rtx_format[(int) (_code)])[_n] != C1) \
1089 rtl_check_failed_type1 (_rtx, _n, C1, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1089, \
1090 __FUNCTION__); \
1091 &_rtx->u.fld[_n]; }))
1092
1093#define RTL_CHECK2(RTX, N, C1, C2)((RTX)->u.fld[N]) __extension__ \
1094(*({ __typeof (RTX) const _rtx = (RTX); const int _n = (N); \
1095 const enum rtx_code _code = GET_CODE (_rtx)((enum rtx_code) (_rtx)->code); \
1096 if (_n < 0 || _n >= GET_RTX_LENGTH (_code)(rtx_length[(int) (_code)])) \
1097 rtl_check_failed_bounds (_rtx, _n, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1097, \
1098 __FUNCTION__); \
1099 if (GET_RTX_FORMAT (_code)(rtx_format[(int) (_code)])[_n] != C1 \
1100 && GET_RTX_FORMAT (_code)(rtx_format[(int) (_code)])[_n] != C2) \
1101 rtl_check_failed_type2 (_rtx, _n, C1, C2, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1101, \
1102 __FUNCTION__); \
1103 &_rtx->u.fld[_n]; }))
1104
1105#define RTL_CHECKC1(RTX, N, C)((RTX)->u.fld[N]) __extension__ \
1106(*({ __typeof (RTX) const _rtx = (RTX); const int _n = (N); \
1107 if (GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != (C)) \
1108 rtl_check_failed_code1 (_rtx, (C), __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1108, \
1109 __FUNCTION__); \
1110 &_rtx->u.fld[_n]; }))
1111
1112#define RTL_CHECKC2(RTX, N, C1, C2)((RTX)->u.fld[N]) __extension__ \
1113(*({ __typeof (RTX) const _rtx = (RTX); const int _n = (N); \
1114 const enum rtx_code _code = GET_CODE (_rtx)((enum rtx_code) (_rtx)->code); \
1115 if (_code != (C1) && _code != (C2)) \
1116 rtl_check_failed_code2 (_rtx, (C1), (C2), __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1116, \
1117 __FUNCTION__); \
1118 &_rtx->u.fld[_n]; }))
1119
1120#define RTL_CHECKC3(RTX, N, C1, C2, C3)((RTX)->u.fld[N]) __extension__ \
1121(*({ __typeof (RTX) const _rtx = (RTX); const int _n = (N); \
1122 const enum rtx_code _code = GET_CODE (_rtx)((enum rtx_code) (_rtx)->code); \
1123 if (_code != (C1) && _code != (C2) && _code != (C3)) \
1124 rtl_check_failed_code3 (_rtx, (C1), (C2), (C3), __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", \
1125 __LINE__1125, __FUNCTION__); \
1126 &_rtx->u.fld[_n]; }))
1127
1128#define RTVEC_ELT(RTVEC, I)((RTVEC)->elem[I]) __extension__ \
1129(*({ __typeof (RTVEC) const _rtvec = (RTVEC); const int _i = (I); \
1130 if (_i < 0 || _i >= GET_NUM_ELEM (_rtvec)((_rtvec)->num_elem)) \
1131 rtvec_check_failed_bounds (_rtvec, _i, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1131, \
1132 __FUNCTION__); \
1133 &_rtvec->elem[_i]; }))
1134
1135#define XWINT(RTX, N)((RTX)->u.hwint[N]) __extension__ \
1136(*({ __typeof (RTX) const _rtx = (RTX); const int _n = (N); \
1137 const enum rtx_code _code = GET_CODE (_rtx)((enum rtx_code) (_rtx)->code); \
1138 if (_n < 0 || _n >= GET_RTX_LENGTH (_code)(rtx_length[(int) (_code)])) \
1139 rtl_check_failed_bounds (_rtx, _n, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1139, \
1140 __FUNCTION__); \
1141 if (GET_RTX_FORMAT (_code)(rtx_format[(int) (_code)])[_n] != 'w') \
1142 rtl_check_failed_type1 (_rtx, _n, 'w', __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1142, \
1143 __FUNCTION__); \
1144 &_rtx->u.hwint[_n]; }))
1145
1146#define CWI_ELT(RTX, I)((RTX)->u.hwiv.elem[I]) __extension__ \
1147(*({ __typeof (RTX) const _cwi = (RTX); \
1148 int _max = CWI_GET_NUM_ELEM (_cwi)((int)__extension__ ({ __typeof ((_cwi)) const _rtx = ((_cwi)
); if (((enum rtx_code) (_rtx)->code) != CONST_WIDE_INT) rtl_check_failed_flag
("CWI_GET_NUM_ELEM", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1148, __FUNCTION__); _rtx; })->u2.num_elem)
; \
1149 const int _i = (I); \
1150 if (_i < 0 || _i >= _max) \
1151 cwi_check_failed_bounds (_cwi, _i, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1151, \
1152 __FUNCTION__); \
1153 &_cwi->u.hwiv.elem[_i]; }))
1154
1155#define XCWINT(RTX, N, C)((RTX)->u.hwint[N]) __extension__ \
1156(*({ __typeof (RTX) const _rtx = (RTX); \
1157 if (GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != (C)) \
1158 rtl_check_failed_code1 (_rtx, (C), __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1158, \
1159 __FUNCTION__); \
1160 &_rtx->u.hwint[N]; }))
1161
1162#define XCMWINT(RTX, N, C, M)((RTX)->u.hwint[N]) __extension__ \
1163(*({ __typeof (RTX) const _rtx = (RTX); \
1164 if (GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != (C) || GET_MODE (_rtx)((machine_mode) (_rtx)->mode) != (M)) \
1165 rtl_check_failed_code_mode (_rtx, (C), (M), false, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", \
1166 __LINE__1166, __FUNCTION__); \
1167 &_rtx->u.hwint[N]; }))
1168
1169#define XCNMPRV(RTX, C, M)(&(RTX)->u.rv) __extension__ \
1170({ __typeof (RTX) const _rtx = (RTX); \
1171 if (GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != (C) || GET_MODE (_rtx)((machine_mode) (_rtx)->mode) == (M)) \
1172 rtl_check_failed_code_mode (_rtx, (C), (M), true, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", \
1173 __LINE__1173, __FUNCTION__); \
1174 &_rtx->u.rv; })
1175
1176#define XCNMPFV(RTX, C, M)(&(RTX)->u.fv) __extension__ \
1177({ __typeof (RTX) const _rtx = (RTX); \
1178 if (GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != (C) || GET_MODE (_rtx)((machine_mode) (_rtx)->mode) == (M)) \
1179 rtl_check_failed_code_mode (_rtx, (C), (M), true, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", \
1180 __LINE__1180, __FUNCTION__); \
1181 &_rtx->u.fv; })
1182
1183#define REG_CHECK(RTX)(&(RTX)->u.reg) __extension__ \
1184({ __typeof (RTX) const _rtx = (RTX); \
1185 if (GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != REG) \
1186 rtl_check_failed_code1 (_rtx, REG, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1186, \
1187 __FUNCTION__); \
1188 &_rtx->u.reg; })
1189
1190#define BLOCK_SYMBOL_CHECK(RTX)(&(RTX)->u.block_sym) __extension__ \
1191({ __typeof (RTX) const _symbol = (RTX); \
1192 const unsigned int flags = SYMBOL_REF_FLAGS (_symbol)(__extension__ ({ __typeof ((_symbol)) const _rtx = ((_symbol
)); if (((enum rtx_code) (_rtx)->code) != SYMBOL_REF) rtl_check_failed_flag
("SYMBOL_REF_FLAGS", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1192, __FUNCTION__); _rtx; }) ->u2.symbol_ref_flags)
; \
1193 if ((flags & SYMBOL_FLAG_HAS_BLOCK_INFO(1 << 7)) == 0) \
1194 rtl_check_failed_block_symbol (__FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1194, \
1195 __FUNCTION__); \
1196 &_symbol->u.block_sym; })
1197
1198#define HWIVEC_CHECK(RTX,C)(&(RTX)->u.hwiv) __extension__ \
1199({ __typeof (RTX) const _symbol = (RTX); \
1200 RTL_CHECKC1 (_symbol, 0, C)((_symbol)->u.fld[0]); \
1201 &_symbol->u.hwiv; })
1202
1203extern void rtl_check_failed_bounds (const_rtx, int, const char *, int,
1204 const char *)
1205 ATTRIBUTE_NORETURN__attribute__ ((__noreturn__)) ATTRIBUTE_COLD;
1206extern void rtl_check_failed_type1 (const_rtx, int, int, const char *, int,
1207 const char *)
1208 ATTRIBUTE_NORETURN__attribute__ ((__noreturn__)) ATTRIBUTE_COLD;
1209extern void rtl_check_failed_type2 (const_rtx, int, int, int, const char *,
1210 int, const char *)
1211 ATTRIBUTE_NORETURN__attribute__ ((__noreturn__)) ATTRIBUTE_COLD;
1212extern void rtl_check_failed_code1 (const_rtx, enum rtx_code, const char *,
1213 int, const char *)
1214 ATTRIBUTE_NORETURN__attribute__ ((__noreturn__)) ATTRIBUTE_COLD;
1215extern void rtl_check_failed_code2 (const_rtx, enum rtx_code, enum rtx_code,
1216 const char *, int, const char *)
1217 ATTRIBUTE_NORETURN__attribute__ ((__noreturn__)) ATTRIBUTE_COLD;
1218extern void rtl_check_failed_code3 (const_rtx, enum rtx_code, enum rtx_code,
1219 enum rtx_code, const char *, int,
1220 const char *)
1221 ATTRIBUTE_NORETURN__attribute__ ((__noreturn__)) ATTRIBUTE_COLD;
1222extern void rtl_check_failed_code_mode (const_rtx, enum rtx_code, machine_mode,
1223 bool, const char *, int, const char *)
1224 ATTRIBUTE_NORETURN__attribute__ ((__noreturn__)) ATTRIBUTE_COLD;
1225extern void rtl_check_failed_block_symbol (const char *, int, const char *)
1226 ATTRIBUTE_NORETURN__attribute__ ((__noreturn__)) ATTRIBUTE_COLD;
1227extern void cwi_check_failed_bounds (const_rtx, int, const char *, int,
1228 const char *)
1229 ATTRIBUTE_NORETURN__attribute__ ((__noreturn__)) ATTRIBUTE_COLD;
1230extern void rtvec_check_failed_bounds (const_rtvec, int, const char *, int,
1231 const char *)
1232 ATTRIBUTE_NORETURN__attribute__ ((__noreturn__)) ATTRIBUTE_COLD;
1233
1234#else /* not ENABLE_RTL_CHECKING */
1235
1236#define RTL_CHECK1(RTX, N, C1)((RTX)->u.fld[N]) ((RTX)->u.fld[N])
1237#define RTL_CHECK2(RTX, N, C1, C2)((RTX)->u.fld[N]) ((RTX)->u.fld[N])
1238#define RTL_CHECKC1(RTX, N, C)((RTX)->u.fld[N]) ((RTX)->u.fld[N])
1239#define RTL_CHECKC2(RTX, N, C1, C2)((RTX)->u.fld[N]) ((RTX)->u.fld[N])
1240#define RTL_CHECKC3(RTX, N, C1, C2, C3)((RTX)->u.fld[N]) ((RTX)->u.fld[N])
1241#define RTVEC_ELT(RTVEC, I)((RTVEC)->elem[I]) ((RTVEC)->elem[I])
1242#define XWINT(RTX, N)((RTX)->u.hwint[N]) ((RTX)->u.hwint[N])
1243#define CWI_ELT(RTX, I)((RTX)->u.hwiv.elem[I]) ((RTX)->u.hwiv.elem[I])
1244#define XCWINT(RTX, N, C)((RTX)->u.hwint[N]) ((RTX)->u.hwint[N])
1245#define XCMWINT(RTX, N, C, M)((RTX)->u.hwint[N]) ((RTX)->u.hwint[N])
1246#define XCNMWINT(RTX, N, C, M)((RTX)->u.hwint[N]) ((RTX)->u.hwint[N])
1247#define XCNMPRV(RTX, C, M)(&(RTX)->u.rv) (&(RTX)->u.rv)
1248#define XCNMPFV(RTX, C, M)(&(RTX)->u.fv) (&(RTX)->u.fv)
1249#define REG_CHECK(RTX)(&(RTX)->u.reg) (&(RTX)->u.reg)
1250#define BLOCK_SYMBOL_CHECK(RTX)(&(RTX)->u.block_sym) (&(RTX)->u.block_sym)
1251#define HWIVEC_CHECK(RTX,C)(&(RTX)->u.hwiv) (&(RTX)->u.hwiv)
1252
1253#endif
1254
1255/* General accessor macros for accessing the flags of an rtx. */
1256
1257/* Access an individual rtx flag, with no checking of any kind. */
1258#define RTX_FLAG(RTX, FLAG)((RTX)->FLAG) ((RTX)->FLAG)
1259
1260#if defined ENABLE_RTL_FLAG_CHECKING1 && (GCC_VERSION(4 * 1000 + 2) >= 2007)
1261#define RTL_FLAG_CHECK1(NAME, RTX, C1)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (((enum
rtx_code) (_rtx)->code) != C1) rtl_check_failed_flag (NAME
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1261, __FUNCTION__); _rtx; })
__extension__ \
1262({ __typeof (RTX) const _rtx = (RTX); \
1263 if (GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C1) \
1264 rtl_check_failed_flag (NAME, _rtx, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1264, \
1265 __FUNCTION__); \
1266 _rtx; })
1267
1268#define RTL_FLAG_CHECK2(NAME, RTX, C1, C2)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (((enum
rtx_code) (_rtx)->code) != C1 && ((enum rtx_code)
(_rtx)->code) != C2) rtl_check_failed_flag (NAME,_rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1268, __FUNCTION__); _rtx; })
__extension__ \
1269({ __typeof (RTX) const _rtx = (RTX); \
1270 if (GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C1 && GET_CODE(_rtx)((enum rtx_code) (_rtx)->code) != C2) \
1271 rtl_check_failed_flag (NAME,_rtx, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1271, \
1272 __FUNCTION__); \
1273 _rtx; })
1274
1275#define RTL_FLAG_CHECK3(NAME, RTX, C1, C2, C3)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (((enum
rtx_code) (_rtx)->code) != C1 && ((enum rtx_code)
(_rtx)->code) != C2 && ((enum rtx_code) (_rtx)->
code) != C3) rtl_check_failed_flag (NAME, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1275, __FUNCTION__); _rtx; })
__extension__ \
1276({ __typeof (RTX) const _rtx = (RTX); \
1277 if (GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C1 && GET_CODE(_rtx)((enum rtx_code) (_rtx)->code) != C2 \
1278 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C3) \
1279 rtl_check_failed_flag (NAME, _rtx, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1279, \
1280 __FUNCTION__); \
1281 _rtx; })
1282
1283#define RTL_FLAG_CHECK4(NAME, RTX, C1, C2, C3, C4)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (((enum
rtx_code) (_rtx)->code) != C1 && ((enum rtx_code)
(_rtx)->code) != C2 && ((enum rtx_code) (_rtx)->
code) != C3 && ((enum rtx_code) (_rtx)->code) != C4
) rtl_check_failed_flag (NAME, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1283, __FUNCTION__); _rtx; })
__extension__ \
1284({ __typeof (RTX) const _rtx = (RTX); \
1285 if (GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C1 && GET_CODE(_rtx)((enum rtx_code) (_rtx)->code) != C2 \
1286 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C3 && GET_CODE(_rtx)((enum rtx_code) (_rtx)->code) != C4) \
1287 rtl_check_failed_flag (NAME, _rtx, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1287, \
1288 __FUNCTION__); \
1289 _rtx; })
1290
1291#define RTL_FLAG_CHECK5(NAME, RTX, C1, C2, C3, C4, C5)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (((enum
rtx_code) (_rtx)->code) != C1 && ((enum rtx_code)
(_rtx)->code) != C2 && ((enum rtx_code) (_rtx)->
code) != C3 && ((enum rtx_code) (_rtx)->code) != C4
&& ((enum rtx_code) (_rtx)->code) != C5) rtl_check_failed_flag
(NAME, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1291, __FUNCTION__); _rtx; })
__extension__ \
1292({ __typeof (RTX) const _rtx = (RTX); \
1293 if (GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C1 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C2 \
1294 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C3 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C4 \
1295 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C5) \
1296 rtl_check_failed_flag (NAME, _rtx, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1296, \
1297 __FUNCTION__); \
1298 _rtx; })
1299
1300#define RTL_FLAG_CHECK6(NAME, RTX, C1, C2, C3, C4, C5, C6)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (((enum
rtx_code) (_rtx)->code) != C1 && ((enum rtx_code)
(_rtx)->code) != C2 && ((enum rtx_code) (_rtx)->
code) != C3 && ((enum rtx_code) (_rtx)->code) != C4
&& ((enum rtx_code) (_rtx)->code) != C5 &&
((enum rtx_code) (_rtx)->code) != C6) rtl_check_failed_flag
(NAME,_rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1300, __FUNCTION__); _rtx; })
\
1301 __extension__ \
1302({ __typeof (RTX) const _rtx = (RTX); \
1303 if (GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C1 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C2 \
1304 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C3 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C4 \
1305 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C5 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C6) \
1306 rtl_check_failed_flag (NAME,_rtx, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1306, \
1307 __FUNCTION__); \
1308 _rtx; })
1309
1310#define RTL_FLAG_CHECK7(NAME, RTX, C1, C2, C3, C4, C5, C6, C7)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (((enum
rtx_code) (_rtx)->code) != C1 && ((enum rtx_code)
(_rtx)->code) != C2 && ((enum rtx_code) (_rtx)->
code) != C3 && ((enum rtx_code) (_rtx)->code) != C4
&& ((enum rtx_code) (_rtx)->code) != C5 &&
((enum rtx_code) (_rtx)->code) != C6 && ((enum rtx_code
) (_rtx)->code) != C7) rtl_check_failed_flag (NAME, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1310, __FUNCTION__); _rtx; })
\
1311 __extension__ \
1312({ __typeof (RTX) const _rtx = (RTX); \
1313 if (GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C1 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C2 \
1314 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C3 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C4 \
1315 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C5 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C6 \
1316 && GET_CODE (_rtx)((enum rtx_code) (_rtx)->code) != C7) \
1317 rtl_check_failed_flag (NAME, _rtx, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1317, \
1318 __FUNCTION__); \
1319 _rtx; })
1320
1321#define RTL_INSN_CHAIN_FLAG_CHECK(NAME, RTX)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (!((unsigned
long) (((enum rtx_code) (_rtx)->code)) - (unsigned long) (
DEBUG_INSN) <= (unsigned long) (NOTE) - (unsigned long) (DEBUG_INSN
))) rtl_check_failed_flag (NAME, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1321, __FUNCTION__); _rtx; })
\
1322 __extension__ \
1323({ __typeof (RTX) const _rtx = (RTX); \
1324 if (!INSN_CHAIN_CODE_P (GET_CODE (_rtx))((unsigned long) (((enum rtx_code) (_rtx)->code)) - (unsigned
long) (DEBUG_INSN) <= (unsigned long) (NOTE) - (unsigned long
) (DEBUG_INSN))
) \
1325 rtl_check_failed_flag (NAME, _rtx, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1325, \
1326 __FUNCTION__); \
1327 _rtx; })
1328
1329extern void rtl_check_failed_flag (const char *, const_rtx, const char *,
1330 int, const char *)
1331 ATTRIBUTE_NORETURN__attribute__ ((__noreturn__)) ATTRIBUTE_COLD
1332 ;
1333
1334#else /* not ENABLE_RTL_FLAG_CHECKING */
1335
1336#define RTL_FLAG_CHECK1(NAME, RTX, C1)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (((enum
rtx_code) (_rtx)->code) != C1) rtl_check_failed_flag (NAME
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1336, __FUNCTION__); _rtx; })
(RTX)
1337#define RTL_FLAG_CHECK2(NAME, RTX, C1, C2)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (((enum
rtx_code) (_rtx)->code) != C1 && ((enum rtx_code)
(_rtx)->code) != C2) rtl_check_failed_flag (NAME,_rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1337, __FUNCTION__); _rtx; })
(RTX)
1338#define RTL_FLAG_CHECK3(NAME, RTX, C1, C2, C3)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (((enum
rtx_code) (_rtx)->code) != C1 && ((enum rtx_code)
(_rtx)->code) != C2 && ((enum rtx_code) (_rtx)->
code) != C3) rtl_check_failed_flag (NAME, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1338, __FUNCTION__); _rtx; })
(RTX)
1339#define RTL_FLAG_CHECK4(NAME, RTX, C1, C2, C3, C4)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (((enum
rtx_code) (_rtx)->code) != C1 && ((enum rtx_code)
(_rtx)->code) != C2 && ((enum rtx_code) (_rtx)->
code) != C3 && ((enum rtx_code) (_rtx)->code) != C4
) rtl_check_failed_flag (NAME, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1339, __FUNCTION__); _rtx; })
(RTX)
1340#define RTL_FLAG_CHECK5(NAME, RTX, C1, C2, C3, C4, C5)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (((enum
rtx_code) (_rtx)->code) != C1 && ((enum rtx_code)
(_rtx)->code) != C2 && ((enum rtx_code) (_rtx)->
code) != C3 && ((enum rtx_code) (_rtx)->code) != C4
&& ((enum rtx_code) (_rtx)->code) != C5) rtl_check_failed_flag
(NAME, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1340, __FUNCTION__); _rtx; })
(RTX)
1341#define RTL_FLAG_CHECK6(NAME, RTX, C1, C2, C3, C4, C5, C6)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (((enum
rtx_code) (_rtx)->code) != C1 && ((enum rtx_code)
(_rtx)->code) != C2 && ((enum rtx_code) (_rtx)->
code) != C3 && ((enum rtx_code) (_rtx)->code) != C4
&& ((enum rtx_code) (_rtx)->code) != C5 &&
((enum rtx_code) (_rtx)->code) != C6) rtl_check_failed_flag
(NAME,_rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1341, __FUNCTION__); _rtx; })
(RTX)
1342#define RTL_FLAG_CHECK7(NAME, RTX, C1, C2, C3, C4, C5, C6, C7)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (((enum
rtx_code) (_rtx)->code) != C1 && ((enum rtx_code)
(_rtx)->code) != C2 && ((enum rtx_code) (_rtx)->
code) != C3 && ((enum rtx_code) (_rtx)->code) != C4
&& ((enum rtx_code) (_rtx)->code) != C5 &&
((enum rtx_code) (_rtx)->code) != C6 && ((enum rtx_code
) (_rtx)->code) != C7) rtl_check_failed_flag (NAME, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1342, __FUNCTION__); _rtx; })
(RTX)
1343#define RTL_INSN_CHAIN_FLAG_CHECK(NAME, RTX)__extension__ ({ __typeof (RTX) const _rtx = (RTX); if (!((unsigned
long) (((enum rtx_code) (_rtx)->code)) - (unsigned long) (
DEBUG_INSN) <= (unsigned long) (NOTE) - (unsigned long) (DEBUG_INSN
))) rtl_check_failed_flag (NAME, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1343, __FUNCTION__); _rtx; })
(RTX)
1344#endif
1345
1346#define XINT(RTX, N)(((RTX)->u.fld[N]).rt_int) (RTL_CHECK2 (RTX, N, 'i', 'n')((RTX)->u.fld[N]).rt_int)
1347#define XUINT(RTX, N)(((RTX)->u.fld[N]).rt_uint) (RTL_CHECK2 (RTX, N, 'i', 'n')((RTX)->u.fld[N]).rt_uint)
1348#define XSTR(RTX, N)(((RTX)->u.fld[N]).rt_str) (RTL_CHECK2 (RTX, N, 's', 'S')((RTX)->u.fld[N]).rt_str)
1349#define XEXP(RTX, N)(((RTX)->u.fld[N]).rt_rtx) (RTL_CHECK2 (RTX, N, 'e', 'u')((RTX)->u.fld[N]).rt_rtx)
1350#define XVEC(RTX, N)(((RTX)->u.fld[N]).rt_rtvec) (RTL_CHECK2 (RTX, N, 'E', 'V')((RTX)->u.fld[N]).rt_rtvec)
1351#define XMODE(RTX, N)(((RTX)->u.fld[N]).rt_type) (RTL_CHECK1 (RTX, N, 'M')((RTX)->u.fld[N]).rt_type)
1352#define XTREE(RTX, N)(((RTX)->u.fld[N]).rt_tree) (RTL_CHECK1 (RTX, N, 't')((RTX)->u.fld[N]).rt_tree)
1353#define XBBDEF(RTX, N)(((RTX)->u.fld[N]).rt_bb) (RTL_CHECK1 (RTX, N, 'B')((RTX)->u.fld[N]).rt_bb)
1354#define XTMPL(RTX, N)(((RTX)->u.fld[N]).rt_str) (RTL_CHECK1 (RTX, N, 'T')((RTX)->u.fld[N]).rt_str)
1355#define XCFI(RTX, N)(((RTX)->u.fld[N]).rt_cfi) (RTL_CHECK1 (RTX, N, 'C')((RTX)->u.fld[N]).rt_cfi)
1356
1357#define XVECEXP(RTX, N, M)(((((RTX)->u.fld[N]).rt_rtvec))->elem[M]) RTVEC_ELT (XVEC (RTX, N), M)(((((RTX)->u.fld[N]).rt_rtvec))->elem[M])
1358#define XVECLEN(RTX, N)(((((RTX)->u.fld[N]).rt_rtvec))->num_elem) GET_NUM_ELEM (XVEC (RTX, N))(((((RTX)->u.fld[N]).rt_rtvec))->num_elem)
1359
1360/* These are like XINT, etc. except that they expect a '0' field instead
1361 of the normal type code. */
1362
1363#define X0INT(RTX, N)(((RTX)->u.fld[N]).rt_int) (RTL_CHECK1 (RTX, N, '0')((RTX)->u.fld[N]).rt_int)
1364#define X0UINT(RTX, N)(((RTX)->u.fld[N]).rt_uint) (RTL_CHECK1 (RTX, N, '0')((RTX)->u.fld[N]).rt_uint)
1365#define X0STR(RTX, N)(((RTX)->u.fld[N]).rt_str) (RTL_CHECK1 (RTX, N, '0')((RTX)->u.fld[N]).rt_str)
1366#define X0EXP(RTX, N)(((RTX)->u.fld[N]).rt_rtx) (RTL_CHECK1 (RTX, N, '0')((RTX)->u.fld[N]).rt_rtx)
1367#define X0VEC(RTX, N)(((RTX)->u.fld[N]).rt_rtvec) (RTL_CHECK1 (RTX, N, '0')((RTX)->u.fld[N]).rt_rtvec)
1368#define X0MODE(RTX, N)(((RTX)->u.fld[N]).rt_type) (RTL_CHECK1 (RTX, N, '0')((RTX)->u.fld[N]).rt_type)
1369#define X0TREE(RTX, N)(((RTX)->u.fld[N]).rt_tree) (RTL_CHECK1 (RTX, N, '0')((RTX)->u.fld[N]).rt_tree)
1370#define X0BBDEF(RTX, N)(((RTX)->u.fld[N]).rt_bb) (RTL_CHECK1 (RTX, N, '0')((RTX)->u.fld[N]).rt_bb)
1371#define X0ADVFLAGS(RTX, N)(((RTX)->u.fld[N]).rt_addr_diff_vec_flags) (RTL_CHECK1 (RTX, N, '0')((RTX)->u.fld[N]).rt_addr_diff_vec_flags)
1372#define X0CSELIB(RTX, N)(((RTX)->u.fld[N]).rt_cselib) (RTL_CHECK1 (RTX, N, '0')((RTX)->u.fld[N]).rt_cselib)
1373#define X0MEMATTR(RTX, N)(((RTX)->u.fld[N]).rt_mem) (RTL_CHECKC1 (RTX, N, MEM)((RTX)->u.fld[N]).rt_mem)
1374#define X0CONSTANT(RTX, N)(((RTX)->u.fld[N]).rt_constant) (RTL_CHECK1 (RTX, N, '0')((RTX)->u.fld[N]).rt_constant)
1375
1376/* Access a '0' field with any type. */
1377#define X0ANY(RTX, N)((RTX)->u.fld[N]) RTL_CHECK1 (RTX, N, '0')((RTX)->u.fld[N])
1378
1379#define XCINT(RTX, N, C)(((RTX)->u.fld[N]).rt_int) (RTL_CHECKC1 (RTX, N, C)((RTX)->u.fld[N]).rt_int)
1380#define XCUINT(RTX, N, C)(((RTX)->u.fld[N]).rt_uint) (RTL_CHECKC1 (RTX, N, C)((RTX)->u.fld[N]).rt_uint)
1381#define XCSUBREG(RTX, N, C)(((RTX)->u.fld[N]).rt_subreg) (RTL_CHECKC1 (RTX, N, C)((RTX)->u.fld[N]).rt_subreg)
1382#define XCSTR(RTX, N, C)(((RTX)->u.fld[N]).rt_str) (RTL_CHECKC1 (RTX, N, C)((RTX)->u.fld[N]).rt_str)
1383#define XCEXP(RTX, N, C)(((RTX)->u.fld[N]).rt_rtx) (RTL_CHECKC1 (RTX, N, C)((RTX)->u.fld[N]).rt_rtx)
1384#define XCVEC(RTX, N, C)(((RTX)->u.fld[N]).rt_rtvec) (RTL_CHECKC1 (RTX, N, C)((RTX)->u.fld[N]).rt_rtvec)
1385#define XCMODE(RTX, N, C)(((RTX)->u.fld[N]).rt_type) (RTL_CHECKC1 (RTX, N, C)((RTX)->u.fld[N]).rt_type)
1386#define XCTREE(RTX, N, C)(((RTX)->u.fld[N]).rt_tree) (RTL_CHECKC1 (RTX, N, C)((RTX)->u.fld[N]).rt_tree)
1387#define XCBBDEF(RTX, N, C)(((RTX)->u.fld[N]).rt_bb) (RTL_CHECKC1 (RTX, N, C)((RTX)->u.fld[N]).rt_bb)
1388#define XCCFI(RTX, N, C)(((RTX)->u.fld[N]).rt_cfi) (RTL_CHECKC1 (RTX, N, C)((RTX)->u.fld[N]).rt_cfi)
1389#define XCCSELIB(RTX, N, C)(((RTX)->u.fld[N]).rt_cselib) (RTL_CHECKC1 (RTX, N, C)((RTX)->u.fld[N]).rt_cselib)
1390
1391#define XCVECEXP(RTX, N, M, C)(((((RTX)->u.fld[N]).rt_rtvec))->elem[M]) RTVEC_ELT (XCVEC (RTX, N, C), M)(((((RTX)->u.fld[N]).rt_rtvec))->elem[M])
1392#define XCVECLEN(RTX, N, C)(((((RTX)->u.fld[N]).rt_rtvec))->num_elem) GET_NUM_ELEM (XCVEC (RTX, N, C))(((((RTX)->u.fld[N]).rt_rtvec))->num_elem)
1393
1394#define XC2EXP(RTX, N, C1, C2)(((RTX)->u.fld[N]).rt_rtx) (RTL_CHECKC2 (RTX, N, C1, C2)((RTX)->u.fld[N]).rt_rtx)
1395#define XC3EXP(RTX, N, C1, C2, C3)(((RTX)->u.fld[N]).rt_rtx) (RTL_CHECKC3 (RTX, N, C1, C2, C3)((RTX)->u.fld[N]).rt_rtx)
1396
1397
1398/* Methods of rtx_expr_list. */
1399
1400inline rtx_expr_list *rtx_expr_list::next () const
1401{
1402 rtx tmp = XEXP (this, 1)(((this)->u.fld[1]).rt_rtx);
1403 return safe_as_a <rtx_expr_list *> (tmp);
1404}
1405
1406inline rtx rtx_expr_list::element () const
1407{
1408 return XEXP (this, 0)(((this)->u.fld[0]).rt_rtx);
1409}
1410
1411/* Methods of rtx_insn_list. */
1412
1413inline rtx_insn_list *rtx_insn_list::next () const
1414{
1415 rtx tmp = XEXP (this, 1)(((this)->u.fld[1]).rt_rtx);
1416 return safe_as_a <rtx_insn_list *> (tmp);
1417}
1418
1419inline rtx_insn *rtx_insn_list::insn () const
1420{
1421 rtx tmp = XEXP (this, 0)(((this)->u.fld[0]).rt_rtx);
1422 return safe_as_a <rtx_insn *> (tmp);
1423}
1424
1425/* Methods of rtx_sequence. */
1426
1427inline int rtx_sequence::len () const
1428{
1429 return XVECLEN (this, 0)(((((this)->u.fld[0]).rt_rtvec))->num_elem);
1430}
1431
1432inline rtx rtx_sequence::element (int index) const
1433{
1434 return XVECEXP (this, 0, index)(((((this)->u.fld[0]).rt_rtvec))->elem[index]);
1435}
1436
1437inline rtx_insn *rtx_sequence::insn (int index) const
1438{
1439 return as_a <rtx_insn *> (XVECEXP (this, 0, index)(((((this)->u.fld[0]).rt_rtvec))->elem[index]));
1440}
1441
1442/* ACCESS MACROS for particular fields of insns. */
1443
1444/* Holds a unique number for each insn.
1445 These are not necessarily sequentially increasing. */
1446inline int INSN_UID (const_rtx insn)
1447{
1448 return RTL_INSN_CHAIN_FLAG_CHECK ("INSN_UID",__extension__ ({ __typeof ((insn)) const _rtx = ((insn)); if (
!((unsigned long) (((enum rtx_code) (_rtx)->code)) - (unsigned
long) (DEBUG_INSN) <= (unsigned long) (NOTE) - (unsigned long
) (DEBUG_INSN))) rtl_check_failed_flag ("INSN_UID", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1449, __FUNCTION__); _rtx; })
1449 (insn))__extension__ ({ __typeof ((insn)) const _rtx = ((insn)); if (
!((unsigned long) (((enum rtx_code) (_rtx)->code)) - (unsigned
long) (DEBUG_INSN) <= (unsigned long) (NOTE) - (unsigned long
) (DEBUG_INSN))) rtl_check_failed_flag ("INSN_UID", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1449, __FUNCTION__); _rtx; })
->u2.insn_uid;
1450}
1451inline int& INSN_UID (rtx insn)
1452{
1453 return RTL_INSN_CHAIN_FLAG_CHECK ("INSN_UID",__extension__ ({ __typeof ((insn)) const _rtx = ((insn)); if (
!((unsigned long) (((enum rtx_code) (_rtx)->code)) - (unsigned
long) (DEBUG_INSN) <= (unsigned long) (NOTE) - (unsigned long
) (DEBUG_INSN))) rtl_check_failed_flag ("INSN_UID", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1454, __FUNCTION__); _rtx; })
1454 (insn))__extension__ ({ __typeof ((insn)) const _rtx = ((insn)); if (
!((unsigned long) (((enum rtx_code) (_rtx)->code)) - (unsigned
long) (DEBUG_INSN) <= (unsigned long) (NOTE) - (unsigned long
) (DEBUG_INSN))) rtl_check_failed_flag ("INSN_UID", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1454, __FUNCTION__); _rtx; })
->u2.insn_uid;
1455}
1456
1457/* Chain insns together in sequence. */
1458
1459/* For now these are split in two: an rvalue form:
1460 PREV_INSN/NEXT_INSN
1461 and an lvalue form:
1462 SET_NEXT_INSN/SET_PREV_INSN. */
1463
1464inline rtx_insn *PREV_INSN (const rtx_insn *insn)
1465{
1466 rtx prev = XEXP (insn, 0)(((insn)->u.fld[0]).rt_rtx);
1467 return safe_as_a <rtx_insn *> (prev);
1468}
1469
1470inline rtx& SET_PREV_INSN (rtx_insn *insn)
1471{
1472 return XEXP (insn, 0)(((insn)->u.fld[0]).rt_rtx);
43
Returning null reference
1473}
1474
1475inline rtx_insn *NEXT_INSN (const rtx_insn *insn)
1476{
1477 rtx next = XEXP (insn, 1)(((insn)->u.fld[1]).rt_rtx);
1478 return safe_as_a <rtx_insn *> (next);
1479}
1480
1481inline rtx& SET_NEXT_INSN (rtx_insn *insn)
1482{
1483 return XEXP (insn, 1)(((insn)->u.fld[1]).rt_rtx);
1484}
1485
1486inline basic_block BLOCK_FOR_INSN (const_rtx insn)
1487{
1488 return XBBDEF (insn, 2)(((insn)->u.fld[2]).rt_bb);
1489}
1490
1491inline basic_block& BLOCK_FOR_INSN (rtx insn)
1492{
1493 return XBBDEF (insn, 2)(((insn)->u.fld[2]).rt_bb);
1494}
1495
1496inline void set_block_for_insn (rtx_insn *insn, basic_block bb)
1497{
1498 BLOCK_FOR_INSN (insn) = bb;
1499}
1500
1501/* The body of an insn. */
1502inline rtx PATTERN (const_rtx insn)
1503{
1504 return XEXP (insn, 3)(((insn)->u.fld[3]).rt_rtx);
1505}
1506
1507inline rtx& PATTERN (rtx insn)
1508{
1509 return XEXP (insn, 3)(((insn)->u.fld[3]).rt_rtx);
1510}
1511
1512inline unsigned int INSN_LOCATION (const rtx_insn *insn)
1513{
1514 return XUINT (insn, 4)(((insn)->u.fld[4]).rt_uint);
1515}
1516
1517inline unsigned int& INSN_LOCATION (rtx_insn *insn)
1518{
1519 return XUINT (insn, 4)(((insn)->u.fld[4]).rt_uint);
1520}
1521
1522inline bool INSN_HAS_LOCATION (const rtx_insn *insn)
1523{
1524 return LOCATION_LOCUS (INSN_LOCATION (insn))((IS_ADHOC_LOC (INSN_LOCATION (insn))) ? get_location_from_adhoc_loc
(line_table, INSN_LOCATION (insn)) : (INSN_LOCATION (insn)))
!= UNKNOWN_LOCATION((location_t) 0);
1525}
1526
1527/* LOCATION of an RTX if relevant. */
1528#define RTL_LOCATION(X)((((((enum rtx_code) (X)->code) == INSN) || (((enum rtx_code
) (X)->code) == JUMP_INSN) || (((enum rtx_code) (X)->code
) == CALL_INSN)) || (((enum rtx_code) (X)->code) == DEBUG_INSN
)) ? INSN_LOCATION (as_a <rtx_insn *> (X)) : ((location_t
) 0))
(INSN_P (X)(((((enum rtx_code) (X)->code) == INSN) || (((enum rtx_code
) (X)->code) == JUMP_INSN) || (((enum rtx_code) (X)->code
) == CALL_INSN)) || (((enum rtx_code) (X)->code) == DEBUG_INSN
))
? \
1529 INSN_LOCATION (as_a <rtx_insn *> (X)) \
1530 : UNKNOWN_LOCATION((location_t) 0))
1531
1532/* Code number of instruction, from when it was recognized.
1533 -1 means this instruction has not been recognized yet. */
1534#define INSN_CODE(INSN)(((INSN)->u.fld[5]).rt_int) XINT (INSN, 5)(((INSN)->u.fld[5]).rt_int)
1535
1536inline rtvec rtx_jump_table_data::get_labels () const
1537{
1538 rtx pat = PATTERN (this);
1539 if (GET_CODE (pat)((enum rtx_code) (pat)->code) == ADDR_VEC)
1540 return XVEC (pat, 0)(((pat)->u.fld[0]).rt_rtvec);
1541 else
1542 return XVEC (pat, 1)(((pat)->u.fld[1]).rt_rtvec); /* presumably an ADDR_DIFF_VEC */
1543}
1544
1545/* Return the mode of the data in the table, which is always a scalar
1546 integer. */
1547
1548inline scalar_int_mode
1549rtx_jump_table_data::get_data_mode () const
1550{
1551 return as_a <scalar_int_mode> (GET_MODE (PATTERN (this))((machine_mode) (PATTERN (this))->mode));
1552}
1553
1554/* If LABEL is followed by a jump table, return the table, otherwise
1555 return null. */
1556
1557inline rtx_jump_table_data *
1558jump_table_for_label (const rtx_code_label *label)
1559{
1560 return safe_dyn_cast <rtx_jump_table_data *> (NEXT_INSN (label));
1561}
1562
1563#define RTX_FRAME_RELATED_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != DEBUG_INSN && ((
enum rtx_code) (_rtx)->code) != INSN && ((enum rtx_code
) (_rtx)->code) != CALL_INSN && ((enum rtx_code) (
_rtx)->code) != JUMP_INSN && ((enum rtx_code) (_rtx
)->code) != BARRIER && ((enum rtx_code) (_rtx)->
code) != SET) rtl_check_failed_flag ("RTX_FRAME_RELATED_P",_rtx
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1563, __FUNCTION__); _rtx; })->frame_related)
\
1564 (RTL_FLAG_CHECK6 ("RTX_FRAME_RELATED_P", (RTX), DEBUG_INSN, INSN, \__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != DEBUG_INSN && ((enum
rtx_code) (_rtx)->code) != INSN && ((enum rtx_code
) (_rtx)->code) != CALL_INSN && ((enum rtx_code) (
_rtx)->code) != JUMP_INSN && ((enum rtx_code) (_rtx
)->code) != BARRIER && ((enum rtx_code) (_rtx)->
code) != SET) rtl_check_failed_flag ("RTX_FRAME_RELATED_P",_rtx
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1565, __FUNCTION__); _rtx; })
1565 CALL_INSN, JUMP_INSN, BARRIER, SET)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != DEBUG_INSN && ((enum
rtx_code) (_rtx)->code) != INSN && ((enum rtx_code
) (_rtx)->code) != CALL_INSN && ((enum rtx_code) (
_rtx)->code) != JUMP_INSN && ((enum rtx_code) (_rtx
)->code) != BARRIER && ((enum rtx_code) (_rtx)->
code) != SET) rtl_check_failed_flag ("RTX_FRAME_RELATED_P",_rtx
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1565, __FUNCTION__); _rtx; })
->frame_related)
1566
1567/* 1 if JUMP RTX is a crossing jump. */
1568#define CROSSING_JUMP_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != JUMP_INSN) rtl_check_failed_flag
("CROSSING_JUMP_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1568, __FUNCTION__); _rtx; })->jump)
\
1569 (RTL_FLAG_CHECK1 ("CROSSING_JUMP_P", (RTX), JUMP_INSN)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != JUMP_INSN) rtl_check_failed_flag
("CROSSING_JUMP_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1569, __FUNCTION__); _rtx; })
->jump)
1570
1571/* 1 if RTX is a call to a const function. Built from ECF_CONST and
1572 TREE_READONLY. */
1573#define RTL_CONST_CALL_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CALL_INSN) rtl_check_failed_flag
("RTL_CONST_CALL_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1573, __FUNCTION__); _rtx; })->unchanging)
\
1574 (RTL_FLAG_CHECK1 ("RTL_CONST_CALL_P", (RTX), CALL_INSN)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != CALL_INSN) rtl_check_failed_flag
("RTL_CONST_CALL_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1574, __FUNCTION__); _rtx; })
->unchanging)
1575
1576/* 1 if RTX is a call to a pure function. Built from ECF_PURE and
1577 DECL_PURE_P. */
1578#define RTL_PURE_CALL_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CALL_INSN) rtl_check_failed_flag
("RTL_PURE_CALL_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1578, __FUNCTION__); _rtx; })->return_val)
\
1579 (RTL_FLAG_CHECK1 ("RTL_PURE_CALL_P", (RTX), CALL_INSN)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != CALL_INSN) rtl_check_failed_flag
("RTL_PURE_CALL_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1579, __FUNCTION__); _rtx; })
->return_val)
1580
1581/* 1 if RTX is a call to a const or pure function. */
1582#define RTL_CONST_OR_PURE_CALL_P(RTX)((__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CALL_INSN) rtl_check_failed_flag
("RTL_CONST_CALL_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1582, __FUNCTION__); _rtx; })->unchanging) || (__extension__
({ __typeof ((RTX)) const _rtx = ((RTX)); if (((enum rtx_code
) (_rtx)->code) != CALL_INSN) rtl_check_failed_flag ("RTL_PURE_CALL_P"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1582, __FUNCTION__); _rtx; })->return_val))
\
1583 (RTL_CONST_CALL_P (RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CALL_INSN) rtl_check_failed_flag
("RTL_CONST_CALL_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1583, __FUNCTION__); _rtx; })->unchanging)
|| RTL_PURE_CALL_P (RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CALL_INSN) rtl_check_failed_flag
("RTL_PURE_CALL_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1583, __FUNCTION__); _rtx; })->return_val)
)
1584
1585/* 1 if RTX is a call to a looping const or pure function. Built from
1586 ECF_LOOPING_CONST_OR_PURE and DECL_LOOPING_CONST_OR_PURE_P. */
1587#define RTL_LOOPING_CONST_OR_PURE_CALL_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CALL_INSN) rtl_check_failed_flag
("CONST_OR_PURE_CALL_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1587, __FUNCTION__); _rtx; })->call)
\
1588 (RTL_FLAG_CHECK1 ("CONST_OR_PURE_CALL_P", (RTX), CALL_INSN)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != CALL_INSN) rtl_check_failed_flag
("CONST_OR_PURE_CALL_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1588, __FUNCTION__); _rtx; })
->call)
1589
1590/* 1 if RTX is a call_insn for a sibling call. */
1591#define SIBLING_CALL_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CALL_INSN) rtl_check_failed_flag
("SIBLING_CALL_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1591, __FUNCTION__); _rtx; })->jump)
\
1592 (RTL_FLAG_CHECK1 ("SIBLING_CALL_P", (RTX), CALL_INSN)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != CALL_INSN) rtl_check_failed_flag
("SIBLING_CALL_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1592, __FUNCTION__); _rtx; })
->jump)
1593
1594/* 1 if RTX is a jump_insn, call_insn, or insn that is an annulling branch. */
1595#define INSN_ANNULLED_BRANCH_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != JUMP_INSN) rtl_check_failed_flag
("INSN_ANNULLED_BRANCH_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1595, __FUNCTION__); _rtx; })->unchanging)
\
1596 (RTL_FLAG_CHECK1 ("INSN_ANNULLED_BRANCH_P", (RTX), JUMP_INSN)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != JUMP_INSN) rtl_check_failed_flag
("INSN_ANNULLED_BRANCH_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1596, __FUNCTION__); _rtx; })
->unchanging)
1597
1598/* 1 if RTX is an insn in a delay slot and is from the target of the branch.
1599 If the branch insn has INSN_ANNULLED_BRANCH_P set, this insn should only be
1600 executed if the branch is taken. For annulled branches with this bit
1601 clear, the insn should be executed only if the branch is not taken. */
1602#define INSN_FROM_TARGET_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != INSN && ((enum rtx_code
) (_rtx)->code) != JUMP_INSN && ((enum rtx_code) (
_rtx)->code) != CALL_INSN) rtl_check_failed_flag ("INSN_FROM_TARGET_P"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1602, __FUNCTION__); _rtx; })->in_struct)
\
1603 (RTL_FLAG_CHECK3 ("INSN_FROM_TARGET_P", (RTX), INSN, JUMP_INSN, \__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != INSN && ((enum rtx_code
) (_rtx)->code) != JUMP_INSN && ((enum rtx_code) (
_rtx)->code) != CALL_INSN) rtl_check_failed_flag ("INSN_FROM_TARGET_P"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1604, __FUNCTION__); _rtx; })
1604 CALL_INSN)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != INSN && ((enum rtx_code
) (_rtx)->code) != JUMP_INSN && ((enum rtx_code) (
_rtx)->code) != CALL_INSN) rtl_check_failed_flag ("INSN_FROM_TARGET_P"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1604, __FUNCTION__); _rtx; })
->in_struct)
1605
1606/* In an ADDR_DIFF_VEC, the flags for RTX for use by branch shortening.
1607 See the comments for ADDR_DIFF_VEC in rtl.def. */
1608#define ADDR_DIFF_VEC_FLAGS(RTX)(((RTX)->u.fld[4]).rt_addr_diff_vec_flags) X0ADVFLAGS (RTX, 4)(((RTX)->u.fld[4]).rt_addr_diff_vec_flags)
1609
1610/* In a VALUE, the value cselib has assigned to RTX.
1611 This is a "struct cselib_val", see cselib.h. */
1612#define CSELIB_VAL_PTR(RTX)(((RTX)->u.fld[0]).rt_cselib) X0CSELIB (RTX, 0)(((RTX)->u.fld[0]).rt_cselib)
1613
1614/* Holds a list of notes on what this insn does to various REGs.
1615 It is a chain of EXPR_LIST rtx's, where the second operand is the
1616 chain pointer and the first operand is the REG being described.
1617 The mode field of the EXPR_LIST contains not a real machine mode
1618 but a value from enum reg_note. */
1619#define REG_NOTES(INSN)(((INSN)->u.fld[6]).rt_rtx) XEXP(INSN, 6)(((INSN)->u.fld[6]).rt_rtx)
1620
1621/* In an ENTRY_VALUE this is the DECL_INCOMING_RTL of the argument in
1622 question. */
1623#define ENTRY_VALUE_EXP(RTX)(((RTX)->u.fld[0]).rt_rtx) (RTL_CHECKC1 (RTX, 0, ENTRY_VALUE)((RTX)->u.fld[0]).rt_rtx)
1624
1625enum reg_note
1626{
1627#define DEF_REG_NOTE(NAME) NAME,
1628#include "reg-notes.def"
1629#undef DEF_REG_NOTE
1630 REG_NOTE_MAX
1631};
1632
1633/* Define macros to extract and insert the reg-note kind in an EXPR_LIST. */
1634#define REG_NOTE_KIND(LINK)((enum reg_note) ((machine_mode) (LINK)->mode)) ((enum reg_note) GET_MODE (LINK)((machine_mode) (LINK)->mode))
1635#define PUT_REG_NOTE_KIND(LINK, KIND)((LINK)->mode = ((machine_mode) (KIND))) \
1636 PUT_MODE_RAW (LINK, (machine_mode) (KIND))((LINK)->mode = ((machine_mode) (KIND)))
1637
1638/* Names for REG_NOTE's in EXPR_LIST insn's. */
1639
1640extern const char * const reg_note_name[];
1641#define GET_REG_NOTE_NAME(MODE)(reg_note_name[(int) (MODE)]) (reg_note_name[(int) (MODE)])
1642
1643/* This field is only present on CALL_INSNs. It holds a chain of EXPR_LIST of
1644 USE, CLOBBER and SET expressions.
1645 USE expressions list the registers filled with arguments that
1646 are passed to the function.
1647 CLOBBER expressions document the registers explicitly clobbered
1648 by this CALL_INSN.
1649 SET expressions say that the return value of the call (the SET_DEST)
1650 is equivalent to a value available before the call (the SET_SRC).
1651 This kind of SET is used when the return value is predictable in
1652 advance. It is purely an optimisation hint; unlike USEs and CLOBBERs,
1653 it does not affect register liveness.
1654
1655 Pseudo registers cannot be mentioned in this list. */
1656#define CALL_INSN_FUNCTION_USAGE(INSN)(((INSN)->u.fld[7]).rt_rtx) XEXP(INSN, 7)(((INSN)->u.fld[7]).rt_rtx)
1657
1658/* The label-number of a code-label. The assembler label
1659 is made from `L' and the label-number printed in decimal.
1660 Label numbers are unique in a compilation. */
1661#define CODE_LABEL_NUMBER(INSN)(((INSN)->u.fld[5]).rt_int) XINT (INSN, 5)(((INSN)->u.fld[5]).rt_int)
1662
1663/* In a NOTE that is a line number, this is a string for the file name that the
1664 line is in. We use the same field to record block numbers temporarily in
1665 NOTE_INSN_BLOCK_BEG and NOTE_INSN_BLOCK_END notes. (We avoid lots of casts
1666 between ints and pointers if we use a different macro for the block number.)
1667 */
1668
1669/* Opaque data. */
1670#define NOTE_DATA(INSN)((INSN)->u.fld[3]) RTL_CHECKC1 (INSN, 3, NOTE)((INSN)->u.fld[3])
1671#define NOTE_DELETED_LABEL_NAME(INSN)(((INSN)->u.fld[3]).rt_str) XCSTR (INSN, 3, NOTE)(((INSN)->u.fld[3]).rt_str)
1672#define SET_INSN_DELETED(INSN)set_insn_deleted (INSN); set_insn_deleted (INSN);
1673#define NOTE_BLOCK(INSN)(((INSN)->u.fld[3]).rt_tree) XCTREE (INSN, 3, NOTE)(((INSN)->u.fld[3]).rt_tree)
1674#define NOTE_EH_HANDLER(INSN)(((INSN)->u.fld[3]).rt_int) XCINT (INSN, 3, NOTE)(((INSN)->u.fld[3]).rt_int)
1675#define NOTE_BASIC_BLOCK(INSN)(((INSN)->u.fld[3]).rt_bb) XCBBDEF (INSN, 3, NOTE)(((INSN)->u.fld[3]).rt_bb)
1676#define NOTE_VAR_LOCATION(INSN)(((INSN)->u.fld[3]).rt_rtx) XCEXP (INSN, 3, NOTE)(((INSN)->u.fld[3]).rt_rtx)
1677#define NOTE_MARKER_LOCATION(INSN)(((INSN)->u.fld[3]).rt_uint) XCUINT (INSN, 3, NOTE)(((INSN)->u.fld[3]).rt_uint)
1678#define NOTE_CFI(INSN)(((INSN)->u.fld[3]).rt_cfi) XCCFI (INSN, 3, NOTE)(((INSN)->u.fld[3]).rt_cfi)
1679#define NOTE_LABEL_NUMBER(INSN)(((INSN)->u.fld[3]).rt_int) XCINT (INSN, 3, NOTE)(((INSN)->u.fld[3]).rt_int)
1680
1681/* In a NOTE that is a line number, this is the line number.
1682 Other kinds of NOTEs are identified by negative numbers here. */
1683#define NOTE_KIND(INSN)(((INSN)->u.fld[4]).rt_int) XCINT (INSN, 4, NOTE)(((INSN)->u.fld[4]).rt_int)
1684
1685/* Nonzero if INSN is a note marking the beginning of a basic block. */
1686#define NOTE_INSN_BASIC_BLOCK_P(INSN)((((enum rtx_code) (INSN)->code) == NOTE) && (((INSN
)->u.fld[4]).rt_int) == NOTE_INSN_BASIC_BLOCK)
\
1687 (NOTE_P (INSN)(((enum rtx_code) (INSN)->code) == NOTE) && NOTE_KIND (INSN)(((INSN)->u.fld[4]).rt_int) == NOTE_INSN_BASIC_BLOCK)
1688
1689/* Nonzero if INSN is a debug nonbind marker note,
1690 for which NOTE_MARKER_LOCATION can be used. */
1691#define NOTE_MARKER_P(INSN)((((enum rtx_code) (INSN)->code) == NOTE) && ((((INSN
)->u.fld[4]).rt_int) == NOTE_INSN_BEGIN_STMT || (((INSN)->
u.fld[4]).rt_int) == NOTE_INSN_INLINE_ENTRY))
\
1692 (NOTE_P (INSN)(((enum rtx_code) (INSN)->code) == NOTE) && \
1693 (NOTE_KIND (INSN)(((INSN)->u.fld[4]).rt_int) == NOTE_INSN_BEGIN_STMT \
1694 || NOTE_KIND (INSN)(((INSN)->u.fld[4]).rt_int) == NOTE_INSN_INLINE_ENTRY))
1695
1696/* Variable declaration and the location of a variable. */
1697#define PAT_VAR_LOCATION_DECL(PAT)(((((PAT))->u.fld[0]).rt_tree)) (XCTREE ((PAT), 0, VAR_LOCATION)((((PAT))->u.fld[0]).rt_tree))
1698#define PAT_VAR_LOCATION_LOC(PAT)(((((PAT))->u.fld[1]).rt_rtx)) (XCEXP ((PAT), 1, VAR_LOCATION)((((PAT))->u.fld[1]).rt_rtx))
1699
1700/* Initialization status of the variable in the location. Status
1701 can be unknown, uninitialized or initialized. See enumeration
1702 type below. */
1703#define PAT_VAR_LOCATION_STATUS(PAT)(__extension__ ({ __typeof (PAT) const _rtx = (PAT); if (((enum
rtx_code) (_rtx)->code) != VAR_LOCATION) rtl_check_failed_flag
("PAT_VAR_LOCATION_STATUS", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1703, __FUNCTION__); _rtx; }) ->u2.var_location_status)
\
1704 (RTL_FLAG_CHECK1 ("PAT_VAR_LOCATION_STATUS", PAT, VAR_LOCATION)__extension__ ({ __typeof (PAT) const _rtx = (PAT); if (((enum
rtx_code) (_rtx)->code) != VAR_LOCATION) rtl_check_failed_flag
("PAT_VAR_LOCATION_STATUS", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1704, __FUNCTION__); _rtx; })
\
1705 ->u2.var_location_status)
1706
1707/* Accessors for a NOTE_INSN_VAR_LOCATION. */
1708#define NOTE_VAR_LOCATION_DECL(NOTE)((((((((NOTE)->u.fld[3]).rt_rtx)))->u.fld[0]).rt_tree)) \
1709 PAT_VAR_LOCATION_DECL (NOTE_VAR_LOCATION (NOTE))((((((((NOTE)->u.fld[3]).rt_rtx)))->u.fld[0]).rt_tree))
1710#define NOTE_VAR_LOCATION_LOC(NOTE)((((((((NOTE)->u.fld[3]).rt_rtx)))->u.fld[1]).rt_rtx)) \
1711 PAT_VAR_LOCATION_LOC (NOTE_VAR_LOCATION (NOTE))((((((((NOTE)->u.fld[3]).rt_rtx)))->u.fld[1]).rt_rtx))
1712#define NOTE_VAR_LOCATION_STATUS(NOTE)(__extension__ ({ __typeof ((((NOTE)->u.fld[3]).rt_rtx)) const
_rtx = ((((NOTE)->u.fld[3]).rt_rtx)); if (((enum rtx_code
) (_rtx)->code) != VAR_LOCATION) rtl_check_failed_flag ("PAT_VAR_LOCATION_STATUS"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1712, __FUNCTION__); _rtx; }) ->u2.var_location_status)
\
1713 PAT_VAR_LOCATION_STATUS (NOTE_VAR_LOCATION (NOTE))(__extension__ ({ __typeof ((((NOTE)->u.fld[3]).rt_rtx)) const
_rtx = ((((NOTE)->u.fld[3]).rt_rtx)); if (((enum rtx_code
) (_rtx)->code) != VAR_LOCATION) rtl_check_failed_flag ("PAT_VAR_LOCATION_STATUS"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1713, __FUNCTION__); _rtx; }) ->u2.var_location_status)
1714
1715/* Evaluate to TRUE if INSN is a debug insn that denotes a variable
1716 location/value tracking annotation. */
1717#define DEBUG_BIND_INSN_P(INSN)((((enum rtx_code) (INSN)->code) == DEBUG_INSN) &&
(((enum rtx_code) (PATTERN (INSN))->code) == VAR_LOCATION
))
\
1718 (DEBUG_INSN_P (INSN)(((enum rtx_code) (INSN)->code) == DEBUG_INSN) \
1719 && (GET_CODE (PATTERN (INSN))((enum rtx_code) (PATTERN (INSN))->code) \
1720 == VAR_LOCATION))
1721/* Evaluate to TRUE if INSN is a debug insn that denotes a program
1722 source location marker. */
1723#define DEBUG_MARKER_INSN_P(INSN)((((enum rtx_code) (INSN)->code) == DEBUG_INSN) &&
(((enum rtx_code) (PATTERN (INSN))->code) != VAR_LOCATION
))
\
1724 (DEBUG_INSN_P (INSN)(((enum rtx_code) (INSN)->code) == DEBUG_INSN) \
1725 && (GET_CODE (PATTERN (INSN))((enum rtx_code) (PATTERN (INSN))->code) \
1726 != VAR_LOCATION))
1727/* Evaluate to the marker kind. */
1728#define INSN_DEBUG_MARKER_KIND(INSN)(((enum rtx_code) (PATTERN (INSN))->code) == DEBUG_MARKER ?
(((machine_mode) (PATTERN (INSN))->mode) == ((void) 0, E_VOIDmode
) ? NOTE_INSN_BEGIN_STMT : ((machine_mode) (PATTERN (INSN))->
mode) == ((void) 0, E_BLKmode) ? NOTE_INSN_INLINE_ENTRY : (enum
insn_note)-1) : (enum insn_note)-1)
\
1729 (GET_CODE (PATTERN (INSN))((enum rtx_code) (PATTERN (INSN))->code) == DEBUG_MARKER \
1730 ? (GET_MODE (PATTERN (INSN))((machine_mode) (PATTERN (INSN))->mode) == VOIDmode((void) 0, E_VOIDmode) \
1731 ? NOTE_INSN_BEGIN_STMT \
1732 : GET_MODE (PATTERN (INSN))((machine_mode) (PATTERN (INSN))->mode) == BLKmode((void) 0, E_BLKmode) \
1733 ? NOTE_INSN_INLINE_ENTRY \
1734 : (enum insn_note)-1) \
1735 : (enum insn_note)-1)
1736/* Create patterns for debug markers. These and the above abstract
1737 the representation, so that it's easier to get rid of the abuse of
1738 the mode to hold the marker kind. Other marker types are
1739 envisioned, so a single bit flag won't do; maybe separate RTL codes
1740 wouldn't be a problem. */
1741#define GEN_RTX_DEBUG_MARKER_BEGIN_STMT_PAT()gen_rtx_fmt__stat ((DEBUG_MARKER), ((((void) 0, E_VOIDmode)))
)
\
1742 gen_rtx_DEBUG_MARKER (VOIDmode)gen_rtx_fmt__stat ((DEBUG_MARKER), ((((void) 0, E_VOIDmode)))
)
1743#define GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT()gen_rtx_fmt__stat ((DEBUG_MARKER), ((((void) 0, E_BLKmode))) ) \
1744 gen_rtx_DEBUG_MARKER (BLKmode)gen_rtx_fmt__stat ((DEBUG_MARKER), ((((void) 0, E_BLKmode))) )
1745
1746/* The VAR_LOCATION rtx in a DEBUG_INSN. */
1747#define INSN_VAR_LOCATION(INSN)(__extension__ ({ __typeof (PATTERN (INSN)) const _rtx = (PATTERN
(INSN)); if (((enum rtx_code) (_rtx)->code) != VAR_LOCATION
) rtl_check_failed_flag ("INSN_VAR_LOCATION", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1747, __FUNCTION__); _rtx; }))
\
1748 (RTL_FLAG_CHECK1 ("INSN_VAR_LOCATION", PATTERN (INSN), VAR_LOCATION)__extension__ ({ __typeof (PATTERN (INSN)) const _rtx = (PATTERN
(INSN)); if (((enum rtx_code) (_rtx)->code) != VAR_LOCATION
) rtl_check_failed_flag ("INSN_VAR_LOCATION", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1748, __FUNCTION__); _rtx; })
)
1749/* A pointer to the VAR_LOCATION rtx in a DEBUG_INSN. */
1750#define INSN_VAR_LOCATION_PTR(INSN)(&PATTERN (INSN)) \
1751 (&PATTERN (INSN))
1752
1753/* Accessors for a tree-expanded var location debug insn. */
1754#define INSN_VAR_LOCATION_DECL(INSN)((((((__extension__ ({ __typeof (PATTERN (INSN)) const _rtx =
(PATTERN (INSN)); if (((enum rtx_code) (_rtx)->code) != VAR_LOCATION
) rtl_check_failed_flag ("INSN_VAR_LOCATION", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1754, __FUNCTION__); _rtx; }))))->u.fld[0]).rt_tree))
\
1755 PAT_VAR_LOCATION_DECL (INSN_VAR_LOCATION (INSN))((((((__extension__ ({ __typeof (PATTERN (INSN)) const _rtx =
(PATTERN (INSN)); if (((enum rtx_code) (_rtx)->code) != VAR_LOCATION
) rtl_check_failed_flag ("INSN_VAR_LOCATION", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1755, __FUNCTION__); _rtx; }))))->u.fld[0]).rt_tree))
1756#define INSN_VAR_LOCATION_LOC(INSN)((((((__extension__ ({ __typeof (PATTERN (INSN)) const _rtx =
(PATTERN (INSN)); if (((enum rtx_code) (_rtx)->code) != VAR_LOCATION
) rtl_check_failed_flag ("INSN_VAR_LOCATION", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1756, __FUNCTION__); _rtx; }))))->u.fld[1]).rt_rtx))
\
1757 PAT_VAR_LOCATION_LOC (INSN_VAR_LOCATION (INSN))((((((__extension__ ({ __typeof (PATTERN (INSN)) const _rtx =
(PATTERN (INSN)); if (((enum rtx_code) (_rtx)->code) != VAR_LOCATION
) rtl_check_failed_flag ("INSN_VAR_LOCATION", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1757, __FUNCTION__); _rtx; }))))->u.fld[1]).rt_rtx))
1758#define INSN_VAR_LOCATION_STATUS(INSN)(__extension__ ({ __typeof ((__extension__ ({ __typeof (PATTERN
(INSN)) const _rtx = (PATTERN (INSN)); if (((enum rtx_code) (
_rtx)->code) != VAR_LOCATION) rtl_check_failed_flag ("INSN_VAR_LOCATION"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1758, __FUNCTION__); _rtx; }))) const _rtx = ((__extension__
({ __typeof (PATTERN (INSN)) const _rtx = (PATTERN (INSN)); if
(((enum rtx_code) (_rtx)->code) != VAR_LOCATION) rtl_check_failed_flag
("INSN_VAR_LOCATION", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1758, __FUNCTION__); _rtx; }))); if (((enum rtx_code) (_rtx
)->code) != VAR_LOCATION) rtl_check_failed_flag ("PAT_VAR_LOCATION_STATUS"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1758, __FUNCTION__); _rtx; }) ->u2.var_location_status)
\
1759 PAT_VAR_LOCATION_STATUS (INSN_VAR_LOCATION (INSN))(__extension__ ({ __typeof ((__extension__ ({ __typeof (PATTERN
(INSN)) const _rtx = (PATTERN (INSN)); if (((enum rtx_code) (
_rtx)->code) != VAR_LOCATION) rtl_check_failed_flag ("INSN_VAR_LOCATION"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1759, __FUNCTION__); _rtx; }))) const _rtx = ((__extension__
({ __typeof (PATTERN (INSN)) const _rtx = (PATTERN (INSN)); if
(((enum rtx_code) (_rtx)->code) != VAR_LOCATION) rtl_check_failed_flag
("INSN_VAR_LOCATION", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1759, __FUNCTION__); _rtx; }))); if (((enum rtx_code) (_rtx
)->code) != VAR_LOCATION) rtl_check_failed_flag ("PAT_VAR_LOCATION_STATUS"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1759, __FUNCTION__); _rtx; }) ->u2.var_location_status)
1760
1761/* Expand to the RTL that denotes an unknown variable location in a
1762 DEBUG_INSN. */
1763#define gen_rtx_UNKNOWN_VAR_LOC()(gen_rtx_fmt_e_stat ((CLOBBER), ((((void) 0, E_VOIDmode))), (
((const_int_rtx[64]))) ))
(gen_rtx_CLOBBER (VOIDmode, const0_rtx)gen_rtx_fmt_e_stat ((CLOBBER), ((((void) 0, E_VOIDmode))), ((
(const_int_rtx[64]))) )
)
1764
1765/* Determine whether X is such an unknown location. */
1766#define VAR_LOC_UNKNOWN_P(X)(((enum rtx_code) (X)->code) == CLOBBER && ((((X))
->u.fld[0]).rt_rtx) == (const_int_rtx[64]))
\
1767 (GET_CODE (X)((enum rtx_code) (X)->code) == CLOBBER && XEXP ((X), 0)((((X))->u.fld[0]).rt_rtx) == const0_rtx(const_int_rtx[64]))
1768
1769/* 1 if RTX is emitted after a call, but it should take effect before
1770 the call returns. */
1771#define NOTE_DURING_CALL_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != NOTE) rtl_check_failed_flag
("NOTE_VAR_LOCATION_DURING_CALL_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1771, __FUNCTION__); _rtx; })->call)
\
1772 (RTL_FLAG_CHECK1 ("NOTE_VAR_LOCATION_DURING_CALL_P", (RTX), NOTE)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != NOTE) rtl_check_failed_flag
("NOTE_VAR_LOCATION_DURING_CALL_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1772, __FUNCTION__); _rtx; })
->call)
1773
1774/* DEBUG_EXPR_DECL corresponding to a DEBUG_EXPR RTX. */
1775#define DEBUG_EXPR_TREE_DECL(RTX)(((RTX)->u.fld[0]).rt_tree) XCTREE (RTX, 0, DEBUG_EXPR)(((RTX)->u.fld[0]).rt_tree)
1776
1777/* VAR_DECL/PARM_DECL DEBUG_IMPLICIT_PTR takes address of. */
1778#define DEBUG_IMPLICIT_PTR_DECL(RTX)(((RTX)->u.fld[0]).rt_tree) XCTREE (RTX, 0, DEBUG_IMPLICIT_PTR)(((RTX)->u.fld[0]).rt_tree)
1779
1780/* PARM_DECL DEBUG_PARAMETER_REF references. */
1781#define DEBUG_PARAMETER_REF_DECL(RTX)(((RTX)->u.fld[0]).rt_tree) XCTREE (RTX, 0, DEBUG_PARAMETER_REF)(((RTX)->u.fld[0]).rt_tree)
1782
1783/* Codes that appear in the NOTE_KIND field for kinds of notes
1784 that are not line numbers. These codes are all negative.
1785
1786 Notice that we do not try to use zero here for any of
1787 the special note codes because sometimes the source line
1788 actually can be zero! This happens (for example) when we
1789 are generating code for the per-translation-unit constructor
1790 and destructor routines for some C++ translation unit. */
1791
1792enum insn_note
1793{
1794#define DEF_INSN_NOTE(NAME) NAME,
1795#include "insn-notes.def"
1796#undef DEF_INSN_NOTE
1797
1798 NOTE_INSN_MAX
1799};
1800
1801/* Names for NOTE insn's other than line numbers. */
1802
1803extern const char * const note_insn_name[NOTE_INSN_MAX];
1804#define GET_NOTE_INSN_NAME(NOTE_CODE)(note_insn_name[(NOTE_CODE)]) \
1805 (note_insn_name[(NOTE_CODE)])
1806
1807/* The name of a label, in case it corresponds to an explicit label
1808 in the input source code. */
1809#define LABEL_NAME(RTX)(((RTX)->u.fld[6]).rt_str) XCSTR (RTX, 6, CODE_LABEL)(((RTX)->u.fld[6]).rt_str)
1810
1811/* In jump.cc, each label contains a count of the number
1812 of LABEL_REFs that point at it, so unused labels can be deleted. */
1813#define LABEL_NUSES(RTX)(((RTX)->u.fld[4]).rt_int) XCINT (RTX, 4, CODE_LABEL)(((RTX)->u.fld[4]).rt_int)
1814
1815/* Labels carry a two-bit field composed of the ->jump and ->call
1816 bits. This field indicates whether the label is an alternate
1817 entry point, and if so, what kind. */
1818enum label_kind
1819{
1820 LABEL_NORMAL = 0, /* ordinary label */
1821 LABEL_STATIC_ENTRY, /* alternate entry point, not exported */
1822 LABEL_GLOBAL_ENTRY, /* alternate entry point, exported */
1823 LABEL_WEAK_ENTRY /* alternate entry point, exported as weak symbol */
1824};
1825
1826#if defined ENABLE_RTL_FLAG_CHECKING1 && (GCC_VERSION(4 * 1000 + 2) > 2007)
1827
1828/* Retrieve the kind of LABEL. */
1829#define LABEL_KIND(LABEL)__extension__ ({ __typeof (LABEL) const _label = (LABEL); if (
! (((enum rtx_code) (_label)->code) == CODE_LABEL)) rtl_check_failed_flag
("LABEL_KIND", _label, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1829, __FUNCTION__); (enum label_kind) ((_label->jump <<
1) | _label->call); })
__extension__ \
1830({ __typeof (LABEL) const _label = (LABEL); \
1831 if (! LABEL_P (_label)(((enum rtx_code) (_label)->code) == CODE_LABEL)) \
1832 rtl_check_failed_flag ("LABEL_KIND", _label, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1832, \
1833 __FUNCTION__); \
1834 (enum label_kind) ((_label->jump << 1) | _label->call); })
1835
1836/* Set the kind of LABEL. */
1837#define SET_LABEL_KIND(LABEL, KIND)do { __typeof (LABEL) const _label = (LABEL); const unsigned int
_kind = (KIND); if (! (((enum rtx_code) (_label)->code) ==
CODE_LABEL)) rtl_check_failed_flag ("SET_LABEL_KIND", _label
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1837, __FUNCTION__); _label->jump = ((_kind >> 1) &
1); _label->call = (_kind & 1); } while (0)
do { \
1838 __typeof (LABEL) const _label = (LABEL); \
1839 const unsigned int _kind = (KIND); \
1840 if (! LABEL_P (_label)(((enum rtx_code) (_label)->code) == CODE_LABEL)) \
1841 rtl_check_failed_flag ("SET_LABEL_KIND", _label, __FILE__"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h", __LINE__1841, \
1842 __FUNCTION__); \
1843 _label->jump = ((_kind >> 1) & 1); \
1844 _label->call = (_kind & 1); \
1845} while (0)
1846
1847#else
1848
1849/* Retrieve the kind of LABEL. */
1850#define LABEL_KIND(LABEL)__extension__ ({ __typeof (LABEL) const _label = (LABEL); if (
! (((enum rtx_code) (_label)->code) == CODE_LABEL)) rtl_check_failed_flag
("LABEL_KIND", _label, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1850, __FUNCTION__); (enum label_kind) ((_label->jump <<
1) | _label->call); })
\
1851 ((enum label_kind) (((LABEL)->jump << 1) | (LABEL)->call))
1852
1853/* Set the kind of LABEL. */
1854#define SET_LABEL_KIND(LABEL, KIND)do { __typeof (LABEL) const _label = (LABEL); const unsigned int
_kind = (KIND); if (! (((enum rtx_code) (_label)->code) ==
CODE_LABEL)) rtl_check_failed_flag ("SET_LABEL_KIND", _label
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1854, __FUNCTION__); _label->jump = ((_kind >> 1) &
1); _label->call = (_kind & 1); } while (0)
do { \
1855 rtx const _label = (LABEL); \
1856 const unsigned int _kind = (KIND); \
1857 _label->jump = ((_kind >> 1) & 1); \
1858 _label->call = (_kind & 1); \
1859} while (0)
1860
1861#endif /* rtl flag checking */
1862
1863#define LABEL_ALT_ENTRY_P(LABEL)(__extension__ ({ __typeof (LABEL) const _label = (LABEL); if
(! (((enum rtx_code) (_label)->code) == CODE_LABEL)) rtl_check_failed_flag
("LABEL_KIND", _label, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1863, __FUNCTION__); (enum label_kind) ((_label->jump <<
1) | _label->call); }) != LABEL_NORMAL)
(LABEL_KIND (LABEL)__extension__ ({ __typeof (LABEL) const _label = (LABEL); if (
! (((enum rtx_code) (_label)->code) == CODE_LABEL)) rtl_check_failed_flag
("LABEL_KIND", _label, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1863, __FUNCTION__); (enum label_kind) ((_label->jump <<
1) | _label->call); })
!= LABEL_NORMAL)
1864
1865/* In jump.cc, each JUMP_INSN can point to a label that it can jump to,
1866 so that if the JUMP_INSN is deleted, the label's LABEL_NUSES can
1867 be decremented and possibly the label can be deleted. */
1868#define JUMP_LABEL(INSN)(((INSN)->u.fld[7]).rt_rtx) XCEXP (INSN, 7, JUMP_INSN)(((INSN)->u.fld[7]).rt_rtx)
1869
1870inline rtx_insn *JUMP_LABEL_AS_INSN (const rtx_insn *insn)
1871{
1872 return safe_as_a <rtx_insn *> (JUMP_LABEL (insn)(((insn)->u.fld[7]).rt_rtx));
1873}
1874
1875/* Methods of rtx_jump_insn. */
1876
1877inline rtx rtx_jump_insn::jump_label () const
1878{
1879 return JUMP_LABEL (this)(((this)->u.fld[7]).rt_rtx);
1880}
1881
1882inline rtx_code_label *rtx_jump_insn::jump_target () const
1883{
1884 return safe_as_a <rtx_code_label *> (JUMP_LABEL (this)(((this)->u.fld[7]).rt_rtx));
1885}
1886
1887inline void rtx_jump_insn::set_jump_target (rtx_code_label *target)
1888{
1889 JUMP_LABEL (this)(((this)->u.fld[7]).rt_rtx) = target;
1890}
1891
1892/* Once basic blocks are found, each CODE_LABEL starts a chain that
1893 goes through all the LABEL_REFs that jump to that label. The chain
1894 eventually winds up at the CODE_LABEL: it is circular. */
1895#define LABEL_REFS(LABEL)(((LABEL)->u.fld[3]).rt_rtx) XCEXP (LABEL, 3, CODE_LABEL)(((LABEL)->u.fld[3]).rt_rtx)
1896
1897/* Get the label that a LABEL_REF references. */
1898inline rtx_insn *
1899label_ref_label (const_rtx ref)
1900{
1901 return as_a<rtx_insn *> (XCEXP (ref, 0, LABEL_REF)(((ref)->u.fld[0]).rt_rtx));
1902}
1903
1904/* Set the label that LABEL_REF ref refers to. */
1905
1906inline void
1907set_label_ref_label (rtx ref, rtx_insn *label)
1908{
1909 XCEXP (ref, 0, LABEL_REF)(((ref)->u.fld[0]).rt_rtx) = label;
1910}
1911
1912/* For a REG rtx, REGNO extracts the register number. REGNO can only
1913 be used on RHS. Use SET_REGNO to change the value. */
1914#define REGNO(RTX)(rhs_regno(RTX)) (rhs_regno(RTX))
1915#define SET_REGNO(RTX, N)(df_ref_change_reg_with_loc (RTX, N)) (df_ref_change_reg_with_loc (RTX, N))
1916
1917/* Return the number of consecutive registers in a REG. This is always
1918 1 for pseudo registers and is determined by TARGET_HARD_REGNO_NREGS for
1919 hard registers. */
1920#define REG_NREGS(RTX)((&(RTX)->u.reg)->nregs) (REG_CHECK (RTX)(&(RTX)->u.reg)->nregs)
1921
1922/* ORIGINAL_REGNO holds the number the register originally had; for a
1923 pseudo register turned into a hard reg this will hold the old pseudo
1924 register number. */
1925#define ORIGINAL_REGNO(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != REG) rtl_check_failed_flag
("ORIGINAL_REGNO", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1925, __FUNCTION__); _rtx; })->u2.original_regno)
\
1926 (RTL_FLAG_CHECK1 ("ORIGINAL_REGNO", (RTX), REG)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != REG) rtl_check_failed_flag
("ORIGINAL_REGNO", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1926, __FUNCTION__); _rtx; })
->u2.original_regno)
1927
1928/* Force the REGNO macro to only be used on the lhs. */
1929inline unsigned int
1930rhs_regno (const_rtx x)
1931{
1932 return REG_CHECK (x)(&(x)->u.reg)->regno;
1933}
1934
1935/* Return the final register in REG X plus one. */
1936inline unsigned int
1937END_REGNO (const_rtx x)
1938{
1939 return REGNO (x)(rhs_regno(x)) + REG_NREGS (x)((&(x)->u.reg)->nregs);
1940}
1941
1942/* Change the REGNO and REG_NREGS of REG X to the specified values,
1943 bypassing the df machinery. */
1944inline void
1945set_regno_raw (rtx x, unsigned int regno, unsigned int nregs)
1946{
1947 reg_info *reg = REG_CHECK (x)(&(x)->u.reg);
1948 reg->regno = regno;
1949 reg->nregs = nregs;
1950}
1951
1952/* 1 if RTX is a reg or parallel that is the current function's return
1953 value. */
1954#define REG_FUNCTION_VALUE_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != REG && ((enum rtx_code
) (_rtx)->code) != PARALLEL) rtl_check_failed_flag ("REG_FUNCTION_VALUE_P"
,_rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1954, __FUNCTION__); _rtx; })->return_val)
\
1955 (RTL_FLAG_CHECK2 ("REG_FUNCTION_VALUE_P", (RTX), REG, PARALLEL)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != REG && ((enum rtx_code
) (_rtx)->code) != PARALLEL) rtl_check_failed_flag ("REG_FUNCTION_VALUE_P"
,_rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1955, __FUNCTION__); _rtx; })
->return_val)
1956
1957/* 1 if RTX is a reg that corresponds to a variable declared by the user. */
1958#define REG_USERVAR_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != REG) rtl_check_failed_flag
("REG_USERVAR_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1958, __FUNCTION__); _rtx; })->volatil)
\
1959 (RTL_FLAG_CHECK1 ("REG_USERVAR_P", (RTX), REG)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != REG) rtl_check_failed_flag
("REG_USERVAR_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1959, __FUNCTION__); _rtx; })
->volatil)
1960
1961/* 1 if RTX is a reg that holds a pointer value. */
1962#define REG_POINTER(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != REG) rtl_check_failed_flag
("REG_POINTER", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1962, __FUNCTION__); _rtx; })->frame_related)
\
1963 (RTL_FLAG_CHECK1 ("REG_POINTER", (RTX), REG)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != REG) rtl_check_failed_flag
("REG_POINTER", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1963, __FUNCTION__); _rtx; })
->frame_related)
1964
1965/* 1 if RTX is a mem that holds a pointer value. */
1966#define MEM_POINTER(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != MEM) rtl_check_failed_flag
("MEM_POINTER", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1966, __FUNCTION__); _rtx; })->frame_related)
\
1967 (RTL_FLAG_CHECK1 ("MEM_POINTER", (RTX), MEM)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != MEM) rtl_check_failed_flag
("MEM_POINTER", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1967, __FUNCTION__); _rtx; })
->frame_related)
1968
1969/* 1 if the given register REG corresponds to a hard register. */
1970#define HARD_REGISTER_P(REG)((((rhs_regno(REG))) < 76)) (HARD_REGISTER_NUM_P (REGNO (REG))(((rhs_regno(REG))) < 76))
1971
1972/* 1 if the given register number REG_NO corresponds to a hard register. */
1973#define HARD_REGISTER_NUM_P(REG_NO)((REG_NO) < 76) ((REG_NO) < FIRST_PSEUDO_REGISTER76)
1974
1975/* For a CONST_INT rtx, INTVAL extracts the integer. */
1976#define INTVAL(RTX)((RTX)->u.hwint[0]) XCWINT (RTX, 0, CONST_INT)((RTX)->u.hwint[0])
1977#define UINTVAL(RTX)((unsigned long) ((RTX)->u.hwint[0])) ((unsigned HOST_WIDE_INTlong) INTVAL (RTX)((RTX)->u.hwint[0]))
1978
1979/* For a CONST_WIDE_INT, CONST_WIDE_INT_NUNITS is the number of
1980 elements actually needed to represent the constant.
1981 CONST_WIDE_INT_ELT gets one of the elements. 0 is the least
1982 significant HOST_WIDE_INT. */
1983#define CONST_WIDE_INT_VEC(RTX)(&(RTX)->u.hwiv) HWIVEC_CHECK (RTX, CONST_WIDE_INT)(&(RTX)->u.hwiv)
1984#define CONST_WIDE_INT_NUNITS(RTX)((int)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX));
if (((enum rtx_code) (_rtx)->code) != CONST_WIDE_INT) rtl_check_failed_flag
("CWI_GET_NUM_ELEM", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1984, __FUNCTION__); _rtx; })->u2.num_elem)
CWI_GET_NUM_ELEM (RTX)((int)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX));
if (((enum rtx_code) (_rtx)->code) != CONST_WIDE_INT) rtl_check_failed_flag
("CWI_GET_NUM_ELEM", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1984, __FUNCTION__); _rtx; })->u2.num_elem)
1985#define CONST_WIDE_INT_ELT(RTX, N)((RTX)->u.hwiv.elem[N]) CWI_ELT (RTX, N)((RTX)->u.hwiv.elem[N])
1986
1987/* For a CONST_POLY_INT, CONST_POLY_INT_COEFFS gives access to the
1988 individual coefficients, in the form of a trailing_wide_ints structure. */
1989#define CONST_POLY_INT_COEFFS(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CONST_POLY_INT) rtl_check_failed_flag
("CONST_POLY_INT_COEFFS", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1989, __FUNCTION__); _rtx; })->u.cpi.coeffs)
\
1990 (RTL_FLAG_CHECK1("CONST_POLY_INT_COEFFS", (RTX), \__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != CONST_POLY_INT) rtl_check_failed_flag
("CONST_POLY_INT_COEFFS", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1991, __FUNCTION__); _rtx; })
1991 CONST_POLY_INT)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != CONST_POLY_INT) rtl_check_failed_flag
("CONST_POLY_INT_COEFFS", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 1991, __FUNCTION__); _rtx; })
->u.cpi.coeffs)
1992
1993/* For a CONST_DOUBLE:
1994#if TARGET_SUPPORTS_WIDE_INT == 0
1995 For a VOIDmode, there are two integers CONST_DOUBLE_LOW is the
1996 low-order word and ..._HIGH the high-order.
1997#endif
1998 For a float, there is a REAL_VALUE_TYPE structure, and
1999 CONST_DOUBLE_REAL_VALUE(r) is a pointer to it. */
2000#define CONST_DOUBLE_LOW(r)((r)->u.hwint[0]) XCMWINT (r, 0, CONST_DOUBLE, VOIDmode)((r)->u.hwint[0])
2001#define CONST_DOUBLE_HIGH(r)((r)->u.hwint[1]) XCMWINT (r, 1, CONST_DOUBLE, VOIDmode)((r)->u.hwint[1])
2002#define CONST_DOUBLE_REAL_VALUE(r)((const struct real_value *) (&(r)->u.rv)) \
2003 ((const struct real_value *) XCNMPRV (r, CONST_DOUBLE, VOIDmode)(&(r)->u.rv))
2004
2005#define CONST_FIXED_VALUE(r)((const struct fixed_value *) (&(r)->u.fv)) \
2006 ((const struct fixed_value *) XCNMPFV (r, CONST_FIXED, VOIDmode)(&(r)->u.fv))
2007#define CONST_FIXED_VALUE_HIGH(r)((long) (((const struct fixed_value *) (&(r)->u.fv))->
data.high))
\
2008 ((HOST_WIDE_INTlong) (CONST_FIXED_VALUE (r)((const struct fixed_value *) (&(r)->u.fv))->data.high))
2009#define CONST_FIXED_VALUE_LOW(r)((long) (((const struct fixed_value *) (&(r)->u.fv))->
data.low))
\
2010 ((HOST_WIDE_INTlong) (CONST_FIXED_VALUE (r)((const struct fixed_value *) (&(r)->u.fv))->data.low))
2011
2012/* For a CONST_VECTOR, return element #n. */
2013#define CONST_VECTOR_ELT(RTX, N)const_vector_elt (RTX, N) const_vector_elt (RTX, N)
2014
2015/* See rtl.texi for a description of these macros. */
2016#define CONST_VECTOR_NPATTERNS(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CONST_VECTOR) rtl_check_failed_flag
("CONST_VECTOR_NPATTERNS", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2016, __FUNCTION__); _rtx; }) ->u2.const_vector.npatterns
)
\
2017 (RTL_FLAG_CHECK1 ("CONST_VECTOR_NPATTERNS", (RTX), CONST_VECTOR)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != CONST_VECTOR) rtl_check_failed_flag
("CONST_VECTOR_NPATTERNS", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2017, __FUNCTION__); _rtx; })
\
2018 ->u2.const_vector.npatterns)
2019
2020#define CONST_VECTOR_NELTS_PER_PATTERN(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CONST_VECTOR) rtl_check_failed_flag
("CONST_VECTOR_NELTS_PER_PATTERN", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2020, __FUNCTION__); _rtx; }) ->u2.const_vector.nelts_per_pattern
)
\
2021 (RTL_FLAG_CHECK1 ("CONST_VECTOR_NELTS_PER_PATTERN", (RTX), CONST_VECTOR)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != CONST_VECTOR) rtl_check_failed_flag
("CONST_VECTOR_NELTS_PER_PATTERN", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2021, __FUNCTION__); _rtx; })
\
2022 ->u2.const_vector.nelts_per_pattern)
2023
2024#define CONST_VECTOR_DUPLICATE_P(RTX)((__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CONST_VECTOR) rtl_check_failed_flag
("CONST_VECTOR_NELTS_PER_PATTERN", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2024, __FUNCTION__); _rtx; }) ->u2.const_vector.nelts_per_pattern
) == 1)
\
2025 (CONST_VECTOR_NELTS_PER_PATTERN (RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CONST_VECTOR) rtl_check_failed_flag
("CONST_VECTOR_NELTS_PER_PATTERN", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2025, __FUNCTION__); _rtx; }) ->u2.const_vector.nelts_per_pattern
)
== 1)
2026
2027#define CONST_VECTOR_STEPPED_P(RTX)((__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CONST_VECTOR) rtl_check_failed_flag
("CONST_VECTOR_NELTS_PER_PATTERN", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2027, __FUNCTION__); _rtx; }) ->u2.const_vector.nelts_per_pattern
) == 3)
\
2028 (CONST_VECTOR_NELTS_PER_PATTERN (RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != CONST_VECTOR) rtl_check_failed_flag
("CONST_VECTOR_NELTS_PER_PATTERN", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2028, __FUNCTION__); _rtx; }) ->u2.const_vector.nelts_per_pattern
)
== 3)
2029
2030#define CONST_VECTOR_ENCODED_ELT(RTX, N)(((((RTX)->u.fld[0]).rt_rtvec))->elem[N]) XCVECEXP (RTX, 0, N, CONST_VECTOR)(((((RTX)->u.fld[0]).rt_rtvec))->elem[N])
2031
2032/* Return the number of elements encoded directly in a CONST_VECTOR. */
2033
2034inline unsigned int
2035const_vector_encoded_nelts (const_rtx x)
2036{
2037 return CONST_VECTOR_NPATTERNS (x)(__extension__ ({ __typeof ((x)) const _rtx = ((x)); if (((enum
rtx_code) (_rtx)->code) != CONST_VECTOR) rtl_check_failed_flag
("CONST_VECTOR_NPATTERNS", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2037, __FUNCTION__); _rtx; }) ->u2.const_vector.npatterns
)
* CONST_VECTOR_NELTS_PER_PATTERN (x)(__extension__ ({ __typeof ((x)) const _rtx = ((x)); if (((enum
rtx_code) (_rtx)->code) != CONST_VECTOR) rtl_check_failed_flag
("CONST_VECTOR_NELTS_PER_PATTERN", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2037, __FUNCTION__); _rtx; }) ->u2.const_vector.nelts_per_pattern
)
;
2038}
2039
2040/* For a CONST_VECTOR, return the number of elements in a vector. */
2041#define CONST_VECTOR_NUNITS(RTX)GET_MODE_NUNITS (((machine_mode) (RTX)->mode)) GET_MODE_NUNITS (GET_MODE (RTX)((machine_mode) (RTX)->mode))
2042
2043/* For a SUBREG rtx, SUBREG_REG extracts the value we want a subreg of.
2044 SUBREG_BYTE extracts the byte-number. */
2045
2046#define SUBREG_REG(RTX)(((RTX)->u.fld[0]).rt_rtx) XCEXP (RTX, 0, SUBREG)(((RTX)->u.fld[0]).rt_rtx)
2047#define SUBREG_BYTE(RTX)(((RTX)->u.fld[1]).rt_subreg) XCSUBREG (RTX, 1, SUBREG)(((RTX)->u.fld[1]).rt_subreg)
2048
2049/* in rtlanal.cc */
2050/* Return the right cost to give to an operation
2051 to make the cost of the corresponding register-to-register instruction
2052 N times that of a fast register-to-register instruction. */
2053#define COSTS_N_INSNS(N)((N) * 4) ((N) * 4)
2054
2055/* Maximum cost of an rtl expression. This value has the special meaning
2056 not to use an rtx with this cost under any circumstances. */
2057#define MAX_COST2147483647 INT_MAX2147483647
2058
2059/* Return true if CODE always has VOIDmode. */
2060
2061inline bool
2062always_void_p (enum rtx_code code)
2063{
2064 return code == SET;
2065}
2066
2067/* A structure to hold all available cost information about an rtl
2068 expression. */
2069struct full_rtx_costs
2070{
2071 int speed;
2072 int size;
2073};
2074
2075/* Initialize a full_rtx_costs structure C to the maximum cost. */
2076inline void
2077init_costs_to_max (struct full_rtx_costs *c)
2078{
2079 c->speed = MAX_COST2147483647;
2080 c->size = MAX_COST2147483647;
2081}
2082
2083/* Initialize a full_rtx_costs structure C to zero cost. */
2084inline void
2085init_costs_to_zero (struct full_rtx_costs *c)
2086{
2087 c->speed = 0;
2088 c->size = 0;
2089}
2090
2091/* Compare two full_rtx_costs structures A and B, returning true
2092 if A < B when optimizing for speed. */
2093inline bool
2094costs_lt_p (struct full_rtx_costs *a, struct full_rtx_costs *b,
2095 bool speed)
2096{
2097 if (speed)
2098 return (a->speed < b->speed
2099 || (a->speed == b->speed && a->size < b->size));
2100 else
2101 return (a->size < b->size
2102 || (a->size == b->size && a->speed < b->speed));
2103}
2104
2105/* Increase both members of the full_rtx_costs structure C by the
2106 cost of N insns. */
2107inline void
2108costs_add_n_insns (struct full_rtx_costs *c, int n)
2109{
2110 c->speed += COSTS_N_INSNS (n)((n) * 4);
2111 c->size += COSTS_N_INSNS (n)((n) * 4);
2112}
2113
2114/* Describes the shape of a subreg:
2115
2116 inner_mode == the mode of the SUBREG_REG
2117 offset == the SUBREG_BYTE
2118 outer_mode == the mode of the SUBREG itself. */
2119class subreg_shape {
2120public:
2121 subreg_shape (machine_mode, poly_uint16, machine_mode);
2122 bool operator == (const subreg_shape &) const;
2123 bool operator != (const subreg_shape &) const;
2124 unsigned HOST_WIDE_INTlong unique_id () const;
2125
2126 machine_mode inner_mode;
2127 poly_uint16 offset;
2128 machine_mode outer_mode;
2129};
2130
2131inline
2132subreg_shape::subreg_shape (machine_mode inner_mode_in,
2133 poly_uint16 offset_in,
2134 machine_mode outer_mode_in)
2135 : inner_mode (inner_mode_in), offset (offset_in), outer_mode (outer_mode_in)
2136{}
2137
2138inline bool
2139subreg_shape::operator == (const subreg_shape &other) const
2140{
2141 return (inner_mode == other.inner_mode
2142 && known_eq (offset, other.offset)(!maybe_ne (offset, other.offset))
2143 && outer_mode == other.outer_mode);
2144}
2145
2146inline bool
2147subreg_shape::operator != (const subreg_shape &other) const
2148{
2149 return !operator == (other);
2150}
2151
2152/* Return an integer that uniquely identifies this shape. Structures
2153 like rtx_def assume that a mode can fit in an 8-bit bitfield and no
2154 current mode is anywhere near being 65536 bytes in size, so the
2155 id comfortably fits in an int. */
2156
2157inline unsigned HOST_WIDE_INTlong
2158subreg_shape::unique_id () const
2159{
2160 { STATIC_ASSERT (MAX_MACHINE_MODE <= 256)static_assert ((MAX_MACHINE_MODE <= 256), "MAX_MACHINE_MODE <= 256"
)
; }
2161 { STATIC_ASSERT (NUM_POLY_INT_COEFFS <= 3)static_assert ((1 <= 3), "NUM_POLY_INT_COEFFS <= 3"); }
2162 { STATIC_ASSERT (sizeof (offset.coeffs[0]) <= 2)static_assert ((sizeof (offset.coeffs[0]) <= 2), "sizeof (offset.coeffs[0]) <= 2"
)
; }
2163 int res = (int) inner_mode + ((int) outer_mode << 8);
2164 for (int i = 0; i < NUM_POLY_INT_COEFFS1; ++i)
2165 res += (HOST_WIDE_INTlong) offset.coeffs[i] << ((1 + i) * 16);
2166 return res;
2167}
2168
2169/* Return the shape of a SUBREG rtx. */
2170
2171inline subreg_shape
2172shape_of_subreg (const_rtx x)
2173{
2174 return subreg_shape (GET_MODE (SUBREG_REG (x))((machine_mode) ((((x)->u.fld[0]).rt_rtx))->mode),
2175 SUBREG_BYTE (x)(((x)->u.fld[1]).rt_subreg), GET_MODE (x)((machine_mode) (x)->mode));
2176}
2177
2178/* Information about an address. This structure is supposed to be able
2179 to represent all supported target addresses. Please extend it if it
2180 is not yet general enough. */
2181struct address_info {
2182 /* The mode of the value being addressed, or VOIDmode if this is
2183 a load-address operation with no known address mode. */
2184 machine_mode mode;
2185
2186 /* The address space. */
2187 addr_space_t as;
2188
2189 /* True if this is an RTX_AUTOINC address. */
2190 bool autoinc_p;
2191
2192 /* A pointer to the top-level address. */
2193 rtx *outer;
2194
2195 /* A pointer to the inner address, after all address mutations
2196 have been stripped from the top-level address. It can be one
2197 of the following:
2198
2199 - A {PRE,POST}_{INC,DEC} of *BASE. SEGMENT, INDEX and DISP are null.
2200
2201 - A {PRE,POST}_MODIFY of *BASE. In this case either INDEX or DISP
2202 points to the step value, depending on whether the step is variable
2203 or constant respectively. SEGMENT is null.
2204
2205 - A plain sum of the form SEGMENT + BASE + INDEX + DISP,
2206 with null fields evaluating to 0. */
2207 rtx *inner;
2208
2209 /* Components that make up *INNER. Each one may be null or nonnull.
2210 When nonnull, their meanings are as follows:
2211
2212 - *SEGMENT is the "segment" of memory to which the address refers.
2213 This value is entirely target-specific and is only called a "segment"
2214 because that's its most typical use. It contains exactly one UNSPEC,
2215 pointed to by SEGMENT_TERM. The contents of *SEGMENT do not need
2216 reloading.
2217
2218 - *BASE is a variable expression representing a base address.
2219 It contains exactly one REG, SUBREG or MEM, pointed to by BASE_TERM.
2220
2221 - *INDEX is a variable expression representing an index value.
2222 It may be a scaled expression, such as a MULT. It has exactly
2223 one REG, SUBREG or MEM, pointed to by INDEX_TERM.
2224
2225 - *DISP is a constant, possibly mutated. DISP_TERM points to the
2226 unmutated RTX_CONST_OBJ. */
2227 rtx *segment;
2228 rtx *base;
2229 rtx *index;
2230 rtx *disp;
2231
2232 rtx *segment_term;
2233 rtx *base_term;
2234 rtx *index_term;
2235 rtx *disp_term;
2236
2237 /* In a {PRE,POST}_MODIFY address, this points to a second copy
2238 of BASE_TERM, otherwise it is null. */
2239 rtx *base_term2;
2240
2241 /* ADDRESS if this structure describes an address operand, MEM if
2242 it describes a MEM address. */
2243 enum rtx_code addr_outer_code;
2244
2245 /* If BASE is nonnull, this is the code of the rtx that contains it. */
2246 enum rtx_code base_outer_code;
2247};
2248
2249/* This is used to bundle an rtx and a mode together so that the pair
2250 can be used with the wi:: routines. If we ever put modes into rtx
2251 integer constants, this should go away and then just pass an rtx in. */
2252typedef std::pair <rtx, machine_mode> rtx_mode_t;
2253
2254namespace wi
2255{
2256 template <>
2257 struct int_traits <rtx_mode_t>
2258 {
2259 static const enum precision_type precision_type = VAR_PRECISION;
2260 static const bool host_dependent_precision = false;
2261 /* This ought to be true, except for the special case that BImode
2262 is canonicalized to STORE_FLAG_VALUE, which might be 1. */
2263 static const bool is_sign_extended = false;
2264 static unsigned int get_precision (const rtx_mode_t &);
2265 static wi::storage_ref decompose (HOST_WIDE_INTlong *, unsigned int,
2266 const rtx_mode_t &);
2267 };
2268}
2269
2270inline unsigned int
2271wi::int_traits <rtx_mode_t>::get_precision (const rtx_mode_t &x)
2272{
2273 return GET_MODE_PRECISION (as_a <scalar_mode> (x.second));
2274}
2275
2276inline wi::storage_ref
2277wi::int_traits <rtx_mode_t>::decompose (HOST_WIDE_INTlong *,
2278 unsigned int precision,
2279 const rtx_mode_t &x)
2280{
2281 gcc_checking_assert (precision == get_precision (x))((void)(!(precision == get_precision (x)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2281, __FUNCTION__), 0 : 0))
;
2282 switch (GET_CODE (x.first)((enum rtx_code) (x.first)->code))
2283 {
2284 case CONST_INT:
2285 if (precision < HOST_BITS_PER_WIDE_INT64)
2286 /* Nonzero BImodes are stored as STORE_FLAG_VALUE, which on many
2287 targets is 1 rather than -1. */
2288 gcc_checking_assert (INTVAL (x.first)((void)(!(((x.first)->u.hwint[0]) == sext_hwi (((x.first)->
u.hwint[0]), precision) || (x.second == (scalar_int_mode ((scalar_int_mode
::from_int) E_BImode)) && ((x.first)->u.hwint[0]) ==
1)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2290, __FUNCTION__), 0 : 0))
2289 == sext_hwi (INTVAL (x.first), precision)((void)(!(((x.first)->u.hwint[0]) == sext_hwi (((x.first)->
u.hwint[0]), precision) || (x.second == (scalar_int_mode ((scalar_int_mode
::from_int) E_BImode)) && ((x.first)->u.hwint[0]) ==
1)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2290, __FUNCTION__), 0 : 0))
2290 || (x.second == BImode && INTVAL (x.first) == 1))((void)(!(((x.first)->u.hwint[0]) == sext_hwi (((x.first)->
u.hwint[0]), precision) || (x.second == (scalar_int_mode ((scalar_int_mode
::from_int) E_BImode)) && ((x.first)->u.hwint[0]) ==
1)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2290, __FUNCTION__), 0 : 0))
;
2291
2292 return wi::storage_ref (&INTVAL (x.first)((x.first)->u.hwint[0]), 1, precision);
2293
2294 case CONST_WIDE_INT:
2295 return wi::storage_ref (&CONST_WIDE_INT_ELT (x.first, 0)((x.first)->u.hwiv.elem[0]),
2296 CONST_WIDE_INT_NUNITS (x.first)((int)__extension__ ({ __typeof ((x.first)) const _rtx = ((x.
first)); if (((enum rtx_code) (_rtx)->code) != CONST_WIDE_INT
) rtl_check_failed_flag ("CWI_GET_NUM_ELEM", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2296, __FUNCTION__); _rtx; })->u2.num_elem)
, precision);
2297
2298#if TARGET_SUPPORTS_WIDE_INT1 == 0
2299 case CONST_DOUBLE:
2300 return wi::storage_ref (&CONST_DOUBLE_LOW (x.first)((x.first)->u.hwint[0]), 2, precision);
2301#endif
2302
2303 default:
2304 gcc_unreachable ()(fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2304, __FUNCTION__))
;
2305 }
2306}
2307
2308namespace wi
2309{
2310 hwi_with_prec shwi (HOST_WIDE_INTlong, machine_mode mode);
2311 wide_int min_value (machine_mode, signop);
2312 wide_int max_value (machine_mode, signop);
2313}
2314
2315inline wi::hwi_with_prec
2316wi::shwi (HOST_WIDE_INTlong val, machine_mode mode)
2317{
2318 return shwi (val, GET_MODE_PRECISION (as_a <scalar_mode> (mode)));
2319}
2320
2321/* Produce the smallest number that is represented in MODE. The precision
2322 is taken from MODE and the sign from SGN. */
2323inline wide_int
2324wi::min_value (machine_mode mode, signop sgn)
2325{
2326 return min_value (GET_MODE_PRECISION (as_a <scalar_mode> (mode)), sgn);
2327}
2328
2329/* Produce the largest number that is represented in MODE. The precision
2330 is taken from MODE and the sign from SGN. */
2331inline wide_int
2332wi::max_value (machine_mode mode, signop sgn)
2333{
2334 return max_value (GET_MODE_PRECISION (as_a <scalar_mode> (mode)), sgn);
2335}
2336
2337namespace wi
2338{
2339 typedef poly_int<NUM_POLY_INT_COEFFS1,
2340 generic_wide_int <wide_int_ref_storage <false, false> > >
2341 rtx_to_poly_wide_ref;
2342 rtx_to_poly_wide_ref to_poly_wide (const_rtx, machine_mode);
2343}
2344
2345/* Return the value of a CONST_POLY_INT in its native precision. */
2346
2347inline wi::rtx_to_poly_wide_ref
2348const_poly_int_value (const_rtx x)
2349{
2350 poly_int<NUM_POLY_INT_COEFFS1, WIDE_INT_REF_FOR (wide_int)generic_wide_int <wide_int_ref_storage <wi::int_traits <
wide_int>::is_sign_extended, wi::int_traits <wide_int>
::host_dependent_precision> >
> res;
2351 for (unsigned int i = 0; i < NUM_POLY_INT_COEFFS1; ++i)
2352 res.coeffs[i] = CONST_POLY_INT_COEFFS (x)(__extension__ ({ __typeof ((x)) const _rtx = ((x)); if (((enum
rtx_code) (_rtx)->code) != CONST_POLY_INT) rtl_check_failed_flag
("CONST_POLY_INT_COEFFS", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2352, __FUNCTION__); _rtx; })->u.cpi.coeffs)
[i];
2353 return res;
2354}
2355
2356/* Return true if X is a scalar integer or a CONST_POLY_INT. The value
2357 can then be extracted using wi::to_poly_wide. */
2358
2359inline bool
2360poly_int_rtx_p (const_rtx x)
2361{
2362 return CONST_SCALAR_INT_P (x)((((enum rtx_code) (x)->code) == CONST_INT) || (((enum rtx_code
) (x)->code) == CONST_WIDE_INT))
|| CONST_POLY_INT_P (x)(1 > 1 && ((enum rtx_code) (x)->code) == CONST_POLY_INT
)
;
2363}
2364
2365/* Access X (which satisfies poly_int_rtx_p) as a poly_wide_int.
2366 MODE is the mode of X. */
2367
2368inline wi::rtx_to_poly_wide_ref
2369wi::to_poly_wide (const_rtx x, machine_mode mode)
2370{
2371 if (CONST_POLY_INT_P (x)(1 > 1 && ((enum rtx_code) (x)->code) == CONST_POLY_INT
)
)
2372 return const_poly_int_value (x);
2373 return rtx_mode_t (const_cast<rtx> (x), mode);
2374}
2375
2376/* Return the value of X as a poly_int64. */
2377
2378inline poly_int64
2379rtx_to_poly_int64 (const_rtx x)
2380{
2381 if (CONST_POLY_INT_P (x)(1 > 1 && ((enum rtx_code) (x)->code) == CONST_POLY_INT
)
)
2382 {
2383 poly_int64 res;
2384 for (unsigned int i = 0; i < NUM_POLY_INT_COEFFS1; ++i)
2385 res.coeffs[i] = CONST_POLY_INT_COEFFS (x)(__extension__ ({ __typeof ((x)) const _rtx = ((x)); if (((enum
rtx_code) (_rtx)->code) != CONST_POLY_INT) rtl_check_failed_flag
("CONST_POLY_INT_COEFFS", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2385, __FUNCTION__); _rtx; })->u.cpi.coeffs)
[i].to_shwi ();
2386 return res;
2387 }
2388 return INTVAL (x)((x)->u.hwint[0]);
2389}
2390
2391/* Return true if arbitrary value X is an integer constant that can
2392 be represented as a poly_int64. Store the value in *RES if so,
2393 otherwise leave it unmodified. */
2394
2395inline bool
2396poly_int_rtx_p (const_rtx x, poly_int64_pod *res)
2397{
2398 if (CONST_INT_P (x)(((enum rtx_code) (x)->code) == CONST_INT))
2399 {
2400 *res = INTVAL (x)((x)->u.hwint[0]);
2401 return true;
2402 }
2403 if (CONST_POLY_INT_P (x)(1 > 1 && ((enum rtx_code) (x)->code) == CONST_POLY_INT
)
)
2404 {
2405 for (unsigned int i = 0; i < NUM_POLY_INT_COEFFS1; ++i)
2406 if (!wi::fits_shwi_p (CONST_POLY_INT_COEFFS (x)(__extension__ ({ __typeof ((x)) const _rtx = ((x)); if (((enum
rtx_code) (_rtx)->code) != CONST_POLY_INT) rtl_check_failed_flag
("CONST_POLY_INT_COEFFS", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2406, __FUNCTION__); _rtx; })->u.cpi.coeffs)
[i]))
2407 return false;
2408 for (unsigned int i = 0; i < NUM_POLY_INT_COEFFS1; ++i)
2409 res->coeffs[i] = CONST_POLY_INT_COEFFS (x)(__extension__ ({ __typeof ((x)) const _rtx = ((x)); if (((enum
rtx_code) (_rtx)->code) != CONST_POLY_INT) rtl_check_failed_flag
("CONST_POLY_INT_COEFFS", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2409, __FUNCTION__); _rtx; })->u.cpi.coeffs)
[i].to_shwi ();
2410 return true;
2411 }
2412 return false;
2413}
2414
2415extern void init_rtlanal (void);
2416extern int rtx_cost (rtx, machine_mode, enum rtx_code, int, bool);
2417extern int address_cost (rtx, machine_mode, addr_space_t, bool);
2418extern void get_full_rtx_cost (rtx, machine_mode, enum rtx_code, int,
2419 struct full_rtx_costs *);
2420extern bool native_encode_rtx (machine_mode, rtx, vec<target_unit> &,
2421 unsigned int, unsigned int);
2422extern rtx native_decode_rtx (machine_mode, const vec<target_unit> &,
2423 unsigned int);
2424extern rtx native_decode_vector_rtx (machine_mode, const vec<target_unit> &,
2425 unsigned int, unsigned int, unsigned int);
2426extern poly_uint64 subreg_lsb (const_rtx);
2427extern poly_uint64 subreg_size_lsb (poly_uint64, poly_uint64, poly_uint64);
2428extern poly_uint64 subreg_size_offset_from_lsb (poly_uint64, poly_uint64,
2429 poly_uint64);
2430extern bool read_modify_subreg_p (const_rtx);
2431
2432/* Given a subreg's OUTER_MODE, INNER_MODE, and SUBREG_BYTE, return the
2433 bit offset at which the subreg begins (counting from the least significant
2434 bit of the operand). */
2435
2436inline poly_uint64
2437subreg_lsb_1 (machine_mode outer_mode, machine_mode inner_mode,
2438 poly_uint64 subreg_byte)
2439{
2440 return subreg_size_lsb (GET_MODE_SIZE (outer_mode),
2441 GET_MODE_SIZE (inner_mode), subreg_byte);
2442}
2443
2444/* Return the subreg byte offset for a subreg whose outer mode is
2445 OUTER_MODE, whose inner mode is INNER_MODE, and where there are
2446 LSB_SHIFT *bits* between the lsb of the outer value and the lsb of
2447 the inner value. This is the inverse of subreg_lsb_1 (which converts
2448 byte offsets to bit shifts). */
2449
2450inline poly_uint64
2451subreg_offset_from_lsb (machine_mode outer_mode,
2452 machine_mode inner_mode,
2453 poly_uint64 lsb_shift)
2454{
2455 return subreg_size_offset_from_lsb (GET_MODE_SIZE (outer_mode),
2456 GET_MODE_SIZE (inner_mode), lsb_shift);
2457}
2458
2459extern unsigned int subreg_regno_offset (unsigned int, machine_mode,
2460 poly_uint64, machine_mode);
2461extern bool subreg_offset_representable_p (unsigned int, machine_mode,
2462 poly_uint64, machine_mode);
2463extern unsigned int subreg_regno (const_rtx);
2464extern int simplify_subreg_regno (unsigned int, machine_mode,
2465 poly_uint64, machine_mode);
2466extern int lowpart_subreg_regno (unsigned int, machine_mode,
2467 machine_mode);
2468extern unsigned int subreg_nregs (const_rtx);
2469extern unsigned int subreg_nregs_with_regno (unsigned int, const_rtx);
2470extern unsigned HOST_WIDE_INTlong nonzero_bits (const_rtx, machine_mode);
2471extern unsigned int num_sign_bit_copies (const_rtx, machine_mode);
2472extern bool constant_pool_constant_p (rtx);
2473extern bool truncated_to_mode (machine_mode, const_rtx);
2474extern int low_bitmask_len (machine_mode, unsigned HOST_WIDE_INTlong);
2475extern void split_double (rtx, rtx *, rtx *);
2476extern rtx *strip_address_mutations (rtx *, enum rtx_code * = 0);
2477extern void decompose_address (struct address_info *, rtx *,
2478 machine_mode, addr_space_t, enum rtx_code);
2479extern void decompose_lea_address (struct address_info *, rtx *);
2480extern void decompose_mem_address (struct address_info *, rtx);
2481extern void update_address (struct address_info *);
2482extern HOST_WIDE_INTlong get_index_scale (const struct address_info *);
2483extern enum rtx_code get_index_code (const struct address_info *);
2484
2485/* 1 if RTX is a subreg containing a reg that is already known to be
2486 sign- or zero-extended from the mode of the subreg to the mode of
2487 the reg. SUBREG_PROMOTED_UNSIGNED_P gives the signedness of the
2488 extension.
2489
2490 When used as a LHS, is means that this extension must be done
2491 when assigning to SUBREG_REG. */
2492
2493#define SUBREG_PROMOTED_VAR_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("SUBREG_PROMOTED", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2493, __FUNCTION__); _rtx; })->in_struct)
\
2494 (RTL_FLAG_CHECK1 ("SUBREG_PROMOTED", (RTX), SUBREG)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("SUBREG_PROMOTED", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2494, __FUNCTION__); _rtx; })
->in_struct)
2495
2496/* Valid for subregs which are SUBREG_PROMOTED_VAR_P(). In that case
2497 this gives the necessary extensions:
2498 0 - signed (SPR_SIGNED)
2499 1 - normal unsigned (SPR_UNSIGNED)
2500 2 - value is both sign and unsign extended for mode
2501 (SPR_SIGNED_AND_UNSIGNED).
2502 -1 - pointer unsigned, which most often can be handled like unsigned
2503 extension, except for generating instructions where we need to
2504 emit special code (ptr_extend insns) on some architectures
2505 (SPR_POINTER). */
2506
2507const int SRP_POINTER = -1;
2508const int SRP_SIGNED = 0;
2509const int SRP_UNSIGNED = 1;
2510const int SRP_SIGNED_AND_UNSIGNED = 2;
2511
2512/* Sets promoted mode for SUBREG_PROMOTED_VAR_P(). */
2513#define SUBREG_PROMOTED_SET(RTX, VAL)do { rtx const _rtx = __extension__ ({ __typeof ((RTX)) const
_rtx = ((RTX)); if (((enum rtx_code) (_rtx)->code) != SUBREG
) rtl_check_failed_flag ("SUBREG_PROMOTED_SET", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2513, __FUNCTION__); _rtx; }); switch (VAL) { case SRP_POINTER
: _rtx->volatil = 0; _rtx->unchanging = 0; break; case SRP_SIGNED
: _rtx->volatil = 0; _rtx->unchanging = 1; break; case SRP_UNSIGNED
: _rtx->volatil = 1; _rtx->unchanging = 0; break; case SRP_SIGNED_AND_UNSIGNED
: _rtx->volatil = 1; _rtx->unchanging = 1; break; } } while
(0)
\
2514do { \
2515 rtx const _rtx = RTL_FLAG_CHECK1 ("SUBREG_PROMOTED_SET", \__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("SUBREG_PROMOTED_SET", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2516, __FUNCTION__); _rtx; })
2516 (RTX), SUBREG)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("SUBREG_PROMOTED_SET", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2516, __FUNCTION__); _rtx; })
; \
2517 switch (VAL) \
2518 { \
2519 case SRP_POINTER: \
2520 _rtx->volatil = 0; \
2521 _rtx->unchanging = 0; \
2522 break; \
2523 case SRP_SIGNED: \
2524 _rtx->volatil = 0; \
2525 _rtx->unchanging = 1; \
2526 break; \
2527 case SRP_UNSIGNED: \
2528 _rtx->volatil = 1; \
2529 _rtx->unchanging = 0; \
2530 break; \
2531 case SRP_SIGNED_AND_UNSIGNED: \
2532 _rtx->volatil = 1; \
2533 _rtx->unchanging = 1; \
2534 break; \
2535 } \
2536} while (0)
2537
2538/* Gets the value stored in promoted mode for SUBREG_PROMOTED_VAR_P(),
2539 including SRP_SIGNED_AND_UNSIGNED if promoted for
2540 both signed and unsigned. */
2541#define SUBREG_PROMOTED_GET(RTX)(2 * (__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX));
if (((enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("SUBREG_PROMOTED_GET", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2541, __FUNCTION__); _rtx; })->volatil) + (RTX)->unchanging
- 1)
\
2542 (2 * (RTL_FLAG_CHECK1 ("SUBREG_PROMOTED_GET", (RTX), SUBREG)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("SUBREG_PROMOTED_GET", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2542, __FUNCTION__); _rtx; })
->volatil)\
2543 + (RTX)->unchanging - 1)
2544
2545/* Returns sign of promoted mode for SUBREG_PROMOTED_VAR_P(). */
2546#define SUBREG_PROMOTED_SIGN(RTX)((__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("SUBREG_PROMOTED_SIGN", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2546, __FUNCTION__); _rtx; })->volatil) ? 1 : (RTX)->
unchanging - 1)
\
2547 ((RTL_FLAG_CHECK1 ("SUBREG_PROMOTED_SIGN", (RTX), SUBREG)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("SUBREG_PROMOTED_SIGN", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2547, __FUNCTION__); _rtx; })
->volatil) ? 1\
2548 : (RTX)->unchanging - 1)
2549
2550/* Predicate to check if RTX of SUBREG_PROMOTED_VAR_P() is promoted
2551 for SIGNED type. */
2552#define SUBREG_PROMOTED_SIGNED_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("SUBREG_PROMOTED_SIGNED_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2552, __FUNCTION__); _rtx; })->unchanging)
\
2553 (RTL_FLAG_CHECK1 ("SUBREG_PROMOTED_SIGNED_P", (RTX), SUBREG)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("SUBREG_PROMOTED_SIGNED_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2553, __FUNCTION__); _rtx; })
->unchanging)
2554
2555/* Predicate to check if RTX of SUBREG_PROMOTED_VAR_P() is promoted
2556 for UNSIGNED type. */
2557#define SUBREG_PROMOTED_UNSIGNED_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("SUBREG_PROMOTED_UNSIGNED_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2557, __FUNCTION__); _rtx; })->volatil)
\
2558 (RTL_FLAG_CHECK1 ("SUBREG_PROMOTED_UNSIGNED_P", (RTX), SUBREG)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("SUBREG_PROMOTED_UNSIGNED_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2558, __FUNCTION__); _rtx; })
->volatil)
2559
2560/* Checks if RTX of SUBREG_PROMOTED_VAR_P() is promoted for given SIGN. */
2561#define SUBREG_CHECK_PROMOTED_SIGN(RTX, SIGN)((SIGN) == SRP_POINTER ? (2 * (__extension__ ({ __typeof ((RTX
)) const _rtx = ((RTX)); if (((enum rtx_code) (_rtx)->code
) != SUBREG) rtl_check_failed_flag ("SUBREG_PROMOTED_GET", _rtx
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2561, __FUNCTION__); _rtx; })->volatil) + (RTX)->unchanging
- 1) == SRP_POINTER : (SIGN) == SRP_SIGNED ? (__extension__ (
{ __typeof ((RTX)) const _rtx = ((RTX)); if (((enum rtx_code)
(_rtx)->code) != SUBREG) rtl_check_failed_flag ("SUBREG_PROMOTED_SIGNED_P"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2561, __FUNCTION__); _rtx; })->unchanging) : (__extension__
({ __typeof ((RTX)) const _rtx = ((RTX)); if (((enum rtx_code
) (_rtx)->code) != SUBREG) rtl_check_failed_flag ("SUBREG_PROMOTED_UNSIGNED_P"
, _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2561, __FUNCTION__); _rtx; })->volatil))
\
2562((SIGN) == SRP_POINTER ? SUBREG_PROMOTED_GET (RTX)(2 * (__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX));
if (((enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("SUBREG_PROMOTED_GET", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2562, __FUNCTION__); _rtx; })->volatil) + (RTX)->unchanging
- 1)
== SRP_POINTER \
2563 : (SIGN) == SRP_SIGNED ? SUBREG_PROMOTED_SIGNED_P (RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("SUBREG_PROMOTED_SIGNED_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2563, __FUNCTION__); _rtx; })->unchanging)
\
2564 : SUBREG_PROMOTED_UNSIGNED_P (RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("SUBREG_PROMOTED_UNSIGNED_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2564, __FUNCTION__); _rtx; })->volatil)
)
2565
2566/* True if the REG is the static chain register for some CALL_INSN. */
2567#define STATIC_CHAIN_REG_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != REG) rtl_check_failed_flag
("STATIC_CHAIN_REG_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2567, __FUNCTION__); _rtx; })->jump)
\
2568 (RTL_FLAG_CHECK1 ("STATIC_CHAIN_REG_P", (RTX), REG)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != REG) rtl_check_failed_flag
("STATIC_CHAIN_REG_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2568, __FUNCTION__); _rtx; })
->jump)
2569
2570/* True if the subreg was generated by LRA for reload insns. Such
2571 subregs are valid only during LRA. */
2572#define LRA_SUBREG_P(RTX)(__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if (
((enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("LRA_SUBREG_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2572, __FUNCTION__); _rtx; })->jump)
\
2573 (RTL_FLAG_CHECK1 ("LRA_SUBREG_P", (RTX), SUBREG)__extension__ ({ __typeof ((RTX)) const _rtx = ((RTX)); if ((
(enum rtx_code) (_rtx)->code) != SUBREG) rtl_check_failed_flag
("LRA_SUBREG_P", _rtx, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/rtl.h"
, 2573, __FUNCTION__); _rtx; })
->jump)
2574