on 2019/7/22 下午3:18, Richard Biener wrote:
> On Mon, 22 Jul 2019, Segher Boessenkool wrote:
> 
>> Hi!
>>
>> (Maybe I am missing half of the discussion -- sorry if so).
>>
>> I think we should have a new iv for just the doloop (which can have the
>> same starting value and step and type as another iv).
>>
>> Has this been considered?
> 
> I was also suggesting this (maybe with too many words ;)).  If
> it's a doloop target add such IV (candidate!) which has zero
> use-cost for the increment and compare but a (target configurable)
> penalty for other uses.  Invasiveness of this approach is probably
> that you need to distinguish this candidate by making it a new
> kind (or maybe we can just have a specia candidate number...).
> 

Hi Richard,

Really appreciate your comments on this, very sorry not to go with this.
Since this patch is for TARGET_HAVE_COUNT_REG_DECR_P, I was thinking
it's fairly enough to reuse the existing IV cands and just zeroing doloop
use cost with them.  I'm very happy to unify it.  If you/Segher/Bin don't
have any concerns, I'd like to make it as one follow up item.

One thing to double check is this dedicated IV will follow decrement
instead of increment align with doloop optimize?  Then it looks to shape
the loop closing to doloop pattern, at least it's decrement.


Thanks,
Kewen

Reply via email to