On 22-04-14 21:27, Eric Botcazou wrote:
Ping of this ( http://gcc.gnu.org/ml/gcc-patches/2014-01/msg00888.html )
patch.


Eric,

thanks for the review.

That patch isn't for GCC mainline though, but

I don't understand why you say that.

OK on principle if you test it
on mainline,

I have.

avoid the very ugly set-inside-use idiom and do:

   record_hard_reg_sets (XEXP (op, 0), NULL, pset);

instead of reimplementing it manually.


Updated as attached, I'll retest and commit.

Thanks,
- Tom

2014-01-15  Tom de Vries  <t...@codesourcery.com>

	* rtlanal.c (find_all_hard_reg_sets): Note INSN_CALL_FUNCTION_USAGE
	clobbers.

diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 284c475..f3471b1 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -1052,8 +1052,14 @@ find_all_hard_reg_sets (const_rtx insn, HARD_REG_SET *pset, bool implicit)
 
   CLEAR_HARD_REG_SET (*pset);
   note_stores (PATTERN (insn), record_hard_reg_sets, pset);
-  if (implicit && CALL_P (insn))
-    IOR_HARD_REG_SET (*pset, call_used_reg_set);
+  if (CALL_P (insn))
+    {
+      if (implicit)
+	IOR_HARD_REG_SET (*pset, call_used_reg_set);
+
+      for (link = CALL_INSN_FUNCTION_USAGE (insn); link; link = XEXP (link, 1))
+	record_hard_reg_sets (XEXP (link, 0), NULL, pset);
+    }
   for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
     if (REG_NOTE_KIND (link) == REG_INC)
       record_hard_reg_sets (XEXP (link, 0), NULL, pset);

Reply via email to