Mercurial > hg > CbC > CbC_gcc
comparison gcc/fwprop.c @ 63:b7f97abdc517 gcc-4.6-20100522
update gcc from gcc-4.5.0 to gcc-4.6
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 May 2010 12:47:05 +0900 |
parents | 77e2b8dfacca |
children | f6334be47118 |
comparison
equal
deleted
inserted
replaced
56:3c8a44c06a95 | 63:b7f97abdc517 |
---|---|
1 /* RTL-based forward propagation pass for GNU compiler. | 1 /* RTL-based forward propagation pass for GNU compiler. |
2 Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 2 Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 |
3 Free Software Foundation, Inc. | |
3 Contributed by Paolo Bonzini and Steven Bosscher. | 4 Contributed by Paolo Bonzini and Steven Bosscher. |
4 | 5 |
5 This file is part of GCC. | 6 This file is part of GCC. |
6 | 7 |
7 GCC is free software; you can redistribute it and/or modify it under | 8 GCC is free software; you can redistribute it and/or modify it under |
225 /* Push a marker for the leave_block callback. */ | 226 /* Push a marker for the leave_block callback. */ |
226 VEC_safe_push (df_ref, heap, reg_defs_stack, NULL); | 227 VEC_safe_push (df_ref, heap, reg_defs_stack, NULL); |
227 | 228 |
228 process_uses (df_get_artificial_uses (bb_index), DF_REF_AT_TOP); | 229 process_uses (df_get_artificial_uses (bb_index), DF_REF_AT_TOP); |
229 process_defs (df_get_artificial_defs (bb_index), DF_REF_AT_TOP); | 230 process_defs (df_get_artificial_defs (bb_index), DF_REF_AT_TOP); |
230 df_simulate_initialize_forwards (bb, local_lr); | 231 |
232 /* We don't call df_simulate_initialize_forwards, as it may overestimate | |
233 the live registers if there are unused artificial defs. We prefer | |
234 liveness to be underestimated. */ | |
231 | 235 |
232 FOR_BB_INSNS (bb, insn) | 236 FOR_BB_INSNS (bb, insn) |
233 if (INSN_P (insn)) | 237 if (INSN_P (insn)) |
234 { | 238 { |
235 unsigned int uid = INSN_UID (insn); | 239 unsigned int uid = INSN_UID (insn); |
816 return false; | 820 return false; |
817 } | 821 } |
818 } | 822 } |
819 else | 823 else |
820 { | 824 { |
825 rtx def_reg = REG_P (SET_DEST (def_set)) ? SET_DEST (def_set) : NULL_RTX; | |
826 | |
821 /* Look at all the uses of DEF_INSN, and see if they are not | 827 /* Look at all the uses of DEF_INSN, and see if they are not |
822 killed between DEF_INSN and TARGET_INSN. */ | 828 killed between DEF_INSN and TARGET_INSN. */ |
823 for (use_rec = DF_INSN_INFO_USES (insn_info); *use_rec; use_rec++) | 829 for (use_rec = DF_INSN_INFO_USES (insn_info); *use_rec; use_rec++) |
824 { | 830 { |
825 df_ref use = *use_rec; | 831 df_ref use = *use_rec; |
832 if (def_reg && rtx_equal_p (DF_REF_REG (use), def_reg)) | |
833 return false; | |
826 if (use_killed_between (use, def_insn, target_insn)) | 834 if (use_killed_between (use, def_insn, target_insn)) |
827 return false; | 835 return false; |
828 } | 836 } |
829 for (use_rec = DF_INSN_INFO_EQ_USES (insn_info); *use_rec; use_rec++) | 837 for (use_rec = DF_INSN_INFO_EQ_USES (insn_info); *use_rec; use_rec++) |
830 { | 838 { |
831 df_ref use = *use_rec; | 839 df_ref use = *use_rec; |
840 if (def_reg && rtx_equal_p (DF_REF_REG (use), def_reg)) | |
841 return false; | |
832 if (use_killed_between (use, def_insn, target_insn)) | 842 if (use_killed_between (use, def_insn, target_insn)) |
833 return false; | 843 return false; |
834 } | 844 } |
835 } | 845 } |
836 | 846 |