aboutsummaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorTrevor Saunders <tbsaunde+gcc@tbsaunde.org>2016-08-28 00:04:04 +0000
committerTrevor Saunders <tbsaunde@gcc.gnu.org>2016-08-28 00:04:04 +0000
commit8c39f8aeb9fe791856a8b4c2725c06cf7d0f23e6 (patch)
tree4b1988c81c3db678ecd464b5bc3742a5f9eff054 /gcc/emit-rtl.c
parent6f7eba349b7f2b140f163b772ba94b383d02d64e (diff)
downloadgcc-8c39f8aeb9fe791856a8b4c2725c06cf7d0f23e6.zip
gcc-8c39f8aeb9fe791856a8b4c2725c06cf7d0f23e6.tar.gz
gcc-8c39f8aeb9fe791856a8b4c2725c06cf7d0f23e6.tar.bz2
make stack_slot_list a vec<rtx>
gcc/ChangeLog: 2016-08-27 Trevor Saunders <tbsaunde+gcc@tbsaunde.org> * emit-rtl.h (struct rtl_data): Make stack_slot_list a vector. * emit-rtl.c (unshare_all_rtl_1): Adjust. (unshare_all_rtl_again): Likewise. * function.c (assign_stack_local_1): Likewise. (assign_stack_temp_for_type): Likewise. From-SVN: r239801
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index 99f052d..a724608 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -2626,8 +2626,10 @@ unshare_all_rtl_1 (rtx_insn *insn)
This special care is necessary when the stack slot MEM does not
actually appear in the insn chain. If it does appear, its address
is unshared from all else at that point. */
- stack_slot_list = safe_as_a <rtx_expr_list *> (
- copy_rtx_if_shared (stack_slot_list));
+ unsigned int i;
+ rtx temp;
+ FOR_EACH_VEC_SAFE_ELT (stack_slot_list, i, temp)
+ (*stack_slot_list)[i] = copy_rtx_if_shared (temp);
}
/* Go through all the RTL insn bodies and copy any invalid shared
@@ -2656,7 +2658,10 @@ unshare_all_rtl_again (rtx_insn *insn)
for (decl = DECL_ARGUMENTS (cfun->decl); decl; decl = DECL_CHAIN (decl))
set_used_flags (DECL_RTL (decl));
- reset_used_flags (stack_slot_list);
+ rtx temp;
+ unsigned int i;
+ FOR_EACH_VEC_SAFE_ELT (stack_slot_list, i, temp)
+ reset_used_flags (temp);
unshare_all_rtl_1 (insn);
}