diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-19 07:09:23 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-19 07:09:23 +0000 |
commit | 91f5b5cb76bd71810e53d4e95fde4d8a6d068784 (patch) | |
tree | 625b290a5561d2ca2554e081f1d9861deebab18f /gcc/df-scan.c | |
parent | 0933f1d92cfcb1a639c1f34046938a9df29621a9 (diff) | |
download | gcc-91f5b5cb76bd71810e53d4e95fde4d8a6d068784.tar.gz |
gcc/
* df.h (df_ref_change_reg_with_loc): Remove old_regno parameter.
Change type of new_regno to unsigned int.
* df-scan.c (df_ref_change_reg_with_loc_1): Change type of
new_regno to unsigned int.
(df_ref_change_reg_with_loc): Remove old_regno parameter.
Change type of new_regno to unsigned int. Use SET_REGNO_RAW.
* rtl.h (SET_REGNO): Update call to df_ref_change_reg_with_loc.
(SET_REGNO_RAW): Add space after ",".
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223338 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/df-scan.c')
-rw-r--r-- | gcc/df-scan.c | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/gcc/df-scan.c b/gcc/df-scan.c index db5aa40e255..6175fd9f56b 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -1819,7 +1819,7 @@ df_insn_change_bb (rtx_insn *insn, basic_block new_bb) static void df_ref_change_reg_with_loc_1 (struct df_reg_info *old_df, struct df_reg_info *new_df, - int new_regno, rtx loc) + unsigned int new_regno, rtx loc) { df_ref the_ref = old_df->reg_chain; @@ -1904,25 +1904,33 @@ df_ref_change_reg_with_loc_1 (struct df_reg_info *old_df, } -/* Change the regno of all refs that contained LOC from OLD_REGNO to - NEW_REGNO. Refs that do not match LOC are not changed which means - that artificial refs are not changed since they have no loc. This - call is to support the SET_REGNO macro. */ +/* Change the regno of register LOC to NEW_REGNO and update the df + information accordingly. Refs that do not match LOC are not changed + which means that artificial refs are not changed since they have no loc. + This call is to support the SET_REGNO macro. */ void -df_ref_change_reg_with_loc (int old_regno, int new_regno, rtx loc) +df_ref_change_reg_with_loc (rtx loc, unsigned int new_regno) { - if ((!df) || (old_regno == -1) || (old_regno == new_regno)) + unsigned int old_regno = REGNO (loc); + if (old_regno == new_regno) return; - df_grow_reg_info (); - - df_ref_change_reg_with_loc_1 (DF_REG_DEF_GET (old_regno), - DF_REG_DEF_GET (new_regno), new_regno, loc); - df_ref_change_reg_with_loc_1 (DF_REG_USE_GET (old_regno), - DF_REG_USE_GET (new_regno), new_regno, loc); - df_ref_change_reg_with_loc_1 (DF_REG_EQ_USE_GET (old_regno), - DF_REG_EQ_USE_GET (new_regno), new_regno, loc); + if (df) + { + df_grow_reg_info (); + + df_ref_change_reg_with_loc_1 (DF_REG_DEF_GET (old_regno), + DF_REG_DEF_GET (new_regno), + new_regno, loc); + df_ref_change_reg_with_loc_1 (DF_REG_USE_GET (old_regno), + DF_REG_USE_GET (new_regno), + new_regno, loc); + df_ref_change_reg_with_loc_1 (DF_REG_EQ_USE_GET (old_regno), + DF_REG_EQ_USE_GET (new_regno), + new_regno, loc); + } + SET_REGNO_RAW (loc, new_regno); } |