[llvm-dev] PHI nodes and connected ICMp

Anastasiya Ruzhanskaya via llvm-dev
Sun, 13 Aug 2017 12:55:42 -0000

To continue this topic:
sometimes SCEV's behavior is rather controversial : for loops with i
changing as i \=2 for example, he can't figure what the type of expressions
is, but surprisingly can determine max trip count. Shouldn't it be able to
detect or not detect  these parameters at the same time?

2017-08-11 15:56 GMT+02:00 Anastasiya Ruzhanskaya <
anastasiya.ruzhanskaya at frtk.ru>:

> Sorry,  I just saw this enumeration with SCEV types - all operations
> should be possible then...
>
> 2017-08-11 15:55 GMT+02:00 Anastasiya Ruzhanskaya <
> anastasiya.ruzhanskaya at frtk.ru>:
>
>> Thank you for your answer! I tested your example, yes, perhaps I should
>> preserve some kind of tree to parse this start and end expressions for
>> induction variable... I was surprised, that SCEV cannot compute the
>> tripcount here. I thought, that all linear and maybe expressions with
>> multiplication are suitable for analysis.
>>
>> 2017-08-10 19:30 GMT+02:00 Sanjoy Das <sanjoy at google.com>:
>>
>>> Hi Anastasiya,
>>>
>>> If you're looking for the exit value of a PHI node, please take
a look
>>> at what IndVarSimplify does here:
>>> https://github.com/llvm-mirror/llvm/blob/master/lib/Transfor
>>> ms/Scalar/IndVarSimplify.cpp#L516
>>>
>>> On Thu, Aug 10, 2017 at 12:55 AM, Anastasiya Ruzhanskaya
>>> <anastasiya.ruzhanskaya at frtk.ru> wrote:
>>> > By only two cases I mean , that in exiting block when
computing the
>>> > condition related to PHI node I can expect only icmp on one of
incoming
>>> > values or on phi node itself... I tried to come up with some
more
>>> complex
>>> > examples but I always receive only these two cases, that is
why I am
>>> asking.
>>>
>>> So you could have cases like this: https://godbolt.org/g/j4zcWy
>>>
>>> -- Sanjoy
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20170813/8323a859/attachment.html>