]> gcc.gnu.org Git - gcc.git/blame - gcc/postreload.c
Daily bump.
[gcc.git] / gcc / postreload.c
CommitLineData
15e35479 1/* Perform simple optimizations to clean up the result of reload.
6fb5fa3c 2 Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
457eeaae
JJ
3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
4 2010 Free Software Foundation, Inc.
15e35479
KH
5
6This file is part of GCC.
7
8GCC is free software; you can redistribute it and/or modify it under
9the terms of the GNU General Public License as published by the Free
9dcd6f09 10Software Foundation; either version 3, or (at your option) any later
15e35479
KH
11version.
12
13GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14WARRANTY; without even the implied warranty of MERCHANTABILITY or
15FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16for more details.
17
18You should have received a copy of the GNU General Public License
9dcd6f09
NC
19along with GCC; see the file COPYING3. If not see
20<http://www.gnu.org/licenses/>. */
15e35479
KH
21
22#include "config.h"
23#include "system.h"
24#include "coretypes.h"
25#include "tm.h"
26
27#include "machmode.h"
28#include "hard-reg-set.h"
29#include "rtl.h"
30#include "tm_p.h"
31#include "obstack.h"
32#include "insn-config.h"
33#include "flags.h"
34#include "function.h"
35#include "expr.h"
36#include "optabs.h"
37#include "regs.h"
38#include "basic-block.h"
39#include "reload.h"
40#include "recog.h"
41#include "output.h"
42#include "cselib.h"
718f9c0f 43#include "diagnostic-core.h"
15e35479
KH
44#include "toplev.h"
45#include "except.h"
46#include "tree.h"
ef330312
PB
47#include "timevar.h"
48#include "tree-pass.h"
6fb5fa3c
DB
49#include "df.h"
50#include "dbgcnt.h"
15e35479 51
0c20a65f
AJ
52static int reload_cse_noop_set_p (rtx);
53static void reload_cse_simplify (rtx, rtx);
54static void reload_cse_regs_1 (rtx);
55static int reload_cse_simplify_set (rtx, rtx);
56static int reload_cse_simplify_operands (rtx, rtx);
15e35479 57
0c20a65f
AJ
58static void reload_combine (void);
59static void reload_combine_note_use (rtx *, rtx);
7bc980e1 60static void reload_combine_note_store (rtx, const_rtx, void *);
15e35479 61
0c20a65f 62static void reload_cse_move2add (rtx);
7bc980e1 63static void move2add_note_store (rtx, const_rtx, void *);
15e35479
KH
64
65/* Call cse / combine like post-reload optimization phases.
66 FIRST is the first instruction. */
67void
0c20a65f 68reload_cse_regs (rtx first ATTRIBUTE_UNUSED)
15e35479
KH
69{
70 reload_cse_regs_1 (first);
71 reload_combine ();
72 reload_cse_move2add (first);
73 if (flag_expensive_optimizations)
74 reload_cse_regs_1 (first);
75}
76
77/* See whether a single set SET is a noop. */
78static int
0c20a65f 79reload_cse_noop_set_p (rtx set)
15e35479
KH
80{
81 if (cselib_reg_set_mode (SET_DEST (set)) != GET_MODE (SET_DEST (set)))
82 return 0;
83
84 return rtx_equal_for_cselib_p (SET_DEST (set), SET_SRC (set));
85}
86
87/* Try to simplify INSN. */
88static void
0c20a65f 89reload_cse_simplify (rtx insn, rtx testreg)
15e35479
KH
90{
91 rtx body = PATTERN (insn);
92
93 if (GET_CODE (body) == SET)
94 {
95 int count = 0;
96
97 /* Simplify even if we may think it is a no-op.
98 We may think a memory load of a value smaller than WORD_SIZE
99 is redundant because we haven't taken into account possible
100 implicit extension. reload_cse_simplify_set() will bring
101 this out, so it's safer to simplify before we delete. */
102 count += reload_cse_simplify_set (body, insn);
103
104 if (!count && reload_cse_noop_set_p (body))
105 {
106 rtx value = SET_DEST (body);
107 if (REG_P (value)
108 && ! REG_FUNCTION_VALUE_P (value))
109 value = 0;
110 delete_insn_and_edges (insn);
111 return;
112 }
113
114 if (count > 0)
115 apply_change_group ();
116 else
117 reload_cse_simplify_operands (insn, testreg);
118 }
119 else if (GET_CODE (body) == PARALLEL)
120 {
121 int i;
122 int count = 0;
123 rtx value = NULL_RTX;
124
0d87c765
RH
125 /* Registers mentioned in the clobber list for an asm cannot be reused
126 within the body of the asm. Invalidate those registers now so that
127 we don't try to substitute values for them. */
128 if (asm_noperands (body) >= 0)
129 {
130 for (i = XVECLEN (body, 0) - 1; i >= 0; --i)
131 {
132 rtx part = XVECEXP (body, 0, i);
133 if (GET_CODE (part) == CLOBBER && REG_P (XEXP (part, 0)))
134 cselib_invalidate_rtx (XEXP (part, 0));
135 }
136 }
137
15e35479
KH
138 /* If every action in a PARALLEL is a noop, we can delete
139 the entire PARALLEL. */
140 for (i = XVECLEN (body, 0) - 1; i >= 0; --i)
141 {
142 rtx part = XVECEXP (body, 0, i);
143 if (GET_CODE (part) == SET)
144 {
145 if (! reload_cse_noop_set_p (part))
146 break;
147 if (REG_P (SET_DEST (part))
148 && REG_FUNCTION_VALUE_P (SET_DEST (part)))
149 {
150 if (value)
151 break;
152 value = SET_DEST (part);
153 }
154 }
155 else if (GET_CODE (part) != CLOBBER)
156 break;
157 }
158
159 if (i < 0)
160 {
161 delete_insn_and_edges (insn);
162 /* We're done with this insn. */
163 return;
164 }
165
166 /* It's not a no-op, but we can try to simplify it. */
167 for (i = XVECLEN (body, 0) - 1; i >= 0; --i)
168 if (GET_CODE (XVECEXP (body, 0, i)) == SET)
169 count += reload_cse_simplify_set (XVECEXP (body, 0, i), insn);
170
171 if (count > 0)
172 apply_change_group ();
173 else
174 reload_cse_simplify_operands (insn, testreg);
175 }
176}
177
178/* Do a very simple CSE pass over the hard registers.
179
180 This function detects no-op moves where we happened to assign two
181 different pseudo-registers to the same hard register, and then
182 copied one to the other. Reload will generate a useless
183 instruction copying a register to itself.
184
185 This function also detects cases where we load a value from memory
186 into two different registers, and (if memory is more expensive than
187 registers) changes it to simply copy the first register into the
188 second register.
189
190 Another optimization is performed that scans the operands of each
191 instruction to see whether the value is already available in a
192 hard register. It then replaces the operand with the hard register
193 if possible, much like an optional reload would. */
194
195static void
0c20a65f 196reload_cse_regs_1 (rtx first)
15e35479 197{
ba4807a0 198 rtx insn;
15e35479
KH
199 rtx testreg = gen_rtx_REG (VOIDmode, -1);
200
457eeaae 201 cselib_init (CSELIB_RECORD_MEMORY);
15e35479
KH
202 init_alias_analysis ();
203
ba4807a0 204 for (insn = first; insn; insn = NEXT_INSN (insn))
15e35479
KH
205 {
206 if (INSN_P (insn))
207 reload_cse_simplify (insn, testreg);
208
209 cselib_process_insn (insn);
210 }
211
212 /* Clean up. */
213 end_alias_analysis ();
214 cselib_finish ();
215}
216
217/* Try to simplify a single SET instruction. SET is the set pattern.
218 INSN is the instruction it came from.
219 This function only handles one case: if we set a register to a value
220 which is not a register, we try to find that value in some other register
221 and change the set into a register copy. */
222
223static int
0c20a65f 224reload_cse_simplify_set (rtx set, rtx insn)
15e35479
KH
225{
226 int did_change = 0;
227 int dreg;
228 rtx src;
229 enum reg_class dclass;
230 int old_cost;
231 cselib_val *val;
232 struct elt_loc_list *l;
233#ifdef LOAD_EXTEND_OP
f822d252 234 enum rtx_code extend_op = UNKNOWN;
15e35479 235#endif
f40751dd 236 bool speed = optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn));
15e35479
KH
237
238 dreg = true_regnum (SET_DEST (set));
239 if (dreg < 0)
240 return 0;
241
242 src = SET_SRC (set);
243 if (side_effects_p (src) || true_regnum (src) >= 0)
244 return 0;
245
246 dclass = REGNO_REG_CLASS (dreg);
247
248#ifdef LOAD_EXTEND_OP
249 /* When replacing a memory with a register, we need to honor assumptions
250 that combine made wrt the contents of sign bits. We'll do this by
251 generating an extend instruction instead of a reg->reg copy. Thus
252 the destination must be a register that we can widen. */
3c0cb5de 253 if (MEM_P (src)
15e35479 254 && GET_MODE_BITSIZE (GET_MODE (src)) < BITS_PER_WORD
f822d252 255 && (extend_op = LOAD_EXTEND_OP (GET_MODE (src))) != UNKNOWN
f8cfc6aa 256 && !REG_P (SET_DEST (set)))
15e35479
KH
257 return 0;
258#endif
259
b2948a2c
KH
260 val = cselib_lookup (src, GET_MODE (SET_DEST (set)), 0);
261 if (! val)
262 return 0;
263
15e35479 264 /* If memory loads are cheaper than register copies, don't change them. */
3c0cb5de 265 if (MEM_P (src))
f5c21ef3 266 old_cost = memory_move_cost (GET_MODE (src), dclass, true);
f8cfc6aa 267 else if (REG_P (src))
de8f4b07 268 old_cost = register_move_cost (GET_MODE (src),
15e35479
KH
269 REGNO_REG_CLASS (REGNO (src)), dclass);
270 else
f40751dd 271 old_cost = rtx_cost (src, SET, speed);
15e35479 272
15e35479
KH
273 for (l = val->locs; l; l = l->next)
274 {
275 rtx this_rtx = l->loc;
276 int this_cost;
277
278 if (CONSTANT_P (this_rtx) && ! references_value_p (this_rtx, 0))
279 {
280#ifdef LOAD_EXTEND_OP
f822d252 281 if (extend_op != UNKNOWN)
15e35479
KH
282 {
283 HOST_WIDE_INT this_val;
284
285 /* ??? I'm lazy and don't wish to handle CONST_DOUBLE. Other
286 constants, such as SYMBOL_REF, cannot be extended. */
481683e1 287 if (!CONST_INT_P (this_rtx))
15e35479
KH
288 continue;
289
290 this_val = INTVAL (this_rtx);
291 switch (extend_op)
292 {
293 case ZERO_EXTEND:
294 this_val &= GET_MODE_MASK (GET_MODE (src));
295 break;
296 case SIGN_EXTEND:
297 /* ??? In theory we're already extended. */
298 if (this_val == trunc_int_for_mode (this_val, GET_MODE (src)))
299 break;
300 default:
e16acfcd 301 gcc_unreachable ();
15e35479
KH
302 }
303 this_rtx = GEN_INT (this_val);
304 }
305#endif
f40751dd 306 this_cost = rtx_cost (this_rtx, SET, speed);
15e35479 307 }
f8cfc6aa 308 else if (REG_P (this_rtx))
15e35479
KH
309 {
310#ifdef LOAD_EXTEND_OP
f822d252 311 if (extend_op != UNKNOWN)
15e35479
KH
312 {
313 this_rtx = gen_rtx_fmt_e (extend_op, word_mode, this_rtx);
f40751dd 314 this_cost = rtx_cost (this_rtx, SET, speed);
15e35479
KH
315 }
316 else
317#endif
de8f4b07 318 this_cost = register_move_cost (GET_MODE (this_rtx),
15e35479
KH
319 REGNO_REG_CLASS (REGNO (this_rtx)),
320 dclass);
321 }
322 else
323 continue;
324
325 /* If equal costs, prefer registers over anything else. That
326 tends to lead to smaller instructions on some machines. */
327 if (this_cost < old_cost
328 || (this_cost == old_cost
f8cfc6aa
JQ
329 && REG_P (this_rtx)
330 && !REG_P (SET_SRC (set))))
15e35479
KH
331 {
332#ifdef LOAD_EXTEND_OP
333 if (GET_MODE_BITSIZE (GET_MODE (SET_DEST (set))) < BITS_PER_WORD
f822d252 334 && extend_op != UNKNOWN
15e35479
KH
335#ifdef CANNOT_CHANGE_MODE_CLASS
336 && !CANNOT_CHANGE_MODE_CLASS (GET_MODE (SET_DEST (set)),
337 word_mode,
338 REGNO_REG_CLASS (REGNO (SET_DEST (set))))
339#endif
340 )
341 {
342 rtx wide_dest = gen_rtx_REG (word_mode, REGNO (SET_DEST (set)));
343 ORIGINAL_REGNO (wide_dest) = ORIGINAL_REGNO (SET_DEST (set));
344 validate_change (insn, &SET_DEST (set), wide_dest, 1);
345 }
346#endif
347
95e88efd 348 validate_unshare_change (insn, &SET_SRC (set), this_rtx, 1);
15e35479
KH
349 old_cost = this_cost, did_change = 1;
350 }
351 }
352
353 return did_change;
354}
355
356/* Try to replace operands in INSN with equivalent values that are already
357 in registers. This can be viewed as optional reloading.
358
359 For each non-register operand in the insn, see if any hard regs are
360 known to be equivalent to that operand. Record the alternatives which
361 can accept these hard registers. Among all alternatives, select the
362 ones which are better or equal to the one currently matching, where
363 "better" is in terms of '?' and '!' constraints. Among the remaining
364 alternatives, select the one which replaces most operands with
365 hard registers. */
366
367static int
0c20a65f 368reload_cse_simplify_operands (rtx insn, rtx testreg)
15e35479
KH
369{
370 int i, j;
371
372 /* For each operand, all registers that are equivalent to it. */
373 HARD_REG_SET equiv_regs[MAX_RECOG_OPERANDS];
374
375 const char *constraints[MAX_RECOG_OPERANDS];
376
377 /* Vector recording how bad an alternative is. */
378 int *alternative_reject;
379 /* Vector recording how many registers can be introduced by choosing
380 this alternative. */
381 int *alternative_nregs;
382 /* Array of vectors recording, for each operand and each alternative,
383 which hard register to substitute, or -1 if the operand should be
384 left as it is. */
385 int *op_alt_regno[MAX_RECOG_OPERANDS];
386 /* Array of alternatives, sorted in order of decreasing desirability. */
387 int *alternative_order;
388
389 extract_insn (insn);
390
391 if (recog_data.n_alternatives == 0 || recog_data.n_operands == 0)
392 return 0;
393
394 /* Figure out which alternative currently matches. */
395 if (! constrain_operands (1))
396 fatal_insn_not_found (insn);
397
d3bfe4de
KG
398 alternative_reject = XALLOCAVEC (int, recog_data.n_alternatives);
399 alternative_nregs = XALLOCAVEC (int, recog_data.n_alternatives);
400 alternative_order = XALLOCAVEC (int, recog_data.n_alternatives);
703ad42b
KG
401 memset (alternative_reject, 0, recog_data.n_alternatives * sizeof (int));
402 memset (alternative_nregs, 0, recog_data.n_alternatives * sizeof (int));
15e35479
KH
403
404 /* For each operand, find out which regs are equivalent. */
405 for (i = 0; i < recog_data.n_operands; i++)
406 {
407 cselib_val *v;
408 struct elt_loc_list *l;
115df136 409 rtx op;
15e35479
KH
410
411 CLEAR_HARD_REG_SET (equiv_regs[i]);
412
413 /* cselib blows up on CODE_LABELs. Trying to fix that doesn't seem
414 right, so avoid the problem here. Likewise if we have a constant
415 and the insn pattern doesn't tell us the mode we need. */
4b4bf941 416 if (LABEL_P (recog_data.operand[i])
15e35479
KH
417 || (CONSTANT_P (recog_data.operand[i])
418 && recog_data.operand_mode[i] == VOIDmode))
419 continue;
420
115df136 421 op = recog_data.operand[i];
115df136 422#ifdef LOAD_EXTEND_OP
3c0cb5de 423 if (MEM_P (op)
0f900dfa
JJ
424 && GET_MODE_BITSIZE (GET_MODE (op)) < BITS_PER_WORD
425 && LOAD_EXTEND_OP (GET_MODE (op)) != UNKNOWN)
115df136
R
426 {
427 rtx set = single_set (insn);
428
1f52178b 429 /* We might have multiple sets, some of which do implicit
115df136
R
430 extension. Punt on this for now. */
431 if (! set)
432 continue;
1f838355 433 /* If the destination is also a MEM or a STRICT_LOW_PART, no
115df136
R
434 extension applies.
435 Also, if there is an explicit extension, we don't have to
436 worry about an implicit one. */
3c0cb5de 437 else if (MEM_P (SET_DEST (set))
115df136
R
438 || GET_CODE (SET_DEST (set)) == STRICT_LOW_PART
439 || GET_CODE (SET_SRC (set)) == ZERO_EXTEND
440 || GET_CODE (SET_SRC (set)) == SIGN_EXTEND)
441 ; /* Continue ordinary processing. */
7be4d808
R
442#ifdef CANNOT_CHANGE_MODE_CLASS
443 /* If the register cannot change mode to word_mode, it follows that
444 it cannot have been used in word_mode. */
f8cfc6aa 445 else if (REG_P (SET_DEST (set))
7be4d808
R
446 && CANNOT_CHANGE_MODE_CLASS (GET_MODE (SET_DEST (set)),
447 word_mode,
448 REGNO_REG_CLASS (REGNO (SET_DEST (set)))))
449 ; /* Continue ordinary processing. */
450#endif
115df136 451 /* If this is a straight load, make the extension explicit. */
f8cfc6aa 452 else if (REG_P (SET_DEST (set))
115df136
R
453 && recog_data.n_operands == 2
454 && SET_SRC (set) == op
455 && SET_DEST (set) == recog_data.operand[1-i])
456 {
457 validate_change (insn, recog_data.operand_loc[i],
0f900dfa 458 gen_rtx_fmt_e (LOAD_EXTEND_OP (GET_MODE (op)),
115df136
R
459 word_mode, op),
460 1);
461 validate_change (insn, recog_data.operand_loc[1-i],
462 gen_rtx_REG (word_mode, REGNO (SET_DEST (set))),
463 1);
464 if (! apply_change_group ())
465 return 0;
466 return reload_cse_simplify_operands (insn, testreg);
467 }
468 else
469 /* ??? There might be arithmetic operations with memory that are
470 safe to optimize, but is it worth the trouble? */
471 continue;
472 }
473#endif /* LOAD_EXTEND_OP */
474 v = cselib_lookup (op, recog_data.operand_mode[i], 0);
15e35479
KH
475 if (! v)
476 continue;
477
478 for (l = v->locs; l; l = l->next)
f8cfc6aa 479 if (REG_P (l->loc))
15e35479
KH
480 SET_HARD_REG_BIT (equiv_regs[i], REGNO (l->loc));
481 }
482
483 for (i = 0; i < recog_data.n_operands; i++)
484 {
485 enum machine_mode mode;
486 int regno;
487 const char *p;
488
d3bfe4de 489 op_alt_regno[i] = XALLOCAVEC (int, recog_data.n_alternatives);
15e35479
KH
490 for (j = 0; j < recog_data.n_alternatives; j++)
491 op_alt_regno[i][j] = -1;
492
493 p = constraints[i] = recog_data.constraints[i];
494 mode = recog_data.operand_mode[i];
495
496 /* Add the reject values for each alternative given by the constraints
497 for this operand. */
498 j = 0;
499 while (*p != '\0')
500 {
501 char c = *p++;
502 if (c == ',')
503 j++;
504 else if (c == '?')
505 alternative_reject[j] += 3;
506 else if (c == '!')
507 alternative_reject[j] += 300;
508 }
509
510 /* We won't change operands which are already registers. We
511 also don't want to modify output operands. */
512 regno = true_regnum (recog_data.operand[i]);
513 if (regno >= 0
514 || constraints[i][0] == '='
515 || constraints[i][0] == '+')
516 continue;
517
518 for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
519 {
bbbbb16a 520 enum reg_class rclass = NO_REGS;
15e35479
KH
521
522 if (! TEST_HARD_REG_BIT (equiv_regs[i], regno))
523 continue;
524
6fb5fa3c 525 SET_REGNO (testreg, regno);
15e35479
KH
526 PUT_MODE (testreg, mode);
527
528 /* We found a register equal to this operand. Now look for all
529 alternatives that can accept this register and have not been
530 assigned a register they can use yet. */
531 j = 0;
532 p = constraints[i];
533 for (;;)
534 {
535 char c = *p;
536
537 switch (c)
538 {
539 case '=': case '+': case '?':
540 case '#': case '&': case '!':
541 case '*': case '%':
542 case '0': case '1': case '2': case '3': case '4':
543 case '5': case '6': case '7': case '8': case '9':
a4edaf83 544 case '<': case '>': case 'V': case 'o':
15e35479
KH
545 case 'E': case 'F': case 'G': case 'H':
546 case 's': case 'i': case 'n':
547 case 'I': case 'J': case 'K': case 'L':
548 case 'M': case 'N': case 'O': case 'P':
a4edaf83 549 case 'p': case 'X': case TARGET_MEM_CONSTRAINT:
15e35479
KH
550 /* These don't say anything we care about. */
551 break;
552
553 case 'g': case 'r':
d858f359 554 rclass = reg_class_subunion[(int) rclass][(int) GENERAL_REGS];
15e35479
KH
555 break;
556
557 default:
d858f359 558 rclass
15e35479 559 = (reg_class_subunion
d858f359 560 [(int) rclass]
15e35479
KH
561 [(int) REG_CLASS_FROM_CONSTRAINT ((unsigned char) c, p)]);
562 break;
563
564 case ',': case '\0':
565 /* See if REGNO fits this alternative, and set it up as the
566 replacement register if we don't have one for this
567 alternative yet and the operand being replaced is not
568 a cheap CONST_INT. */
569 if (op_alt_regno[i][j] == -1
d858f359 570 && reg_fits_class_p (testreg, rclass, 0, mode)
481683e1 571 && (!CONST_INT_P (recog_data.operand[i])
f40751dd
JH
572 || (rtx_cost (recog_data.operand[i], SET,
573 optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn)))
574 > rtx_cost (testreg, SET,
575 optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn))))))
15e35479
KH
576 {
577 alternative_nregs[j]++;
578 op_alt_regno[i][j] = regno;
579 }
580 j++;
bbbbb16a 581 rclass = NO_REGS;
15e35479
KH
582 break;
583 }
584 p += CONSTRAINT_LEN (c, p);
585
586 if (c == '\0')
587 break;
588 }
589 }
590 }
591
592 /* Record all alternatives which are better or equal to the currently
593 matching one in the alternative_order array. */
594 for (i = j = 0; i < recog_data.n_alternatives; i++)
595 if (alternative_reject[i] <= alternative_reject[which_alternative])
596 alternative_order[j++] = i;
597 recog_data.n_alternatives = j;
598
599 /* Sort it. Given a small number of alternatives, a dumb algorithm
600 won't hurt too much. */
601 for (i = 0; i < recog_data.n_alternatives - 1; i++)
602 {
603 int best = i;
604 int best_reject = alternative_reject[alternative_order[i]];
605 int best_nregs = alternative_nregs[alternative_order[i]];
606 int tmp;
607
608 for (j = i + 1; j < recog_data.n_alternatives; j++)
609 {
610 int this_reject = alternative_reject[alternative_order[j]];
611 int this_nregs = alternative_nregs[alternative_order[j]];
612
613 if (this_reject < best_reject
8a4c09c8 614 || (this_reject == best_reject && this_nregs > best_nregs))
15e35479
KH
615 {
616 best = j;
617 best_reject = this_reject;
618 best_nregs = this_nregs;
619 }
620 }
621
622 tmp = alternative_order[best];
623 alternative_order[best] = alternative_order[i];
624 alternative_order[i] = tmp;
625 }
626
627 /* Substitute the operands as determined by op_alt_regno for the best
628 alternative. */
629 j = alternative_order[0];
630
631 for (i = 0; i < recog_data.n_operands; i++)
632 {
633 enum machine_mode mode = recog_data.operand_mode[i];
634 if (op_alt_regno[i][j] == -1)
635 continue;
636
637 validate_change (insn, recog_data.operand_loc[i],
638 gen_rtx_REG (mode, op_alt_regno[i][j]), 1);
639 }
640
641 for (i = recog_data.n_dups - 1; i >= 0; i--)
642 {
643 int op = recog_data.dup_num[i];
644 enum machine_mode mode = recog_data.operand_mode[op];
645
646 if (op_alt_regno[op][j] == -1)
647 continue;
648
649 validate_change (insn, recog_data.dup_loc[i],
650 gen_rtx_REG (mode, op_alt_regno[op][j]), 1);
651 }
652
653 return apply_change_group ();
654}
655\f
656/* If reload couldn't use reg+reg+offset addressing, try to use reg+reg
657 addressing now.
658 This code might also be useful when reload gave up on reg+reg addressing
659 because of clashes between the return register and INDEX_REG_CLASS. */
660
661/* The maximum number of uses of a register we can keep track of to
662 replace them with reg+reg addressing. */
663#define RELOAD_COMBINE_MAX_USES 6
664
fa10beec 665/* INSN is the insn where a register has been used, and USEP points to the
15e35479
KH
666 location of the register within the rtl. */
667struct reg_use { rtx insn, *usep; };
668
669/* If the register is used in some unknown fashion, USE_INDEX is negative.
670 If it is dead, USE_INDEX is RELOAD_COMBINE_MAX_USES, and STORE_RUID
671 indicates where it becomes live again.
672 Otherwise, USE_INDEX is the index of the last encountered use of the
673 register (which is first among these we have seen since we scan backwards),
674 OFFSET contains the constant offset that is added to the register in
675 all encountered uses, and USE_RUID indicates the first encountered, i.e.
676 last, of these uses.
677 STORE_RUID is always meaningful if we only want to use a value in a
678 register in a different place: it denotes the next insn in the insn
679 stream (i.e. the last encountered) that sets or clobbers the register. */
680static struct
681 {
682 struct reg_use reg_use[RELOAD_COMBINE_MAX_USES];
683 int use_index;
684 rtx offset;
685 int store_ruid;
686 int use_ruid;
687 } reg_state[FIRST_PSEUDO_REGISTER];
688
689/* Reverse linear uid. This is increased in reload_combine while scanning
690 the instructions from last to first. It is used to set last_label_ruid
691 and the store_ruid / use_ruid fields in reg_state. */
692static int reload_combine_ruid;
693
694#define LABEL_LIVE(LABEL) \
695 (label_live[CODE_LABEL_NUMBER (LABEL) - min_labelno])
696
697static void
0c20a65f 698reload_combine (void)
15e35479
KH
699{
700 rtx insn, set;
701 int first_index_reg = -1;
702 int last_index_reg = 0;
703 int i;
704 basic_block bb;
705 unsigned int r;
706 int last_label_ruid;
707 int min_labelno, n_labels;
708 HARD_REG_SET ever_live_at_start, *label_live;
709
710 /* If reg+reg can be used in offsetable memory addresses, the main chunk of
711 reload has already used it where appropriate, so there is no use in
712 trying to generate it now. */
713 if (double_reg_address_ok && INDEX_REG_CLASS != NO_REGS)
714 return;
715
716 /* To avoid wasting too much time later searching for an index register,
717 determine the minimum and maximum index register numbers. */
718 for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
719 if (TEST_HARD_REG_BIT (reg_class_contents[INDEX_REG_CLASS], r))
720 {
721 if (first_index_reg == -1)
722 first_index_reg = r;
723
724 last_index_reg = r;
725 }
726
727 /* If no index register is available, we can quit now. */
728 if (first_index_reg == -1)
729 return;
730
731 /* Set up LABEL_LIVE and EVER_LIVE_AT_START. The register lifetime
732 information is a bit fuzzy immediately after reload, but it's
733 still good enough to determine which registers are live at a jump
734 destination. */
735 min_labelno = get_first_label_num ();
736 n_labels = max_label_num () - min_labelno;
5ed6ace5 737 label_live = XNEWVEC (HARD_REG_SET, n_labels);
15e35479
KH
738 CLEAR_HARD_REG_SET (ever_live_at_start);
739
740 FOR_EACH_BB_REVERSE (bb)
741 {
a813c111 742 insn = BB_HEAD (bb);
4b4bf941 743 if (LABEL_P (insn))
15e35479
KH
744 {
745 HARD_REG_SET live;
89a95777 746 bitmap live_in = df_get_live_in (bb);
15e35479 747
89a95777
KZ
748 REG_SET_TO_HARD_REG_SET (live, live_in);
749 compute_use_by_pseudos (&live, live_in);
15e35479
KH
750 COPY_HARD_REG_SET (LABEL_LIVE (insn), live);
751 IOR_HARD_REG_SET (ever_live_at_start, live);
752 }
753 }
754
755 /* Initialize last_label_ruid, reload_combine_ruid and reg_state. */
756 last_label_ruid = reload_combine_ruid = 0;
757 for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
758 {
759 reg_state[r].store_ruid = reload_combine_ruid;
760 if (fixed_regs[r])
761 reg_state[r].use_index = -1;
762 else
763 reg_state[r].use_index = RELOAD_COMBINE_MAX_USES;
764 }
765
766 for (insn = get_last_insn (); insn; insn = PREV_INSN (insn))
767 {
768 rtx note;
769
770 /* We cannot do our optimization across labels. Invalidating all the use
771 information we have would be costly, so we just note where the label
772 is and then later disable any optimization that would cross it. */
4b4bf941 773 if (LABEL_P (insn))
15e35479 774 last_label_ruid = reload_combine_ruid;
4b4bf941 775 else if (BARRIER_P (insn))
15e35479
KH
776 for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
777 if (! fixed_regs[r])
778 reg_state[r].use_index = RELOAD_COMBINE_MAX_USES;
779
780 if (! INSN_P (insn))
781 continue;
782
783 reload_combine_ruid++;
784
785 /* Look for (set (REGX) (CONST_INT))
786 (set (REGX) (PLUS (REGX) (REGY)))
787 ...
788 ... (MEM (REGX)) ...
789 and convert it to
790 (set (REGZ) (CONST_INT))
791 ...
792 ... (MEM (PLUS (REGZ) (REGY)))... .
793
794 First, check that we have (set (REGX) (PLUS (REGX) (REGY)))
b8698a0f 795 and that we know all uses of REGX before it dies.
71c1543c
RE
796 Also, explicitly check that REGX != REGY; our life information
797 does not yet show whether REGY changes in this insn. */
15e35479
KH
798 set = single_set (insn);
799 if (set != NULL_RTX
f8cfc6aa 800 && REG_P (SET_DEST (set))
66fd46b6
JH
801 && (hard_regno_nregs[REGNO (SET_DEST (set))]
802 [GET_MODE (SET_DEST (set))]
15e35479
KH
803 == 1)
804 && GET_CODE (SET_SRC (set)) == PLUS
f8cfc6aa 805 && REG_P (XEXP (SET_SRC (set), 1))
15e35479 806 && rtx_equal_p (XEXP (SET_SRC (set), 0), SET_DEST (set))
71c1543c 807 && !rtx_equal_p (XEXP (SET_SRC (set), 1), SET_DEST (set))
15e35479
KH
808 && last_label_ruid < reg_state[REGNO (SET_DEST (set))].use_ruid)
809 {
810 rtx reg = SET_DEST (set);
811 rtx plus = SET_SRC (set);
812 rtx base = XEXP (plus, 1);
813 rtx prev = prev_nonnote_insn (insn);
814 rtx prev_set = prev ? single_set (prev) : NULL_RTX;
815 unsigned int regno = REGNO (reg);
39ba6ab7 816 rtx index_reg = NULL_RTX;
15e35479
KH
817 rtx reg_sum = NULL_RTX;
818
39ba6ab7
EB
819 /* Now we need to set INDEX_REG to an index register (denoted as
820 REGZ in the illustration above) and REG_SUM to the expression
821 register+register that we want to use to substitute uses of REG
822 (typically in MEMs) with. First check REG and BASE for being
823 index registers; we can use them even if they are not dead. */
15e35479
KH
824 if (TEST_HARD_REG_BIT (reg_class_contents[INDEX_REG_CLASS], regno)
825 || TEST_HARD_REG_BIT (reg_class_contents[INDEX_REG_CLASS],
826 REGNO (base)))
827 {
39ba6ab7 828 index_reg = reg;
15e35479
KH
829 reg_sum = plus;
830 }
831 else
832 {
833 /* Otherwise, look for a free index register. Since we have
2067c116 834 checked above that neither REG nor BASE are index registers,
15e35479
KH
835 if we find anything at all, it will be different from these
836 two registers. */
837 for (i = first_index_reg; i <= last_index_reg; i++)
838 {
839 if (TEST_HARD_REG_BIT (reg_class_contents[INDEX_REG_CLASS],
840 i)
841 && reg_state[i].use_index == RELOAD_COMBINE_MAX_USES
842 && reg_state[i].store_ruid <= reg_state[regno].use_ruid
66fd46b6 843 && hard_regno_nregs[i][GET_MODE (reg)] == 1)
15e35479 844 {
39ba6ab7 845 index_reg = gen_rtx_REG (GET_MODE (reg), i);
15e35479
KH
846 reg_sum = gen_rtx_PLUS (GET_MODE (reg), index_reg, base);
847 break;
848 }
849 }
850 }
851
852 /* Check that PREV_SET is indeed (set (REGX) (CONST_INT)) and that
853 (REGY), i.e. BASE, is not clobbered before the last use we'll
854 create. */
39ba6ab7
EB
855 if (reg_sum
856 && prev_set
481683e1 857 && CONST_INT_P (SET_SRC (prev_set))
15e35479
KH
858 && rtx_equal_p (SET_DEST (prev_set), reg)
859 && reg_state[regno].use_index >= 0
860 && (reg_state[REGNO (base)].store_ruid
39ba6ab7 861 <= reg_state[regno].use_ruid))
15e35479
KH
862 {
863 int i;
864
39ba6ab7
EB
865 /* Change destination register and, if necessary, the constant
866 value in PREV, the constant loading instruction. */
867 validate_change (prev, &SET_DEST (prev_set), index_reg, 1);
15e35479
KH
868 if (reg_state[regno].offset != const0_rtx)
869 validate_change (prev,
870 &SET_SRC (prev_set),
871 GEN_INT (INTVAL (SET_SRC (prev_set))
872 + INTVAL (reg_state[regno].offset)),
873 1);
874
875 /* Now for every use of REG that we have recorded, replace REG
876 with REG_SUM. */
877 for (i = reg_state[regno].use_index;
878 i < RELOAD_COMBINE_MAX_USES; i++)
95e88efd
JH
879 validate_unshare_change (reg_state[regno].reg_use[i].insn,
880 reg_state[regno].reg_use[i].usep,
881 /* Each change must have its own
882 replacement. */
883 reg_sum, 1);
15e35479
KH
884
885 if (apply_change_group ())
886 {
83f63251
R
887 /* For every new use of REG_SUM, we have to record the use
888 of BASE therein, i.e. operand 1. */
889 for (i = reg_state[regno].use_index;
890 i < RELOAD_COMBINE_MAX_USES; i++)
891 reload_combine_note_use
892 (&XEXP (*reg_state[regno].reg_use[i].usep, 1),
893 reg_state[regno].reg_use[i].insn);
894
895 if (reg_state[REGNO (base)].use_ruid
896 > reg_state[regno].use_ruid)
897 reg_state[REGNO (base)].use_ruid
898 = reg_state[regno].use_ruid;
899
15e35479
KH
900 /* Delete the reg-reg addition. */
901 delete_insn (insn);
902
903 if (reg_state[regno].offset != const0_rtx)
904 /* Previous REG_EQUIV / REG_EQUAL notes for PREV
905 are now invalid. */
7cd689bc 906 remove_reg_equal_equiv_notes (prev);
15e35479
KH
907
908 reg_state[regno].use_index = RELOAD_COMBINE_MAX_USES;
39ba6ab7 909 reg_state[REGNO (index_reg)].store_ruid
15e35479
KH
910 = reload_combine_ruid;
911 continue;
912 }
913 }
914 }
915
916 note_stores (PATTERN (insn), reload_combine_note_store, NULL);
917
4b4bf941 918 if (CALL_P (insn))
15e35479
KH
919 {
920 rtx link;
921
922 for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
923 if (call_used_regs[r])
924 {
925 reg_state[r].use_index = RELOAD_COMBINE_MAX_USES;
926 reg_state[r].store_ruid = reload_combine_ruid;
927 }
928
929 for (link = CALL_INSN_FUNCTION_USAGE (insn); link;
930 link = XEXP (link, 1))
931 {
932 rtx usage_rtx = XEXP (XEXP (link, 0), 0);
f8cfc6aa 933 if (REG_P (usage_rtx))
15e35479
KH
934 {
935 unsigned int i;
936 unsigned int start_reg = REGNO (usage_rtx);
937 unsigned int num_regs =
66fd46b6 938 hard_regno_nregs[start_reg][GET_MODE (usage_rtx)];
15e35479
KH
939 unsigned int end_reg = start_reg + num_regs - 1;
940 for (i = start_reg; i <= end_reg; i++)
941 if (GET_CODE (XEXP (link, 0)) == CLOBBER)
942 {
943 reg_state[i].use_index = RELOAD_COMBINE_MAX_USES;
944 reg_state[i].store_ruid = reload_combine_ruid;
945 }
946 else
947 reg_state[i].use_index = -1;
948 }
949 }
950
951 }
4b4bf941 952 else if (JUMP_P (insn)
15e35479
KH
953 && GET_CODE (PATTERN (insn)) != RETURN)
954 {
955 /* Non-spill registers might be used at the call destination in
956 some unknown fashion, so we have to mark the unknown use. */
957 HARD_REG_SET *live;
958
959 if ((condjump_p (insn) || condjump_in_parallel_p (insn))
960 && JUMP_LABEL (insn))
961 live = &LABEL_LIVE (JUMP_LABEL (insn));
962 else
963 live = &ever_live_at_start;
964
965 for (i = FIRST_PSEUDO_REGISTER - 1; i >= 0; --i)
966 if (TEST_HARD_REG_BIT (*live, i))
967 reg_state[i].use_index = -1;
968 }
969
970 reload_combine_note_use (&PATTERN (insn), insn);
971 for (note = REG_NOTES (insn); note; note = XEXP (note, 1))
972 {
973 if (REG_NOTE_KIND (note) == REG_INC
f8cfc6aa 974 && REG_P (XEXP (note, 0)))
15e35479
KH
975 {
976 int regno = REGNO (XEXP (note, 0));
977
978 reg_state[regno].store_ruid = reload_combine_ruid;
979 reg_state[regno].use_index = -1;
980 }
981 }
982 }
983
984 free (label_live);
985}
986
987/* Check if DST is a register or a subreg of a register; if it is,
988 update reg_state[regno].store_ruid and reg_state[regno].use_index
989 accordingly. Called via note_stores from reload_combine. */
990
991static void
7bc980e1 992reload_combine_note_store (rtx dst, const_rtx set, void *data ATTRIBUTE_UNUSED)
15e35479
KH
993{
994 int regno = 0;
995 int i;
996 enum machine_mode mode = GET_MODE (dst);
997
998 if (GET_CODE (dst) == SUBREG)
999 {
1000 regno = subreg_regno_offset (REGNO (SUBREG_REG (dst)),
1001 GET_MODE (SUBREG_REG (dst)),
1002 SUBREG_BYTE (dst),
1003 GET_MODE (dst));
1004 dst = SUBREG_REG (dst);
1005 }
f8cfc6aa 1006 if (!REG_P (dst))
15e35479
KH
1007 return;
1008 regno += REGNO (dst);
1009
1010 /* note_stores might have stripped a STRICT_LOW_PART, so we have to be
1011 careful with registers / register parts that are not full words.
46d096a3 1012 Similarly for ZERO_EXTRACT. */
15e35479
KH
1013 if (GET_CODE (set) != SET
1014 || GET_CODE (SET_DEST (set)) == ZERO_EXTRACT
15e35479
KH
1015 || GET_CODE (SET_DEST (set)) == STRICT_LOW_PART)
1016 {
66fd46b6 1017 for (i = hard_regno_nregs[regno][mode] - 1 + regno; i >= regno; i--)
15e35479
KH
1018 {
1019 reg_state[i].use_index = -1;
1020 reg_state[i].store_ruid = reload_combine_ruid;
1021 }
1022 }
1023 else
1024 {
66fd46b6 1025 for (i = hard_regno_nregs[regno][mode] - 1 + regno; i >= regno; i--)
15e35479
KH
1026 {
1027 reg_state[i].store_ruid = reload_combine_ruid;
1028 reg_state[i].use_index = RELOAD_COMBINE_MAX_USES;
1029 }
1030 }
1031}
1032
1033/* XP points to a piece of rtl that has to be checked for any uses of
1034 registers.
1035 *XP is the pattern of INSN, or a part of it.
1036 Called from reload_combine, and recursively by itself. */
1037static void
0c20a65f 1038reload_combine_note_use (rtx *xp, rtx insn)
15e35479
KH
1039{
1040 rtx x = *xp;
1041 enum rtx_code code = x->code;
1042 const char *fmt;
1043 int i, j;
1044 rtx offset = const0_rtx; /* For the REG case below. */
1045
1046 switch (code)
1047 {
1048 case SET:
f8cfc6aa 1049 if (REG_P (SET_DEST (x)))
15e35479
KH
1050 {
1051 reload_combine_note_use (&SET_SRC (x), insn);
1052 return;
1053 }
1054 break;
1055
1056 case USE:
1057 /* If this is the USE of a return value, we can't change it. */
f8cfc6aa 1058 if (REG_P (XEXP (x, 0)) && REG_FUNCTION_VALUE_P (XEXP (x, 0)))
15e35479
KH
1059 {
1060 /* Mark the return register as used in an unknown fashion. */
1061 rtx reg = XEXP (x, 0);
1062 int regno = REGNO (reg);
66fd46b6 1063 int nregs = hard_regno_nregs[regno][GET_MODE (reg)];
15e35479
KH
1064
1065 while (--nregs >= 0)
1066 reg_state[regno + nregs].use_index = -1;
1067 return;
1068 }
1069 break;
1070
1071 case CLOBBER:
f8cfc6aa 1072 if (REG_P (SET_DEST (x)))
15e35479
KH
1073 {
1074 /* No spurious CLOBBERs of pseudo registers may remain. */
e16acfcd 1075 gcc_assert (REGNO (SET_DEST (x)) < FIRST_PSEUDO_REGISTER);
15e35479
KH
1076 return;
1077 }
1078 break;
1079
1080 case PLUS:
1081 /* We are interested in (plus (reg) (const_int)) . */
f8cfc6aa 1082 if (!REG_P (XEXP (x, 0))
481683e1 1083 || !CONST_INT_P (XEXP (x, 1)))
15e35479
KH
1084 break;
1085 offset = XEXP (x, 1);
1086 x = XEXP (x, 0);
1087 /* Fall through. */
1088 case REG:
1089 {
1090 int regno = REGNO (x);
1091 int use_index;
1092 int nregs;
1093
1094 /* No spurious USEs of pseudo registers may remain. */
e16acfcd 1095 gcc_assert (regno < FIRST_PSEUDO_REGISTER);
15e35479 1096
66fd46b6 1097 nregs = hard_regno_nregs[regno][GET_MODE (x)];
15e35479
KH
1098
1099 /* We can't substitute into multi-hard-reg uses. */
1100 if (nregs > 1)
1101 {
1102 while (--nregs >= 0)
1103 reg_state[regno + nregs].use_index = -1;
1104 return;
1105 }
1106
1107 /* If this register is already used in some unknown fashion, we
1108 can't do anything.
1109 If we decrement the index from zero to -1, we can't store more
1110 uses, so this register becomes used in an unknown fashion. */
1111 use_index = --reg_state[regno].use_index;
1112 if (use_index < 0)
1113 return;
1114
1115 if (use_index != RELOAD_COMBINE_MAX_USES - 1)
1116 {
1117 /* We have found another use for a register that is already
1118 used later. Check if the offsets match; if not, mark the
1119 register as used in an unknown fashion. */
1120 if (! rtx_equal_p (offset, reg_state[regno].offset))
1121 {
1122 reg_state[regno].use_index = -1;
1123 return;
1124 }
1125 }
1126 else
1127 {
1128 /* This is the first use of this register we have seen since we
1129 marked it as dead. */
1130 reg_state[regno].offset = offset;
1131 reg_state[regno].use_ruid = reload_combine_ruid;
1132 }
1133 reg_state[regno].reg_use[use_index].insn = insn;
1134 reg_state[regno].reg_use[use_index].usep = xp;
1135 return;
1136 }
1137
1138 default:
1139 break;
1140 }
1141
1142 /* Recursively process the components of X. */
1143 fmt = GET_RTX_FORMAT (code);
1144 for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
1145 {
1146 if (fmt[i] == 'e')
1147 reload_combine_note_use (&XEXP (x, i), insn);
1148 else if (fmt[i] == 'E')
1149 {
1150 for (j = XVECLEN (x, i) - 1; j >= 0; j--)
1151 reload_combine_note_use (&XVECEXP (x, i, j), insn);
1152 }
1153 }
1154}
1155\f
1156/* See if we can reduce the cost of a constant by replacing a move
1157 with an add. We track situations in which a register is set to a
1158 constant or to a register plus a constant. */
1159/* We cannot do our optimization across labels. Invalidating all the
1160 information about register contents we have would be costly, so we
1161 use move2add_last_label_luid to note where the label is and then
1162 later disable any optimization that would cross it.
7beb0596
JZ
1163 reg_offset[n] / reg_base_reg[n] / reg_symbol_ref[n] / reg_mode[n]
1164 are only valid if reg_set_luid[n] is greater than
1165 move2add_last_label_luid. */
15e35479
KH
1166static int reg_set_luid[FIRST_PSEUDO_REGISTER];
1167
1168/* If reg_base_reg[n] is negative, register n has been set to
7beb0596 1169 reg_offset[n] or reg_symbol_ref[n] + reg_offset[n] in mode reg_mode[n].
15e35479
KH
1170 If reg_base_reg[n] is non-negative, register n has been set to the
1171 sum of reg_offset[n] and the value of register reg_base_reg[n]
1172 before reg_set_luid[n], calculated in mode reg_mode[n] . */
1173static HOST_WIDE_INT reg_offset[FIRST_PSEUDO_REGISTER];
1174static int reg_base_reg[FIRST_PSEUDO_REGISTER];
7beb0596 1175static rtx reg_symbol_ref[FIRST_PSEUDO_REGISTER];
15e35479
KH
1176static enum machine_mode reg_mode[FIRST_PSEUDO_REGISTER];
1177
1178/* move2add_luid is linearly increased while scanning the instructions
1179 from first to last. It is used to set reg_set_luid in
1180 reload_cse_move2add and move2add_note_store. */
1181static int move2add_luid;
1182
1183/* move2add_last_label_luid is set whenever a label is found. Labels
1184 invalidate all previously collected reg_offset data. */
1185static int move2add_last_label_luid;
1186
1187/* ??? We don't know how zero / sign extension is handled, hence we
1188 can't go from a narrower to a wider mode. */
1189#define MODES_OK_FOR_MOVE2ADD(OUTMODE, INMODE) \
1190 (GET_MODE_SIZE (OUTMODE) == GET_MODE_SIZE (INMODE) \
1191 || (GET_MODE_SIZE (OUTMODE) <= GET_MODE_SIZE (INMODE) \
1192 && TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (OUTMODE), \
1193 GET_MODE_BITSIZE (INMODE))))
1194
7beb0596
JZ
1195/* This function is called with INSN that sets REG to (SYM + OFF),
1196 while REG is known to already have value (SYM + offset).
1197 This function tries to change INSN into an add instruction
1198 (set (REG) (plus (REG) (OFF - offset))) using the known value.
1199 It also updates the information about REG's known value. */
1200
1201static void
1202move2add_use_add2_insn (rtx reg, rtx sym, rtx off, rtx insn)
1203{
1204 rtx pat = PATTERN (insn);
1205 rtx src = SET_SRC (pat);
1206 int regno = REGNO (reg);
1207 rtx new_src = gen_int_mode (INTVAL (off) - reg_offset[regno],
1208 GET_MODE (reg));
1209 bool speed = optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn));
1210
1211 /* (set (reg) (plus (reg) (const_int 0))) is not canonical;
1212 use (set (reg) (reg)) instead.
1213 We don't delete this insn, nor do we convert it into a
1214 note, to avoid losing register notes or the return
1215 value flag. jump2 already knows how to get rid of
1216 no-op moves. */
1217 if (new_src == const0_rtx)
1218 {
1219 /* If the constants are different, this is a
1220 truncation, that, if turned into (set (reg)
1221 (reg)), would be discarded. Maybe we should
1222 try a truncMN pattern? */
1223 if (INTVAL (off) == reg_offset [regno])
1224 validate_change (insn, &SET_SRC (pat), reg, 0);
1225 }
1226 else if (rtx_cost (new_src, PLUS, speed) < rtx_cost (src, SET, speed)
1227 && have_add2_insn (reg, new_src))
1228 {
1229 rtx tem = gen_rtx_PLUS (GET_MODE (reg), reg, new_src);
1230 validate_change (insn, &SET_SRC (pat), tem, 0);
1231 }
1232 else if (sym == NULL_RTX && GET_MODE (reg) != BImode)
1233 {
1234 enum machine_mode narrow_mode;
1235 for (narrow_mode = GET_CLASS_NARROWEST_MODE (MODE_INT);
1236 narrow_mode != VOIDmode
1237 && narrow_mode != GET_MODE (reg);
1238 narrow_mode = GET_MODE_WIDER_MODE (narrow_mode))
1239 {
1240 if (have_insn_for (STRICT_LOW_PART, narrow_mode)
1241 && ((reg_offset[regno]
1242 & ~GET_MODE_MASK (narrow_mode))
1243 == (INTVAL (off)
1244 & ~GET_MODE_MASK (narrow_mode))))
1245 {
1246 rtx narrow_reg = gen_rtx_REG (narrow_mode,
1247 REGNO (reg));
1248 rtx narrow_src = gen_int_mode (INTVAL (off),
1249 narrow_mode);
1250 rtx new_set =
1251 gen_rtx_SET (VOIDmode,
1252 gen_rtx_STRICT_LOW_PART (VOIDmode,
1253 narrow_reg),
1254 narrow_src);
1255 if (validate_change (insn, &PATTERN (insn),
1256 new_set, 0))
1257 break;
1258 }
1259 }
1260 }
1261 reg_set_luid[regno] = move2add_luid;
1262 reg_base_reg[regno] = -1;
1263 reg_mode[regno] = GET_MODE (reg);
1264 reg_symbol_ref[regno] = sym;
1265 reg_offset[regno] = INTVAL (off);
1266}
1267
1268
1269/* This function is called with INSN that sets REG to (SYM + OFF),
1270 but REG doesn't have known value (SYM + offset). This function
1271 tries to find another register which is known to already have
1272 value (SYM + offset) and change INSN into an add instruction
1273 (set (REG) (plus (the found register) (OFF - offset))) if such
1274 a register is found. It also updates the information about
1275 REG's known value. */
1276
1277static void
1278move2add_use_add3_insn (rtx reg, rtx sym, rtx off, rtx insn)
1279{
1280 rtx pat = PATTERN (insn);
1281 rtx src = SET_SRC (pat);
1282 int regno = REGNO (reg);
1283 int min_cost = INT_MAX;
1284 int min_regno;
1285 bool speed = optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn));
1286 int i;
1287
1288 for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
1289 if (reg_set_luid[i] > move2add_last_label_luid
1290 && reg_mode[i] == GET_MODE (reg)
1291 && reg_base_reg[i] < 0
1292 && reg_symbol_ref[i] != NULL_RTX
1293 && rtx_equal_p (sym, reg_symbol_ref[i]))
1294 {
1295 rtx new_src = gen_int_mode (INTVAL (off) - reg_offset[i],
1296 GET_MODE (reg));
1297 /* (set (reg) (plus (reg) (const_int 0))) is not canonical;
1298 use (set (reg) (reg)) instead.
1299 We don't delete this insn, nor do we convert it into a
1300 note, to avoid losing register notes or the return
1301 value flag. jump2 already knows how to get rid of
1302 no-op moves. */
1303 if (new_src == const0_rtx)
1304 {
1305 min_cost = 0;
1306 min_regno = i;
1307 break;
1308 }
1309 else
1310 {
1311 int cost = rtx_cost (new_src, PLUS, speed);
1312 if (cost < min_cost)
1313 {
1314 min_cost = cost;
1315 min_regno = i;
1316 }
1317 }
1318 }
1319
1320 if (min_cost < rtx_cost (src, SET, speed))
1321 {
1322 rtx tem;
1323
1324 tem = gen_rtx_REG (GET_MODE (reg), min_regno);
1325 if (i != min_regno)
1326 {
1327 rtx new_src = gen_int_mode (INTVAL (off) - reg_offset[min_regno],
1328 GET_MODE (reg));
1329 tem = gen_rtx_PLUS (GET_MODE (reg), tem, new_src);
1330 }
1331 validate_change (insn, &SET_SRC (pat), tem, 0);
1332 }
1333 reg_set_luid[regno] = move2add_luid;
1334 reg_base_reg[regno] = -1;
1335 reg_mode[regno] = GET_MODE (reg);
1336 reg_symbol_ref[regno] = sym;
1337 reg_offset[regno] = INTVAL (off);
1338}
1339
15e35479 1340static void
0c20a65f 1341reload_cse_move2add (rtx first)
15e35479
KH
1342{
1343 int i;
1344 rtx insn;
1345
1346 for (i = FIRST_PSEUDO_REGISTER - 1; i >= 0; i--)
7beb0596
JZ
1347 {
1348 reg_set_luid[i] = 0;
1349 reg_offset[i] = 0;
1350 reg_base_reg[i] = 0;
1351 reg_symbol_ref[i] = NULL_RTX;
1352 reg_mode[i] = VOIDmode;
1353 }
15e35479
KH
1354
1355 move2add_last_label_luid = 0;
1356 move2add_luid = 2;
1357 for (insn = first; insn; insn = NEXT_INSN (insn), move2add_luid++)
1358 {
1359 rtx pat, note;
1360
4b4bf941 1361 if (LABEL_P (insn))
15e35479
KH
1362 {
1363 move2add_last_label_luid = move2add_luid;
1364 /* We're going to increment move2add_luid twice after a
1365 label, so that we can use move2add_last_label_luid + 1 as
1366 the luid for constants. */
1367 move2add_luid++;
1368 continue;
1369 }
1370 if (! INSN_P (insn))
1371 continue;
1372 pat = PATTERN (insn);
1373 /* For simplicity, we only perform this optimization on
1374 straightforward SETs. */
1375 if (GET_CODE (pat) == SET
f8cfc6aa 1376 && REG_P (SET_DEST (pat)))
15e35479
KH
1377 {
1378 rtx reg = SET_DEST (pat);
1379 int regno = REGNO (reg);
1380 rtx src = SET_SRC (pat);
1381
1382 /* Check if we have valid information on the contents of this
1383 register in the mode of REG. */
1384 if (reg_set_luid[regno] > move2add_last_label_luid
6fb5fa3c
DB
1385 && MODES_OK_FOR_MOVE2ADD (GET_MODE (reg), reg_mode[regno])
1386 && dbg_cnt (cse2_move2add))
15e35479
KH
1387 {
1388 /* Try to transform (set (REGX) (CONST_INT A))
1389 ...
1390 (set (REGX) (CONST_INT B))
1391 to
1392 (set (REGX) (CONST_INT A))
1393 ...
1394 (set (REGX) (plus (REGX) (CONST_INT B-A)))
1395 or
1396 (set (REGX) (CONST_INT A))
1397 ...
1398 (set (STRICT_LOW_PART (REGX)) (CONST_INT B))
1399 */
1400
7beb0596
JZ
1401 if (CONST_INT_P (src)
1402 && reg_base_reg[regno] < 0
1403 && reg_symbol_ref[regno] == NULL_RTX)
15e35479 1404 {
7beb0596 1405 move2add_use_add2_insn (reg, NULL_RTX, src, insn);
15e35479
KH
1406 continue;
1407 }
1408
1409 /* Try to transform (set (REGX) (REGY))
1410 (set (REGX) (PLUS (REGX) (CONST_INT A)))
1411 ...
1412 (set (REGX) (REGY))
1413 (set (REGX) (PLUS (REGX) (CONST_INT B)))
1414 to
1415 (set (REGX) (REGY))
1416 (set (REGX) (PLUS (REGX) (CONST_INT A)))
1417 ...
1418 (set (REGX) (plus (REGX) (CONST_INT B-A))) */
f8cfc6aa 1419 else if (REG_P (src)
15e35479
KH
1420 && reg_set_luid[regno] == reg_set_luid[REGNO (src)]
1421 && reg_base_reg[regno] == reg_base_reg[REGNO (src)]
1422 && MODES_OK_FOR_MOVE2ADD (GET_MODE (reg),
1423 reg_mode[REGNO (src)]))
1424 {
1425 rtx next = next_nonnote_insn (insn);
1426 rtx set = NULL_RTX;
1427 if (next)
1428 set = single_set (next);
1429 if (set
1430 && SET_DEST (set) == reg
1431 && GET_CODE (SET_SRC (set)) == PLUS
1432 && XEXP (SET_SRC (set), 0) == reg
481683e1 1433 && CONST_INT_P (XEXP (SET_SRC (set), 1)))
15e35479
KH
1434 {
1435 rtx src3 = XEXP (SET_SRC (set), 1);
1436 HOST_WIDE_INT added_offset = INTVAL (src3);
1437 HOST_WIDE_INT base_offset = reg_offset[REGNO (src)];
1438 HOST_WIDE_INT regno_offset = reg_offset[regno];
1439 rtx new_src =
bb80db7b
KH
1440 gen_int_mode (added_offset
1441 + base_offset
1442 - regno_offset,
1443 GET_MODE (reg));
f40751dd
JH
1444 bool success = false;
1445 bool speed = optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn));
15e35479
KH
1446
1447 if (new_src == const0_rtx)
1448 /* See above why we create (set (reg) (reg)) here. */
1449 success
1450 = validate_change (next, &SET_SRC (set), reg, 0);
f40751dd
JH
1451 else if ((rtx_cost (new_src, PLUS, speed)
1452 < COSTS_N_INSNS (1) + rtx_cost (src3, SET, speed))
15e35479
KH
1453 && have_add2_insn (reg, new_src))
1454 {
e69cdc12
EB
1455 rtx newpat = gen_rtx_SET (VOIDmode,
1456 reg,
1457 gen_rtx_PLUS (GET_MODE (reg),
1458 reg,
1459 new_src));
15e35479
KH
1460 success
1461 = validate_change (next, &PATTERN (next),
1462 newpat, 0);
1463 }
1464 if (success)
1465 delete_insn (insn);
1466 insn = next;
1467 reg_mode[regno] = GET_MODE (reg);
1468 reg_offset[regno] =
1469 trunc_int_for_mode (added_offset + base_offset,
1470 GET_MODE (reg));
1471 continue;
1472 }
1473 }
1474 }
7beb0596
JZ
1475
1476 /* Try to transform
1477 (set (REGX) (CONST (PLUS (SYMBOL_REF) (CONST_INT A))))
1478 ...
1479 (set (REGY) (CONST (PLUS (SYMBOL_REF) (CONST_INT B))))
1480 to
1481 (set (REGX) (CONST (PLUS (SYMBOL_REF) (CONST_INT A))))
1482 ...
1483 (set (REGY) (CONST (PLUS (REGX) (CONST_INT B-A)))) */
1484 if ((GET_CODE (src) == SYMBOL_REF
1485 || (GET_CODE (src) == CONST
1486 && GET_CODE (XEXP (src, 0)) == PLUS
1487 && GET_CODE (XEXP (XEXP (src, 0), 0)) == SYMBOL_REF
1488 && CONST_INT_P (XEXP (XEXP (src, 0), 1))))
1489 && dbg_cnt (cse2_move2add))
1490 {
1491 rtx sym, off;
1492
1493 if (GET_CODE (src) == SYMBOL_REF)
1494 {
1495 sym = src;
1496 off = const0_rtx;
1497 }
1498 else
1499 {
1500 sym = XEXP (XEXP (src, 0), 0);
1501 off = XEXP (XEXP (src, 0), 1);
1502 }
1503
1504 /* If the reg already contains the value which is sum of
1505 sym and some constant value, we can use an add2 insn. */
1506 if (reg_set_luid[regno] > move2add_last_label_luid
1507 && MODES_OK_FOR_MOVE2ADD (GET_MODE (reg), reg_mode[regno])
1508 && reg_base_reg[regno] < 0
1509 && reg_symbol_ref[regno] != NULL_RTX
1510 && rtx_equal_p (sym, reg_symbol_ref[regno]))
1511 move2add_use_add2_insn (reg, sym, off, insn);
1512
1513 /* Otherwise, we have to find a register whose value is sum
1514 of sym and some constant value. */
1515 else
1516 move2add_use_add3_insn (reg, sym, off, insn);
1517
1518 continue;
1519 }
15e35479
KH
1520 }
1521
1522 for (note = REG_NOTES (insn); note; note = XEXP (note, 1))
1523 {
1524 if (REG_NOTE_KIND (note) == REG_INC
f8cfc6aa 1525 && REG_P (XEXP (note, 0)))
15e35479
KH
1526 {
1527 /* Reset the information about this register. */
1528 int regno = REGNO (XEXP (note, 0));
1529 if (regno < FIRST_PSEUDO_REGISTER)
1530 reg_set_luid[regno] = 0;
1531 }
1532 }
7beb0596 1533 note_stores (PATTERN (insn), move2add_note_store, insn);
15e35479
KH
1534
1535 /* If INSN is a conditional branch, we try to extract an
1536 implicit set out of it. */
c4cdb8e1 1537 if (any_condjump_p (insn))
15e35479
KH
1538 {
1539 rtx cnd = fis_get_condition (insn);
1540
1541 if (cnd != NULL_RTX
1542 && GET_CODE (cnd) == NE
f8cfc6aa 1543 && REG_P (XEXP (cnd, 0))
c4cdb8e1 1544 && !reg_set_p (XEXP (cnd, 0), insn)
15e35479
KH
1545 /* The following two checks, which are also in
1546 move2add_note_store, are intended to reduce the
1547 number of calls to gen_rtx_SET to avoid memory
1548 allocation if possible. */
1549 && SCALAR_INT_MODE_P (GET_MODE (XEXP (cnd, 0)))
66fd46b6 1550 && hard_regno_nregs[REGNO (XEXP (cnd, 0))][GET_MODE (XEXP (cnd, 0))] == 1
481683e1 1551 && CONST_INT_P (XEXP (cnd, 1)))
15e35479
KH
1552 {
1553 rtx implicit_set =
1554 gen_rtx_SET (VOIDmode, XEXP (cnd, 0), XEXP (cnd, 1));
7beb0596 1555 move2add_note_store (SET_DEST (implicit_set), implicit_set, insn);
15e35479
KH
1556 }
1557 }
1558
1559 /* If this is a CALL_INSN, all call used registers are stored with
1560 unknown values. */
4b4bf941 1561 if (CALL_P (insn))
15e35479
KH
1562 {
1563 for (i = FIRST_PSEUDO_REGISTER - 1; i >= 0; i--)
1564 {
1565 if (call_used_regs[i])
1566 /* Reset the information about this register. */
1567 reg_set_luid[i] = 0;
1568 }
1569 }
1570 }
1571}
1572
7beb0596
JZ
1573/* SET is a SET or CLOBBER that sets DST. DATA is the insn which
1574 contains SET.
15e35479
KH
1575 Update reg_set_luid, reg_offset and reg_base_reg accordingly.
1576 Called from reload_cse_move2add via note_stores. */
1577
1578static void
7beb0596 1579move2add_note_store (rtx dst, const_rtx set, void *data)
15e35479 1580{
7beb0596 1581 rtx insn = (rtx) data;
15e35479 1582 unsigned int regno = 0;
f1f4e530 1583 unsigned int nregs = 0;
15e35479
KH
1584 unsigned int i;
1585 enum machine_mode mode = GET_MODE (dst);
1586
1587 if (GET_CODE (dst) == SUBREG)
1588 {
1589 regno = subreg_regno_offset (REGNO (SUBREG_REG (dst)),
1590 GET_MODE (SUBREG_REG (dst)),
1591 SUBREG_BYTE (dst),
1592 GET_MODE (dst));
f1f4e530 1593 nregs = subreg_nregs (dst);
15e35479
KH
1594 dst = SUBREG_REG (dst);
1595 }
1596
1597 /* Some targets do argument pushes without adding REG_INC notes. */
1598
3c0cb5de 1599 if (MEM_P (dst))
15e35479
KH
1600 {
1601 dst = XEXP (dst, 0);
1602 if (GET_CODE (dst) == PRE_INC || GET_CODE (dst) == POST_INC
1603 || GET_CODE (dst) == PRE_DEC || GET_CODE (dst) == POST_DEC)
1604 reg_set_luid[REGNO (XEXP (dst, 0))] = 0;
1605 return;
1606 }
f8cfc6aa 1607 if (!REG_P (dst))
15e35479
KH
1608 return;
1609
1610 regno += REGNO (dst);
f1f4e530
JM
1611 if (!nregs)
1612 nregs = hard_regno_nregs[regno][mode];
15e35479 1613
7beb0596
JZ
1614 if (SCALAR_INT_MODE_P (GET_MODE (dst))
1615 && nregs == 1 && GET_CODE (set) == SET)
1616 {
1617 rtx note, sym = NULL_RTX;
1618 HOST_WIDE_INT off;
1619
1620 note = find_reg_equal_equiv_note (insn);
1621 if (note && GET_CODE (XEXP (note, 0)) == SYMBOL_REF)
1622 {
1623 sym = XEXP (note, 0);
1624 off = 0;
1625 }
1626 else if (note && GET_CODE (XEXP (note, 0)) == CONST
1627 && GET_CODE (XEXP (XEXP (note, 0), 0)) == PLUS
1628 && GET_CODE (XEXP (XEXP (XEXP (note, 0), 0), 0)) == SYMBOL_REF
1629 && CONST_INT_P (XEXP (XEXP (XEXP (note, 0), 0), 1)))
1630 {
1631 sym = XEXP (XEXP (XEXP (note, 0), 0), 0);
1632 off = INTVAL (XEXP (XEXP (XEXP (note, 0), 0), 1));
1633 }
1634
1635 if (sym != NULL_RTX)
1636 {
1637 reg_base_reg[regno] = -1;
1638 reg_symbol_ref[regno] = sym;
1639 reg_offset[regno] = off;
1640 reg_mode[regno] = mode;
1641 reg_set_luid[regno] = move2add_luid;
1642 return;
1643 }
1644 }
1645
05075d4e 1646 if (SCALAR_INT_MODE_P (GET_MODE (dst))
f1f4e530 1647 && nregs == 1 && GET_CODE (set) == SET
15e35479 1648 && GET_CODE (SET_DEST (set)) != ZERO_EXTRACT
15e35479
KH
1649 && GET_CODE (SET_DEST (set)) != STRICT_LOW_PART)
1650 {
1651 rtx src = SET_SRC (set);
1652 rtx base_reg;
1653 HOST_WIDE_INT offset;
1654 int base_regno;
1655 /* This may be different from mode, if SET_DEST (set) is a
1656 SUBREG. */
1657 enum machine_mode dst_mode = GET_MODE (dst);
1658
1659 switch (GET_CODE (src))
1660 {
1661 case PLUS:
f8cfc6aa 1662 if (REG_P (XEXP (src, 0)))
15e35479
KH
1663 {
1664 base_reg = XEXP (src, 0);
1665
481683e1 1666 if (CONST_INT_P (XEXP (src, 1)))
15e35479 1667 offset = INTVAL (XEXP (src, 1));
f8cfc6aa 1668 else if (REG_P (XEXP (src, 1))
15e35479
KH
1669 && (reg_set_luid[REGNO (XEXP (src, 1))]
1670 > move2add_last_label_luid)
1671 && (MODES_OK_FOR_MOVE2ADD
1672 (dst_mode, reg_mode[REGNO (XEXP (src, 1))])))
1673 {
1674 if (reg_base_reg[REGNO (XEXP (src, 1))] < 0)
1675 offset = reg_offset[REGNO (XEXP (src, 1))];
1676 /* Maybe the first register is known to be a
1677 constant. */
1678 else if (reg_set_luid[REGNO (base_reg)]
1679 > move2add_last_label_luid
1680 && (MODES_OK_FOR_MOVE2ADD
1681 (dst_mode, reg_mode[REGNO (XEXP (src, 1))]))
1682 && reg_base_reg[REGNO (base_reg)] < 0)
1683 {
1684 offset = reg_offset[REGNO (base_reg)];
1685 base_reg = XEXP (src, 1);
1686 }
1687 else
1688 goto invalidate;
1689 }
1690 else
1691 goto invalidate;
1692
1693 break;
1694 }
1695
1696 goto invalidate;
1697
1698 case REG:
1699 base_reg = src;
1700 offset = 0;
1701 break;
1702
1703 case CONST_INT:
1704 /* Start tracking the register as a constant. */
1705 reg_base_reg[regno] = -1;
7beb0596 1706 reg_symbol_ref[regno] = NULL_RTX;
15e35479
KH
1707 reg_offset[regno] = INTVAL (SET_SRC (set));
1708 /* We assign the same luid to all registers set to constants. */
1709 reg_set_luid[regno] = move2add_last_label_luid + 1;
1710 reg_mode[regno] = mode;
1711 return;
1712
1713 default:
1714 invalidate:
1715 /* Invalidate the contents of the register. */
1716 reg_set_luid[regno] = 0;
1717 return;
1718 }
1719
1720 base_regno = REGNO (base_reg);
1721 /* If information about the base register is not valid, set it
1722 up as a new base register, pretending its value is known
1723 starting from the current insn. */
1724 if (reg_set_luid[base_regno] <= move2add_last_label_luid)
1725 {
1726 reg_base_reg[base_regno] = base_regno;
7beb0596 1727 reg_symbol_ref[base_regno] = NULL_RTX;
15e35479
KH
1728 reg_offset[base_regno] = 0;
1729 reg_set_luid[base_regno] = move2add_luid;
1730 reg_mode[base_regno] = mode;
1731 }
1732 else if (! MODES_OK_FOR_MOVE2ADD (dst_mode,
1733 reg_mode[base_regno]))
1734 goto invalidate;
1735
1736 reg_mode[regno] = mode;
1737
1738 /* Copy base information from our base register. */
1739 reg_set_luid[regno] = reg_set_luid[base_regno];
1740 reg_base_reg[regno] = reg_base_reg[base_regno];
7beb0596 1741 reg_symbol_ref[regno] = reg_symbol_ref[base_regno];
15e35479
KH
1742
1743 /* Compute the sum of the offsets or constants. */
1744 reg_offset[regno] = trunc_int_for_mode (offset
1745 + reg_offset[base_regno],
1746 dst_mode);
1747 }
1748 else
1749 {
f1f4e530 1750 unsigned int endregno = regno + nregs;
15e35479
KH
1751
1752 for (i = regno; i < endregno; i++)
1753 /* Reset the information about this register. */
1754 reg_set_luid[i] = 0;
1755 }
1756}
ef330312
PB
1757\f
1758static bool
1759gate_handle_postreload (void)
1760{
058e97ec 1761 return (optimize > 0 && reload_completed);
ef330312
PB
1762}
1763
1764
c2924966 1765static unsigned int
ef330312
PB
1766rest_of_handle_postreload (void)
1767{
6fb5fa3c
DB
1768 if (!dbg_cnt (postreload_cse))
1769 return 0;
1770
ef330312
PB
1771 /* Do a very simple CSE pass over just the hard registers. */
1772 reload_cse_regs (get_insns ());
6fb5fa3c 1773 /* Reload_cse_regs can eliminate potentially-trapping MEMs.
ef330312 1774 Remove any EH edges associated with them. */
8f4f502f 1775 if (cfun->can_throw_non_call_exceptions)
ef330312 1776 purge_all_dead_edges ();
6fb5fa3c 1777
c2924966 1778 return 0;
ef330312
PB
1779}
1780
8ddbbcae 1781struct rtl_opt_pass pass_postreload_cse =
ef330312 1782{
8ddbbcae
JH
1783 {
1784 RTL_PASS,
ef330312
PB
1785 "postreload", /* name */
1786 gate_handle_postreload, /* gate */
1787 rest_of_handle_postreload, /* execute */
1788 NULL, /* sub */
1789 NULL, /* next */
1790 0, /* static_pass_number */
1791 TV_RELOAD_CSE_REGS, /* tv_id */
1792 0, /* properties_required */
1793 0, /* properties_provided */
1794 0, /* properties_destroyed */
1795 0, /* todo_flags_start */
a36b8a1e 1796 TODO_df_finish | TODO_verify_rtl_sharing |
8ddbbcae
JH
1797 TODO_dump_func /* todo_flags_finish */
1798 }
ef330312 1799};
This page took 2.963111 seconds and 5 git commands to generate.