This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ping some of my patches

On Sep 12, 2004, at 7:08 PM, Richard Henderson wrote:

On Sun, Sep 12, 2004 at 03:19:28PM -0700, Andrew Pinski wrote:
@@ -946,8 +945,12 @@ make_decl_rtl (tree decl)
   /* Now handle ordinary static variables and functions (in memory).
      Also handle vars declared register invalidly.  */

-  if (name[0] == '*' && (reg_number >= 0 || reg_number == -3))
-    error ("%Jregister name given for non-register variable '%D'",
decl, decl);
+  if (name[0] == '*')

There should be no fallthru from the previous if.

+    {
+      reg_number = decode_reg_name (name);
+      if (reg_number >= 0 || reg_number == -3)

And, as I was saying, I believe this error should be disabled if REGISTER_PREFIX is non-empty.

Sorry if this late coming back to this patch but I did not see any use full for it until just recently. I noticed that small C testcases are slowed down because each time we add a new builtin because a call to decode_reg_name shows up even though we know that they cannot be register names at all. Here is the new patch which fixes based on your comments.

OK? Bootstrapped and tested on ppc-darwin.

Andrew Pinski

	* varasm.c (decode_reg_name): Revert change to check for zero
	length strings.
	(make_decl_rtl): Make sure that we call decode_reg_name only
	when needed.

Attachment: speedupReg_decode.diff.txt
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]