[ARM][committed] Sort ARMv8 processors by alphabetic order
[official-gcc.git] / gcc / valtrack.c
blob002f49fa6eec9aa5f1b470d9f3ad98eb5ddf340c
1 /* Infrastructure for tracking user variable locations and values
2 throughout compilation.
3 Copyright (C) 2010-2016 Free Software Foundation, Inc.
4 Contributed by Alexandre Oliva <aoliva@redhat.com>.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 3, or (at your option) any later
11 version.
13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
22 #include "config.h"
23 #include "system.h"
24 #include "coretypes.h"
25 #include "backend.h"
26 #include "rtl.h"
27 #include "df.h"
28 #include "valtrack.h"
29 #include "regs.h"
30 #include "memmodel.h"
31 #include "emit-rtl.h"
33 /* gen_lowpart_no_emit hook implementation for DEBUG_INSNs. In DEBUG_INSNs,
34 all lowpart SUBREGs are valid, despite what the machine requires for
35 instructions. */
37 static rtx
38 gen_lowpart_for_debug (machine_mode mode, rtx x)
40 rtx result = gen_lowpart_if_possible (mode, x);
41 if (result)
42 return result;
44 if (GET_MODE (x) != VOIDmode)
45 return gen_rtx_raw_SUBREG (mode, x,
46 subreg_lowpart_offset (mode, GET_MODE (x)));
48 return NULL_RTX;
51 /* Replace auto-increment addressing modes with explicit operations to access
52 the same addresses without modifying the corresponding registers. */
54 static rtx
55 cleanup_auto_inc_dec (rtx src, machine_mode mem_mode ATTRIBUTE_UNUSED)
57 rtx x = src;
58 if (!AUTO_INC_DEC)
59 return copy_rtx (x);
61 const RTX_CODE code = GET_CODE (x);
62 int i;
63 const char *fmt;
65 switch (code)
67 case REG:
68 CASE_CONST_ANY:
69 case SYMBOL_REF:
70 case CODE_LABEL:
71 case PC:
72 case CC0:
73 case SCRATCH:
74 /* SCRATCH must be shared because they represent distinct values. */
75 return x;
76 case CLOBBER:
77 /* Share clobbers of hard registers (like cc0), but do not share pseudo reg
78 clobbers or clobbers of hard registers that originated as pseudos.
79 This is needed to allow safe register renaming. */
80 if (REG_P (XEXP (x, 0)) && REGNO (XEXP (x, 0)) < FIRST_PSEUDO_REGISTER
81 && ORIGINAL_REGNO (XEXP (x, 0)) == REGNO (XEXP (x, 0)))
82 return x;
83 break;
85 case CONST:
86 if (shared_const_p (x))
87 return x;
88 break;
90 case MEM:
91 mem_mode = GET_MODE (x);
92 break;
94 case PRE_INC:
95 case PRE_DEC:
96 gcc_assert (mem_mode != VOIDmode && mem_mode != BLKmode);
97 return gen_rtx_PLUS (GET_MODE (x),
98 cleanup_auto_inc_dec (XEXP (x, 0), mem_mode),
99 gen_int_mode (code == PRE_INC
100 ? GET_MODE_SIZE (mem_mode)
101 : -GET_MODE_SIZE (mem_mode),
102 GET_MODE (x)));
104 case POST_INC:
105 case POST_DEC:
106 case PRE_MODIFY:
107 case POST_MODIFY:
108 return cleanup_auto_inc_dec (code == PRE_MODIFY
109 ? XEXP (x, 1) : XEXP (x, 0),
110 mem_mode);
112 default:
113 break;
116 /* Copy the various flags, fields, and other information. We assume
117 that all fields need copying, and then clear the fields that should
118 not be copied. That is the sensible default behavior, and forces
119 us to explicitly document why we are *not* copying a flag. */
120 x = shallow_copy_rtx (x);
122 /* We do not copy FRAME_RELATED for INSNs. */
123 if (INSN_P (x))
124 RTX_FLAG (x, frame_related) = 0;
126 fmt = GET_RTX_FORMAT (code);
127 for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
128 if (fmt[i] == 'e')
129 XEXP (x, i) = cleanup_auto_inc_dec (XEXP (x, i), mem_mode);
130 else if (fmt[i] == 'E' || fmt[i] == 'V')
132 int j;
133 XVEC (x, i) = rtvec_alloc (XVECLEN (x, i));
134 for (j = 0; j < XVECLEN (x, i); j++)
135 XVECEXP (x, i, j)
136 = cleanup_auto_inc_dec (XVECEXP (src, i, j), mem_mode);
139 return x;
142 /* Auxiliary data structure for propagate_for_debug_stmt. */
144 struct rtx_subst_pair
146 rtx to;
147 bool adjusted;
150 /* DATA points to an rtx_subst_pair. Return the value that should be
151 substituted. */
153 static rtx
154 propagate_for_debug_subst (rtx from, const_rtx old_rtx, void *data)
156 struct rtx_subst_pair *pair = (struct rtx_subst_pair *)data;
158 if (!rtx_equal_p (from, old_rtx))
159 return NULL_RTX;
160 if (!pair->adjusted)
162 pair->adjusted = true;
163 pair->to = cleanup_auto_inc_dec (pair->to, VOIDmode);
164 pair->to = make_compound_operation (pair->to, SET);
165 return pair->to;
167 return copy_rtx (pair->to);
170 /* Replace all the occurrences of DEST with SRC in DEBUG_INSNs between INSN
171 and LAST, not including INSN, but including LAST. Also stop at the end
172 of THIS_BASIC_BLOCK. */
174 void
175 propagate_for_debug (rtx_insn *insn, rtx_insn *last, rtx dest, rtx src,
176 basic_block this_basic_block)
178 rtx_insn *next, *end = NEXT_INSN (BB_END (this_basic_block));
179 rtx loc;
180 rtx (*saved_rtl_hook_no_emit) (machine_mode, rtx);
182 struct rtx_subst_pair p;
183 p.to = src;
184 p.adjusted = false;
186 next = NEXT_INSN (insn);
187 last = NEXT_INSN (last);
188 saved_rtl_hook_no_emit = rtl_hooks.gen_lowpart_no_emit;
189 rtl_hooks.gen_lowpart_no_emit = gen_lowpart_for_debug;
190 while (next != last && next != end)
192 insn = next;
193 next = NEXT_INSN (insn);
194 if (DEBUG_INSN_P (insn))
196 loc = simplify_replace_fn_rtx (INSN_VAR_LOCATION_LOC (insn),
197 dest, propagate_for_debug_subst, &p);
198 if (loc == INSN_VAR_LOCATION_LOC (insn))
199 continue;
200 INSN_VAR_LOCATION_LOC (insn) = loc;
201 df_insn_rescan (insn);
204 rtl_hooks.gen_lowpart_no_emit = saved_rtl_hook_no_emit;
207 /* Initialize DEBUG to an empty list, and clear USED, if given. */
209 void
210 dead_debug_global_init (struct dead_debug_global *debug, bitmap used)
212 debug->used = used;
213 debug->htab = NULL;
214 if (used)
215 bitmap_clear (used);
218 /* Initialize DEBUG to an empty list, and clear USED, if given. Link
219 back to GLOBAL, if given, and bring in used bits from it. */
221 void
222 dead_debug_local_init (struct dead_debug_local *debug, bitmap used,
223 struct dead_debug_global *global)
225 if (!used && global && global->used)
226 used = BITMAP_ALLOC (NULL);
228 debug->head = NULL;
229 debug->global = global;
230 debug->used = used;
231 debug->to_rescan = NULL;
233 if (used)
235 if (global && global->used)
236 bitmap_copy (used, global->used);
237 else
238 bitmap_clear (used);
242 /* Locate the entry for REG in GLOBAL->htab. */
244 static dead_debug_global_entry *
245 dead_debug_global_find (struct dead_debug_global *global, rtx reg)
247 dead_debug_global_entry temp_entry;
248 temp_entry.reg = reg;
250 dead_debug_global_entry *entry = global->htab->find (&temp_entry);
251 gcc_checking_assert (entry && entry->reg == temp_entry.reg);
253 return entry;
256 /* Insert an entry mapping REG to DTEMP in GLOBAL->htab. */
258 static dead_debug_global_entry *
259 dead_debug_global_insert (struct dead_debug_global *global, rtx reg, rtx dtemp)
261 dead_debug_global_entry temp_entry;
262 temp_entry.reg = reg;
263 temp_entry.dtemp = dtemp;
265 if (!global->htab)
266 global->htab = new hash_table<dead_debug_hash_descr> (31);
268 dead_debug_global_entry **slot = global->htab->find_slot (&temp_entry,
269 INSERT);
270 gcc_checking_assert (!*slot);
271 *slot = XNEW (dead_debug_global_entry);
272 **slot = temp_entry;
273 return *slot;
276 /* If UREGNO, referenced by USE, is a pseudo marked as used in GLOBAL,
277 replace it with a USE of the debug temp recorded for it, and
278 return TRUE. Otherwise, just return FALSE.
280 If PTO_RESCAN is given, instead of rescanning modified INSNs right
281 away, add their UIDs to the bitmap, allocating one of *PTO_RESCAN
282 is NULL. */
284 static bool
285 dead_debug_global_replace_temp (struct dead_debug_global *global,
286 df_ref use, unsigned int uregno,
287 bitmap *pto_rescan)
289 if (!global || uregno < FIRST_PSEUDO_REGISTER
290 || !global->used
291 || !REG_P (*DF_REF_REAL_LOC (use))
292 || REGNO (*DF_REF_REAL_LOC (use)) != uregno
293 || !bitmap_bit_p (global->used, uregno))
294 return false;
296 dead_debug_global_entry *entry
297 = dead_debug_global_find (global, *DF_REF_REAL_LOC (use));
298 gcc_checking_assert (GET_CODE (entry->reg) == REG
299 && REGNO (entry->reg) == uregno);
301 if (!entry->dtemp)
302 return true;
304 *DF_REF_REAL_LOC (use) = entry->dtemp;
305 if (!pto_rescan)
306 df_insn_rescan (DF_REF_INSN (use));
307 else
309 if (!*pto_rescan)
310 *pto_rescan = BITMAP_ALLOC (NULL);
311 bitmap_set_bit (*pto_rescan, INSN_UID (DF_REF_INSN (use)));
314 return true;
317 /* Reset all debug uses in HEAD, and clear DEBUG->to_rescan bits of
318 each reset insn. DEBUG is not otherwise modified. If HEAD is
319 DEBUG->head, DEBUG->head will be set to NULL at the end.
320 Otherwise, entries from DEBUG->head that pertain to reset insns
321 will be removed, and only then rescanned. */
323 static void
324 dead_debug_reset_uses (struct dead_debug_local *debug,
325 struct dead_debug_use *head)
327 bool got_head = (debug->head == head);
328 bitmap rescan;
329 struct dead_debug_use **tailp = &debug->head;
330 struct dead_debug_use *cur;
331 bitmap_iterator bi;
332 unsigned int uid;
334 if (got_head)
335 rescan = NULL;
336 else
337 rescan = BITMAP_ALLOC (NULL);
339 while (head)
341 struct dead_debug_use *next = head->next;
342 rtx_insn *insn;
344 insn = DF_REF_INSN (head->use);
345 if (!next || DF_REF_INSN (next->use) != insn)
347 INSN_VAR_LOCATION_LOC (insn) = gen_rtx_UNKNOWN_VAR_LOC ();
348 if (got_head)
349 df_insn_rescan_debug_internal (insn);
350 else
351 bitmap_set_bit (rescan, INSN_UID (insn));
352 if (debug->to_rescan)
353 bitmap_clear_bit (debug->to_rescan, INSN_UID (insn));
355 XDELETE (head);
356 head = next;
359 if (got_head)
361 debug->head = NULL;
362 return;
365 while ((cur = *tailp))
366 if (bitmap_bit_p (rescan, INSN_UID (DF_REF_INSN (cur->use))))
368 *tailp = cur->next;
369 XDELETE (cur);
371 else
372 tailp = &cur->next;
374 EXECUTE_IF_SET_IN_BITMAP (rescan, 0, uid, bi)
376 struct df_insn_info *insn_info = DF_INSN_UID_SAFE_GET (uid);
377 if (insn_info)
378 df_insn_rescan_debug_internal (insn_info->insn);
381 BITMAP_FREE (rescan);
384 /* Promote pending local uses of pseudos in DEBUG to global
385 substitutions. Uses of non-pseudos are left alone for
386 resetting. */
388 static void
389 dead_debug_promote_uses (struct dead_debug_local *debug)
391 for (struct dead_debug_use *head = debug->head, **headp = &debug->head;
392 head; head = *headp)
394 rtx reg = *DF_REF_REAL_LOC (head->use);
395 df_ref ref;
396 dead_debug_global_entry *entry;
398 if (GET_CODE (reg) != REG
399 || REGNO (reg) < FIRST_PSEUDO_REGISTER)
401 headp = &head->next;
402 continue;
405 if (!debug->global->used)
406 debug->global->used = BITMAP_ALLOC (NULL);
408 bool added = bitmap_set_bit (debug->global->used, REGNO (reg));
409 gcc_checking_assert (added);
411 entry = dead_debug_global_insert (debug->global, reg,
412 make_debug_expr_from_rtl (reg));
414 gcc_checking_assert (entry->dtemp);
416 /* Tentatively remove the USE from the list. */
417 *headp = head->next;
419 if (!debug->to_rescan)
420 debug->to_rescan = BITMAP_ALLOC (NULL);
422 for (ref = DF_REG_USE_CHAIN (REGNO (reg)); ref;
423 ref = DF_REF_NEXT_REG (ref))
424 if (DEBUG_INSN_P (DF_REF_INSN (ref)))
426 if (!dead_debug_global_replace_temp (debug->global, ref,
427 REGNO (reg),
428 &debug->to_rescan))
430 rtx_insn *insn = DF_REF_INSN (ref);
431 INSN_VAR_LOCATION_LOC (insn) = gen_rtx_UNKNOWN_VAR_LOC ();
432 bitmap_set_bit (debug->to_rescan, INSN_UID (insn));
436 for (ref = DF_REG_DEF_CHAIN (REGNO (reg)); ref;
437 ref = DF_REF_NEXT_REG (ref))
438 if (!dead_debug_insert_temp (debug, REGNO (reg), DF_REF_INSN (ref),
439 DEBUG_TEMP_BEFORE_WITH_VALUE))
441 rtx bind;
442 bind = gen_rtx_VAR_LOCATION (GET_MODE (reg),
443 DEBUG_EXPR_TREE_DECL (entry->dtemp),
444 gen_rtx_UNKNOWN_VAR_LOC (),
445 VAR_INIT_STATUS_INITIALIZED);
446 rtx_insn *insn = emit_debug_insn_before (bind, DF_REF_INSN (ref));
447 bitmap_set_bit (debug->to_rescan, INSN_UID (insn));
450 entry->dtemp = NULL;
451 XDELETE (head);
455 /* Reset all debug insns with pending uses. Release the bitmap in it,
456 unless it is USED. USED must be the same bitmap passed to
457 dead_debug_local_init. */
459 void
460 dead_debug_local_finish (struct dead_debug_local *debug, bitmap used)
462 if (debug->global)
463 dead_debug_promote_uses (debug);
465 if (debug->used != used)
466 BITMAP_FREE (debug->used);
468 dead_debug_reset_uses (debug, debug->head);
470 if (debug->to_rescan)
472 bitmap_iterator bi;
473 unsigned int uid;
475 EXECUTE_IF_SET_IN_BITMAP (debug->to_rescan, 0, uid, bi)
477 struct df_insn_info *insn_info = DF_INSN_UID_SAFE_GET (uid);
478 if (insn_info)
479 df_insn_rescan (insn_info->insn);
481 BITMAP_FREE (debug->to_rescan);
485 /* Release GLOBAL->used unless it is the same as USED. Release the
486 mapping hash table if it was initialized. */
488 void
489 dead_debug_global_finish (struct dead_debug_global *global, bitmap used)
491 if (global->used != used)
492 BITMAP_FREE (global->used);
494 delete global->htab;
495 global->htab = NULL;
498 /* Add USE to DEBUG, or substitute it right away if it's a pseudo in
499 the global substitution list. USE must be a dead reference to
500 UREGNO in a debug insn. Create a bitmap for DEBUG as needed. */
502 void
503 dead_debug_add (struct dead_debug_local *debug, df_ref use, unsigned int uregno)
505 if (dead_debug_global_replace_temp (debug->global, use, uregno,
506 &debug->to_rescan))
507 return;
509 struct dead_debug_use *newddu = XNEW (struct dead_debug_use);
511 newddu->use = use;
512 newddu->next = debug->head;
513 debug->head = newddu;
515 if (!debug->used)
516 debug->used = BITMAP_ALLOC (NULL);
518 /* ??? If we dealt with split multi-registers below, we should set
519 all registers for the used mode in case of hardware
520 registers. */
521 bitmap_set_bit (debug->used, uregno);
524 /* Like lowpart_subreg, but if a subreg is not valid for machine, force
525 it anyway - for use in debug insns. */
527 static rtx
528 debug_lowpart_subreg (machine_mode outer_mode, rtx expr,
529 machine_mode inner_mode)
531 if (inner_mode == VOIDmode)
532 inner_mode = GET_MODE (expr);
533 int offset = subreg_lowpart_offset (outer_mode, inner_mode);
534 rtx ret = simplify_gen_subreg (outer_mode, expr, inner_mode, offset);
535 if (ret)
536 return ret;
537 return gen_rtx_raw_SUBREG (outer_mode, expr, offset);
540 /* If UREGNO is referenced by any entry in DEBUG, emit a debug insn
541 before or after INSN (depending on WHERE), that binds a (possibly
542 global) debug temp to the widest-mode use of UREGNO, if WHERE is
543 *_WITH_REG, or the value stored in UREGNO by INSN otherwise, and
544 replace all uses of UREGNO in DEBUG with uses of the debug temp.
545 INSN must be where UREGNO dies, if WHERE is *_BEFORE_*, or where it
546 is set otherwise. Return the number of debug insns emitted. */
549 dead_debug_insert_temp (struct dead_debug_local *debug, unsigned int uregno,
550 rtx_insn *insn, enum debug_temp_where where)
552 struct dead_debug_use **tailp = &debug->head;
553 struct dead_debug_use *cur;
554 struct dead_debug_use *uses = NULL;
555 struct dead_debug_use **usesp = &uses;
556 rtx reg = NULL_RTX;
557 rtx breg;
558 rtx dval = NULL_RTX;
559 rtx bind;
560 bool global;
562 if (!debug->used)
563 return 0;
565 global = (debug->global && debug->global->used
566 && bitmap_bit_p (debug->global->used, uregno));
568 if (!global && !bitmap_clear_bit (debug->used, uregno))
569 return 0;
571 /* Move all uses of uregno from debug->head to uses, setting mode to
572 the widest referenced mode. */
573 while ((cur = *tailp))
575 if (DF_REF_REGNO (cur->use) == uregno)
577 /* If this loc has been changed e.g. to debug_expr already
578 as part of a multi-register use, just drop it. */
579 if (!REG_P (*DF_REF_REAL_LOC (cur->use)))
581 *tailp = cur->next;
582 XDELETE (cur);
583 continue;
585 *usesp = cur;
586 usesp = &cur->next;
587 *tailp = cur->next;
588 cur->next = NULL;
589 if (!reg
590 || (GET_MODE_BITSIZE (GET_MODE (reg))
591 < GET_MODE_BITSIZE (GET_MODE (*DF_REF_REAL_LOC (cur->use)))))
592 reg = *DF_REF_REAL_LOC (cur->use);
594 else
595 tailp = &(*tailp)->next;
598 /* We may have dangling bits in debug->used for registers that were part
599 of a multi-register use, one component of which has been reset. */
600 if (reg == NULL)
602 gcc_checking_assert (!uses);
603 if (!global)
604 return 0;
607 if (global)
609 if (!reg)
610 reg = regno_reg_rtx[uregno];
611 dead_debug_global_entry *entry
612 = dead_debug_global_find (debug->global, reg);
613 gcc_checking_assert (entry->reg == reg);
614 dval = entry->dtemp;
615 if (!dval)
616 return 0;
619 gcc_checking_assert (uses || global);
621 breg = reg;
622 /* Recover the expression INSN stores in REG. */
623 if (where == DEBUG_TEMP_BEFORE_WITH_VALUE)
625 rtx set = single_set (insn);
626 rtx dest, src;
628 if (set)
630 dest = SET_DEST (set);
631 src = SET_SRC (set);
632 /* Lose if the REG-setting insn is a CALL. */
633 if (GET_CODE (src) == CALL)
635 while (uses)
637 cur = uses->next;
638 XDELETE (uses);
639 uses = cur;
641 return 0;
645 /* ??? Should we try to extract it from a PARALLEL? */
646 if (!set)
647 breg = NULL;
648 /* Cool, it's the same REG, we can use SRC. */
649 else if (dest == reg)
650 breg = cleanup_auto_inc_dec (src, VOIDmode);
651 else if (REG_P (dest))
653 /* Hmm... Something's fishy, we should be setting REG here. */
654 if (REGNO (dest) != REGNO (reg))
655 breg = NULL;
656 /* If we're not overwriting all the hardware registers that
657 setting REG in its mode would, we won't know what to bind
658 the debug temp to. ??? We could bind the debug_expr to a
659 CONCAT or PARALLEL with the split multi-registers, and
660 replace them as we found the corresponding sets. */
661 else if (REG_NREGS (reg) != REG_NREGS (dest))
662 breg = NULL;
663 /* Ok, it's the same (hardware) REG, but with a different
664 mode, so SUBREG it. */
665 else
666 breg = debug_lowpart_subreg (GET_MODE (reg),
667 cleanup_auto_inc_dec (src, VOIDmode),
668 GET_MODE (dest));
670 else if (GET_CODE (dest) == SUBREG)
672 /* We should be setting REG here. Lose. */
673 if (REGNO (SUBREG_REG (dest)) != REGNO (reg))
674 breg = NULL;
675 /* Lose if we're setting something other than the lowpart of
676 REG. */
677 else if (!subreg_lowpart_p (dest))
678 breg = NULL;
679 /* If we're not overwriting all the hardware registers that
680 setting REG in its mode would, we won't know what to bind
681 the debug temp to. */
682 else if (REGNO (reg) < FIRST_PSEUDO_REGISTER
683 && (REG_NREGS (reg)
684 != hard_regno_nregs[REGNO (reg)][GET_MODE (dest)]))
685 breg = NULL;
686 /* Yay, we can use SRC, just adjust its mode. */
687 else
688 breg = debug_lowpart_subreg (GET_MODE (reg),
689 cleanup_auto_inc_dec (src, VOIDmode),
690 GET_MODE (dest));
692 /* Oh well, we're out of luck. */
693 else
694 breg = NULL;
696 /* We couldn't figure out the value stored in REG, so reset all
697 of its pending debug uses. */
698 if (!breg)
700 dead_debug_reset_uses (debug, uses);
701 return 0;
705 /* If there's a single (debug) use of an otherwise unused REG, and
706 the debug use is not part of a larger expression, then it
707 probably doesn't make sense to introduce a new debug temp. */
708 if (where == DEBUG_TEMP_AFTER_WITH_REG && !uses->next)
710 rtx_insn *next = DF_REF_INSN (uses->use);
712 if (DEBUG_INSN_P (next) && reg == INSN_VAR_LOCATION_LOC (next))
714 XDELETE (uses);
715 return 0;
719 if (!global)
720 /* Create DEBUG_EXPR (and DEBUG_EXPR_DECL). */
721 dval = make_debug_expr_from_rtl (reg);
723 /* Emit a debug bind insn before the insn in which reg dies. */
724 bind = gen_rtx_VAR_LOCATION (GET_MODE (reg),
725 DEBUG_EXPR_TREE_DECL (dval), breg,
726 VAR_INIT_STATUS_INITIALIZED);
728 if (where == DEBUG_TEMP_AFTER_WITH_REG
729 || where == DEBUG_TEMP_AFTER_WITH_REG_FORCE)
730 bind = emit_debug_insn_after (bind, insn);
731 else
732 bind = emit_debug_insn_before (bind, insn);
733 if (debug->to_rescan == NULL)
734 debug->to_rescan = BITMAP_ALLOC (NULL);
735 bitmap_set_bit (debug->to_rescan, INSN_UID (bind));
737 /* Adjust all uses. */
738 while ((cur = uses))
740 if (GET_MODE (*DF_REF_REAL_LOC (cur->use)) == GET_MODE (reg))
741 *DF_REF_REAL_LOC (cur->use) = dval;
742 else
743 *DF_REF_REAL_LOC (cur->use)
744 = debug_lowpart_subreg (GET_MODE (*DF_REF_REAL_LOC (cur->use)), dval,
745 GET_MODE (dval));
746 /* ??? Should we simplify subreg of subreg? */
747 bitmap_set_bit (debug->to_rescan, INSN_UID (DF_REF_INSN (cur->use)));
748 uses = cur->next;
749 XDELETE (cur);
752 return 1;