Re: [PATCH 1/2] Assign vertex weight to all nodes

Richard Sandiford <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
Richard Biener <[email protected]> writes:
> On Thu, 20 Aug 2026, Richard Sandiford wrote:
>> Richard Biener <[email protected]> writes:
>> > SLP permute nodes (can) have no SLP_TREE_REPRESENTATIVE, avoid
>> > leaving vertex weight (later used for costing) at zero but
>> > assign weight based on the region entry block.
>> 
>> That's better than 0 :) but is there a plan to make the choice of
>> block more accurate in future?  Using the entry block for something
>> that actually ends up in a loop would defeat the speed-based costing.
>
> Well, permutes are invented by the vectorizer, so they do not have
> a natural "block choice".  One could assign a weigth based on the
> weigth of the permuted operands (possibly recursively) or it's
> uses.  Or based on the place where we'd code generate it (which
> is based on the operands places).  But the processing doesn't walk
> the graph in a particular oder, so that looked iffy to implement.

Maybe it could be another field in the SLP node, calculated separately?

I think the situation would be worth a ??? comment, but otherwise the
patch seems ok to me FWIW.

Richard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.