This is the mail archive of the gcc-patches@gcc.gnu.org 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: [trunk] patch to remove REG_NO_CONFLICT_BLOCKS


> We have also changed things so that global is called
for -O0. This adds .5% to the compile time, but cuts the size of the .o files by 5%.

And probably improves performance by more than that. That's good long term since if the host compiler will be gcc >= 4.4 bootstraps will be sped up significantly (stage1 uses the host compiler with -g).


With this change, actually, you can also remove this wart from gimplify.c:

  /* If not optimizing, never really reuse a temporary.  local-alloc
     won't allocate any variable that is used in more than one basic
     block, which means it will go into memory, causing much extra
     work in reload and final and poorer code generation, outweighing
     the extra memory allocation here.  */

Having fewer pseudos may actually win you back that .5% :-)

The third and fourth patches will require subsequent cleanup patches. These will come later but will not effect the performance or the correctness. In the case of patch 3, we will remove all of the code in global and ra-conflict that was there to support the preallocation of registers. We will also strip out the update-equiv-regs out of local and make that a separate pass.

Yes, and even more simplification is possible since this:


+  if (1)
+    return recorded_label_ref;
+

is always returning 0.


Now, on to the DF parts review,

+      if (DF_REF_FLAGS_IS_SET (ref, DF_REF_PRE_POST_MODIFY))
+	/* See the comment at the top.  */
+	return true;

I don't see a comment at the top that matches this...


This pass computes REG_DEAD and REG_UNUSED notes.

Since you are at it, can you change pass to problem on this line?


df_simulate_artificial_refs_at_top (basic_block bb, bitmap live)
{
struct df_ref **def_rec;
+#ifdef EH_USES
struct df_ref **use_rec;
+#endif
int bb_index = bb->index;
+#ifdef EH_USES
for (use_rec = df_get_artificial_uses (bb_index); *use_rec; use_rec++)
{
struct df_ref *use = *use_rec;
if (DF_REF_FLAGS (use) & DF_REF_AT_TOP)
bitmap_set_bit (live, DF_REF_REGNO (use));
}
+#endif

Is this just an optimization? (Just checking.)


+/* Fast psuedo DCE. */

pseudo-level


+/* Fast byte DCE. */

byte-level


Patch 1 is mostly okay with this nits addressed. If you want you can post the updates incrementally. But then, if you don't want post the whole blahblah again.

@@ -687,6 +738,7 @@ sbitmap_a_and_b_or_c (sbitmap dst, const
*dstp++ = *ap++ & (*bp++ | *cp++);
}
+
#ifdef IN_GCC
/* Set the bitmap DST to the intersection of SRC of successors of
block number BB, using the new flow graph structures. */

Extraneous hunk. Patch 2 (introducing sbitmap_range_empty_p) is simple enough that I'll approve it even though it's strictly speaking outside my maintainance area.


Paolo


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