annotate gcc/testsuite/gcc.dg/pr42388.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
kono
parents:
diff changeset
2 /* { dg-options "-O2 -fselective-scheduling -fmodulo-sched" } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 enum rtx_code
kono
parents:
diff changeset
5 {
kono
parents:
diff changeset
6 INSN, ADDR_VEC, ADDR_DIFF_VEC, CALL_INSN, CODE_LABEL, BARRIER, NOTE
kono
parents:
diff changeset
7 };
kono
parents:
diff changeset
8 typedef union rtunion_def
kono
parents:
diff changeset
9 {
kono
parents:
diff changeset
10 int rtint;
kono
parents:
diff changeset
11 char *rtstr;
kono
parents:
diff changeset
12 struct rtx_def *rtx;
kono
parents:
diff changeset
13 struct rtvec_def *rtvec;
kono
parents:
diff changeset
14 }
kono
parents:
diff changeset
15 rtunion;
kono
parents:
diff changeset
16 typedef struct rtx_def
kono
parents:
diff changeset
17 {
kono
parents:
diff changeset
18 unsigned short code;
kono
parents:
diff changeset
19 rtunion fld[1];
kono
parents:
diff changeset
20 }
kono
parents:
diff changeset
21 *rtx;
kono
parents:
diff changeset
22 typedef struct rtvec_def
kono
parents:
diff changeset
23 {
kono
parents:
diff changeset
24 unsigned num_elem;
kono
parents:
diff changeset
25 rtunion elem[1];
kono
parents:
diff changeset
26 }
kono
parents:
diff changeset
27 *rtvec;
kono
parents:
diff changeset
28 extern rtx emit_barrier (void);
kono
parents:
diff changeset
29 extern rtx emit_note (char *);
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 static void
kono
parents:
diff changeset
32 copy_loop_body (rtx *map)
kono
parents:
diff changeset
33 {
kono
parents:
diff changeset
34 int i;
kono
parents:
diff changeset
35 rtx insn, copy;
kono
parents:
diff changeset
36 rtx pat = copy->fld[3].rtx;
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38 switch (insn->code)
kono
parents:
diff changeset
39 {
kono
parents:
diff changeset
40 case INSN:
kono
parents:
diff changeset
41 if (insn->fld[7].rtx)
kono
parents:
diff changeset
42 {
kono
parents:
diff changeset
43 }
kono
parents:
diff changeset
44 else if (pat->code == ADDR_VEC || pat->code == ADDR_DIFF_VEC)
kono
parents:
diff changeset
45 {
kono
parents:
diff changeset
46 int diff_vec_p = pat->code == ADDR_DIFF_VEC;
kono
parents:
diff changeset
47 int len = pat->fld[diff_vec_p].rtvec->num_elem;
kono
parents:
diff changeset
48 for (i = 0; i < len; i++)
kono
parents:
diff changeset
49 pat->fld[diff_vec_p].rtvec->elem[i].rtx->fld[5].rtint++;
kono
parents:
diff changeset
50 }
kono
parents:
diff changeset
51 case CALL_INSN:
kono
parents:
diff changeset
52 for (i = 0; i < 64; i++)
kono
parents:
diff changeset
53 map[i] = 0;
kono
parents:
diff changeset
54 case CODE_LABEL:
kono
parents:
diff changeset
55 case BARRIER:
kono
parents:
diff changeset
56 copy = emit_barrier ();
kono
parents:
diff changeset
57 case NOTE:
kono
parents:
diff changeset
58 copy = emit_note ("x");
kono
parents:
diff changeset
59 }
kono
parents:
diff changeset
60 }
kono
parents:
diff changeset
61 void
kono
parents:
diff changeset
62 unroll_loop (int insn_count, rtx *map)
kono
parents:
diff changeset
63 {
kono
parents:
diff changeset
64 if (insn_count > 50)
kono
parents:
diff changeset
65 copy_loop_body (map);
kono
parents:
diff changeset
66 }
kono
parents:
diff changeset
67