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]

Re: [new-regalloc] Convert sbitmap's to regset's

On Thu, Feb 01, 2001 at 09:35:53PM -0500, Daniel Berlin wrote:
> Note the use of BITMAP_XMALLOC(), because INIT*_REG_SET won't initialize a
> regset (bitmap), only a regset_head (bitmap_head).

That's fine.

> Another note, why are the dump_sbitmap arguments the reversal of the
> dump_bitmap ones?

You mean dump_regset?  Err, no reason.  If you change dump_regset
(reasonable) do it in mainline as well.

> If people like, I can make a REG_SET macro that does the right thing to
> return a regset pointer, and reverse the arguments so they match for both
> bitmaps and sbitmaps.

Huh?  Oh, you mean a REG_SET_XMALLOC?  Yes, that'd be fine.

>     return retval;
>   }
> ! static void
> ! ig_node_delete (node)

Spacing between functions.

> + /* What nodes are on the stack (So we don't have to look through the stack continuously */

Wrap before 80 columns.

> +   return -1;
> +
> + }

Extra space at the end.

> !       RESET_BIT(set, entry);
> ! 	  SET_BIT(spillWorklist, regNum);
> ! 	  SET_BIT(freezeWorklist, regNum);

Space before open parenthesis.  There are lots of these;
please get used to it.

> !   return ( BLOCK_FOR_INSN(move)->loop_depth + 1) * REGISTER_MOVE_COST (GET_MODE (SET_SRC (body)), rhs, lhs);

No space after open paren; wrap before 80 columns.

> !       if (! REGNO_REG_SET_P (selectNodes, entry) &&
> ! 	  ! REGNO_REG_SET_P (coalescedNodes, entry) &&
>   	  !( (regInfo[entry]->degree < reg_freedom(entry)) ||
> ! 	     REGNO_REG_SET_P (precolored, entry) ||
> ! 	     REGNO_REG_SET_P (regInfo[entry]->adjList, f)))

Operators at the beginning of the next line, not at
the end of the previous line.  Unneeded parenthesis
around relational operators are confusing.

	if (! REGNO_REG_SET_P (selectNodes, entry)
	    && ! REGNO_REG_SET_P (coalescedNodes, entry)
	    && ! (regInfo[entry]->degree < reg_freedom(entry)
		  || REGNO_REG_SET_P (precolored, entry)
		  || REGNO_REG_SET_P (regInfo[entry]->adjList, f)))

> !   if (regInfo[u]->degree >= reg_freedom (u) && REGNO_REG_SET_P (freezeWorklist, u))


Looks technically ok, you just need to take the style rules to heart.


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