aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2019-10-01 13:12:03 +0200
committerSegher Boessenkool <segher@gcc.gnu.org>2019-10-01 13:12:03 +0200
commit58e721d255c111b2ae012bb452cf39a0ee58ed27 (patch)
tree59ab2b4f6d6c4597222a80185f9b13607e01b69b
parent4d07a2ece6603beaf3f9583ec5f6ae00b1df3148 (diff)
downloadgcc-58e721d255c111b2ae012bb452cf39a0ee58ed27.zip
gcc-58e721d255c111b2ae012bb452cf39a0ee58ed27.tar.gz
gcc-58e721d255c111b2ae012bb452cf39a0ee58ed27.tar.bz2
regrename: Use PC instead of CC0 to hide operands
The regrename pass temporarily changes some operand RTL to CC0 so that note_stores and scan_rtx don't see those operands. CC0 is deprecated and we want to remove it, so we need to use something else here. PC fits the bill fine. * regrename.c (hide_operands): Use pc_rtx instead of cc0_rtx. (build_def_use): Use PC instead of CC0 in a comment. From-SVN: r276401
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/regrename.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2c515e1..4d0ce47 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2019-10-01 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * regrename.c (hide_operands): Use pc_rtx instead of cc0_rtx.
+ (build_def_use): Use PC instead of CC0 in a comment.
+
2019-10-01 Richard Sandiford <richard.sandiford@arm.com>
* rtl.def (CLOBBER_HIGH): Delete.
diff --git a/gcc/regrename.c b/gcc/regrename.c
index 8c3bae8..408bccc 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -1517,7 +1517,7 @@ scan_rtx (rtx_insn *insn, rtx *loc, enum reg_class cl, enum scan_actions action,
}
/* Hide operands of the current insn (of which there are N_OPS) by
- substituting cc0 for them.
+ substituting pc for them.
Previous values are stored in the OLD_OPERANDS and OLD_DUPS.
For every bit set in DO_NOT_HIDE, we leave the operand alone.
If INOUT_AND_EC_ONLY is set, we only do this for OP_INOUT type operands
@@ -1541,7 +1541,7 @@ hide_operands (int n_ops, rtx *old_operands, rtx *old_dups,
continue;
if (!inout_and_ec_only || recog_data.operand_type[i] == OP_INOUT
|| op_alt[i].earlyclobber)
- *recog_data.operand_loc[i] = cc0_rtx;
+ *recog_data.operand_loc[i] = pc_rtx;
}
for (i = 0; i < recog_data.n_dups; i++)
{
@@ -1551,7 +1551,7 @@ hide_operands (int n_ops, rtx *old_operands, rtx *old_dups,
continue;
if (!inout_and_ec_only || recog_data.operand_type[opn] == OP_INOUT
|| op_alt[opn].earlyclobber)
- *recog_data.dup_loc[i] = cc0_rtx;
+ *recog_data.dup_loc[i] = pc_rtx;
}
}
@@ -1754,7 +1754,7 @@ build_def_use (basic_block bb)
/* Step 2: Mark chains for which we have reads outside operands
as unrenamable.
- We do this by munging all operands into CC0, and closing
+ We do this by munging all operands into PC, and closing
everything remaining. */
hide_operands (n_ops, old_operands, old_dups, untracked_operands,