This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch ping] Strength reduction
On 06/20/2012 04:11 AM, Richard Guenther wrote:
> I notice (with all of these functions)
>
> +unsigned
> +negate_cost (enum machine_mode mode, bool speed)
> +{
> + static unsigned costs[NUM_MACHINE_MODES];
> + rtx seq;
> + unsigned cost;
> +
> + if (costs[mode])
> + return costs[mode];
> +
> + start_sequence ();
> + force_operand (gen_rtx_fmt_e (NEG, mode,
> + gen_raw_REG (mode, LAST_VIRTUAL_REGISTER + 1)),
> + NULL_RTX);
I don't suppose there's any way to share data with what init_expmed computes?
Not, strictly speaking, the cleanest thing to include expmed.h here, but surely
a tad better than re-computing identical data (and without the clever rtl
garbage avoidance tricks).
r~