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: [DF] Generate REFs in REGNO order

On Tue, 22 May 2012, Paolo Bonzini wrote:
Il 21/05/2012 19:49, Dimitrios Apostolou ha scritto:

Thanks for reviewing, in the meantime I'll try to figure out why this patch doesn't offer any speed-up on ppc64 (doesn't break anything though), so expect a followup by tomorrow.

Perhaps you hit this?

     else if (GET_CODE (XEXP (note, 0)) == CLOBBER)
         if (REG_P (XEXP (XEXP (note, 0), 0)))
             unsigned int regno = REGNO (XEXP (XEXP (note, 0), 0));
             if (!TEST_HARD_REG_BIT (defs_generated, regno))
               df_defs_record (collection_rec, XEXP (note, 0), bb,
                               insn_info, flags);

You are right, and I noticed that if we reverse (actually put straight) the loop for the PARALLEL defs inside df_defs_record() then the speedup stands for both x86 and ppc64.

The following patch was tested on x86, do you think it is meaningful for the generic case?

--- gcc/df-scan.c       2012-05-06 04:08:43 +0000
+++ gcc/df-scan.c       2012-05-22 13:08:33 +0000
@@ -3010,7 +3010,7 @@ df_defs_record (struct df_collection_rec

     case PARALLEL:
-      for (i = XVECLEN (x, 0) - 1; i >= 0; i--)
+      for (i = 0; i < XVECLEN (x, 0); i++)
        df_defs_record (collection_rec, XVECEXP (x, 0, i),
                        bb, insn_info, flags);


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