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: RFA: autoincrement patches for gcc 4 - updated patch

Richard Henderson wrote:

On Thu, Apr 28, 2005 at 08:16:59PM +0100, Joern RENNECKE wrote:

+#ifdef AUTO_INC_DEC

It'll be better for everyone if you use as little conditionally compiled code as possible. E.g.

 if (AUTO_INC_DEC && flag_regmove && flag_optimize_related_values)
   optimize_related_values (nregs, regmove_dump_file);

and let the whole pass be deleted as dead if AUTO_INC_DEC is false.


  FOR_EACH_BB (bb)
   FOR_BB_INSNS (bb, insn)

You'll been to update the aborts to use gcc_assert.

Ok, I can do that.

+#define REL_USE_HASH_SIZE 43
+#define REL_USE_HASH(I) ((I) % (unsigned HOST_WIDE_INT) REL_USE_HASH_SIZE)

Please use hashtab.h. Expandable hash tables are better than chaining.

The average chain length is very close to zero. The overhead of using the abstract hash
tables would be much higher than any chaining penalty.

More importantly, hashtab.h is not flexible enough for my application. It always
requires an element to search for. I need to search for an element with a given key,
without allocating a new element.

+ /* For each integer mode, find minimum and maximum value for a single-
+ instruction reg-constant add.

Seems like you should do this once per compilation, not once per function.

Would you prefer a check if the data is initialized, or an init_regmove function that
is called at the start of the compilation?

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