[llvm-dev] LoopVectorize - determine the bounds of the original loop

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] LoopVectorize - determine the bounds of the original loop

Matthias Braun via llvm-dev
   Hello.
     Is there an easy way to obtain in the LoopVectorize module the upper and lower bounds
of the loop being vectorized - I wasn't really able to find in the original code of
LoopVectorize code calculating these bounds, although I know this module quite well and I
am wondering if maybe they are already computed. (I put a similar question at
http://lists.llvm.org/pipermail/llvm-dev/2016-August/103988.html ) .

     I have to admit I don't know well the ScalarEvolution class but I think I can also
use ScalarEvolution's getUnsignedRangeMax() and getUnsignedRangeMin(), but these are newer
methods added to ScalarEvolution in the last months and I normally work on an older LLVM
trunk.

     Any help would be appreciated.

   Thank you,
     Alex
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] LoopVectorize - determine the bounds of the original loop

Matthias Braun via llvm-dev
Hi Alex,

Did you take a look at ScalarEvolution::getBackedgeTakenCount() ?

-- Sanjoy

On Wed, Aug 16, 2017 at 6:27 AM, Alex Susu via llvm-dev
<[hidden email]> wrote:

>   Hello.
>     Is there an easy way to obtain in the LoopVectorize module the upper and
> lower bounds of the loop being vectorized - I wasn't really able to find in
> the original code of LoopVectorize code calculating these bounds, although I
> know this module quite well and I am wondering if maybe they are already
> computed. (I put a similar question at
> http://lists.llvm.org/pipermail/llvm-dev/2016-August/103988.html ) .
>
>     I have to admit I don't know well the ScalarEvolution class but I think
> I can also use ScalarEvolution's getUnsignedRangeMax() and
> getUnsignedRangeMin(), but these are newer methods added to ScalarEvolution
> in the last months and I normally work on an older LLVM trunk.
>
>     Any help would be appreciated.
>
>   Thank you,
>     Alex
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev