On 12.07.2017 21:36, Segher Boessenkool wrote:
On Wed, Jul 12, 2017 at 03:30:00PM +0200, Georg-Johann Lay wrote:
On 12.07.2017 14:11, Segher Boessenkool wrote:
On Tue, Jul 11, 2017 at 10:47:27AM +0200, Georg-Johann Lay wrote:
This small addition improves costs of PARALLELs in
rtlanal.c:seq_cost().  Up to now, these costs are
assumed to be 1 which gives gross inexact costs for,
e.g. divmod which is represented as PARALLEL.

insn_rtx_cost returns 0 ("unknown") for such a PARALLEL, so your
current patch does not change this at all?

Ah I see now.

So this is unfixable...

Any change to seq_cost that would address the issue I had in mind
(completely wrong costs for divmod that are represented as PARALLEL
with 2 SETs) will come up with different handling than the "logic"
of insn_rtx_costs.

So the only way to avoid that "logic" is to pass the whole story
to the back-end.

And in order not to break any existing assumptions this can only
be achieved by a new hook that graceful degrades to the current
behaviour and reasoning when that new hook says "dunno".

I already started an RFC here:

https://gcc.gnu.org/ml/gcc/2017-07/msg00080.html


Johann

Reply via email to