On Fri, 2007-08-17 at 09:32 -0400, Kenneth Zadeck wrote: > The problem comes where you have a store that uses 2 or more hard regs > but one or more of those hardregs is unused. > > In a forwards scan, ALL of the set regs will interfere with anything > live until the last set reg goes dead. In a backwards scan, the unused > hard regs never cause interferences. > global/reload wants these interferences.
Can you cut/paste the problematic RTL here? I'm having a hard time seeing what your problem is since "store"'s (excluding store with update insns) don't have any set regs, so we shouldn't get any inferences for store insns. > 2) We could turn off local. I was planning on testing this anyway > because i want to see if local, at this point, is just making global do > a bad job. However, my hope is that global or the new allocator from > vlad is smart enough to properly handle the case where some parts of a > multiword set are dead. Offline, I gave Kenny a patch to disable local_alloc. I'm appending it here for posterity. Peter Index: opts.c =================================================================== --- opts.c (revision 127398) +++ opts.c (working copy) @@ -895,6 +895,8 @@ decode_options (unsigned int argc, const set_param_value ("min-crossjump-insns", 1); } + flag_local_alloc = 1; + /* Initialize whether `char' is signed. */ flag_signed_char = DEFAULT_SIGNED_CHAR; /* Set this to a special "uninitialized" value. The actual default is set Index: local-alloc.c =================================================================== --- local-alloc.c (revision 127398) +++ local-alloc.c (working copy) @@ -363,6 +363,9 @@ local_alloc (void) registers. */ update_equiv_regs (); + if (! flag_local_alloc) + return recorded_label_ref; + /* This sets the maximum number of quantities we can have. Quantity numbers start at zero and we can have one for each pseudo. */ max_qty = (max_regno - FIRST_PSEUDO_REGISTER); Index: common.opt =================================================================== --- common.opt (revision 127398) +++ common.opt (working copy) @@ -628,6 +628,10 @@ fleading-underscore Common Report Var(flag_leading_underscore) Init(-1) Give external symbols a leading underscore +flocal-alloc +Common Report Var(flag_local_alloc) +Perform local register allocation + floop-optimize Common Does nothing. Preserved for backward compatibility.