Hi Jozef,
On Fri, Jul 24, 2020 at 12:50:48PM +0100, Jozef Lawrynowicz wrote:
> On Thu, Jul 23, 2020 at 01:34:22PM -0500, Segher Boessenkool wrote:
> > On Thu, Jul 23, 2020 at 04:56:14PM +0100, Jozef Lawrynowicz wrote:
> > > + /* The returned cost must be relative to COSTS_N_INSNS (1). An insn
>
e length and cost of each
> instruction are also printed.
>
During development I found it useful to see the insns in RTL format and their
costs alongside that. In hindsight, it doesn't really have much use in the
finalized patch, so I've removed it.
Thanks!
Jozef
>
> Segher
>From 8b69c
Hi!
On Thu, Jul 23, 2020 at 04:56:14PM +0100, Jozef Lawrynowicz wrote:
> +static int
> +msp430_insn_cost (rtx_insn *insn, bool speed ATTRIBUTE_UNUSED)
> +{
> + int cost;
> +
> + if (recog_memoized (insn) < 0)
> +return 0;
> +
> + cost = get_attr_length (insn);
> + if (TARGET_DEBUG_INSN_COS
zef Lawrynowicz
Date: Thu, 16 Jul 2020 11:34:50 +0100
Subject: [PATCH 4/5] MSP430: Implement TARGET_INSN_COST
The length of an insn can be used to calculate its cost, when optimizing for
size. When optimizing for speed, this is a good estimate, since the cycle cost
of an MSP430 instruction increases w