This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] lno branch merge -- new iv & simple loop analysis
- From: Richard Henderson <rth at redhat dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 16 Feb 2004 15:14:15 -0800
- Subject: Re: [patch] lno branch merge -- new iv & simple loop analysis
- References: <20040215231429.GA11569@atrey.karlin.mff.cuni.cz>
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~