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: [patch] lno branch merge -- new iv & simple loop analysis


On Mon, Feb 16, 2004 at 12:14:29AM +0100, Zdenek Dvorak wrote:
> + struct rtx_iv
> + struct niter_desc

It probably doesn't matter much, but I'd like to see the fields
in these structures rearranged to avoid as much unnecessary 
padding as convienient.

> + static unsigned
> + lowpart_byte (enum machine_mode outer_mode, enum machine_mode inner_mode)

subreg_lowpart_offset

> + static bool
> + lowpart_subreg_p (rtx expr)

subreg_lowpart_p

> + static rtx
> + lowpart_subreg (enum machine_mode outer_mode, rtx expr,
> + 		enum machine_mode inner_mode)

I guess this one isn't quite gen_lowpart, if you ever pass it
a constant.  Do you?

> + /* Marks set register REG as wrong, unless it is equal to EXCEPT.  */

"wrong"?  Do you mean "dead" or "Invalidate register REG"?

> +    (1) If an operand is a constant, it will be the second operand.

swap_commutative_operands_p

> +   if (sign)
> +     {
> +       *mmin = GEN_INT (-((unsigned HOST_WIDEST_INT) 1 << (size - 1)));
> +       *mmax = GEN_INT (((unsigned HOST_WIDEST_INT) 1 << (size - 1)) - 1);
> +     }
> +   else
> +     {
> +       *mmin = const0_rtx;
> +       *mmax = GEN_INT (((unsigned HOST_WIDEST_INT) 1 << (size - 1) << 1) - 1);

Not really correct.  HOST_WIDEST_INT may be wider than HOST_WIDE_INT.
The mode may be wide enough that immed_double_const is reqired.

It looks good, generally.


r~


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