hameeza ahmed via llvm-dev
2019-Jan-15 21:41 UTC
[llvm-dev] Issues with using scalar evolution with newer versions of LLVM IR
Hello, I am trying to use scalar evolution pass using following command; opt -analyze -mem2reg -indvars -loop-simplify -scalar-evolution < vec.bc when vec.bc is generated using newer version of LLVM i.e LLVM 6 and 7 i get following message in the end; Determining loop execution counts for: @main Loop %8: Unpredictable backedge-taken count. Loop %8: Unpredictable max backedge-taken count. Loop %8: Unpredictable predicated backedge-taken count. which means it is unable to compute iteration count. However, when .bc file is generated using LLVM 4.0 i am getting following; Determining loop execution counts for: @main Loop %4: backedge-taken count is 512 Loop %4: max backedge-taken count is 512 Loop %4: Predicated backedge-taken count is 512 Predicates: Loop %4: Trip multiple is 513 means correct computation of loop count... Why is that happening with newer version of LLVM? Please help. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190116/031299ba/attachment.html>
Sanjoy Das via llvm-dev
2019-Jan-16 01:48 UTC
[llvm-dev] Issues with using scalar evolution with newer versions of LLVM IR
It is hard to tell what's going on from the information you have provided. How are you generating vec.bc? This could either be a regression in scalar evolution or a change in some optimization pass that is resulting in a different vec.bc. -- Sanjoy On Tue, Jan 15, 2019 at 1:42 PM hameeza ahmed via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > Hello, > > I am trying to use scalar evolution pass using following command; > > opt -analyze -mem2reg -indvars -loop-simplify -scalar-evolution < vec.bc > when vec.bc is generated using newer version of LLVM i.e LLVM 6 and 7 i get following message in the end; > Determining loop execution counts for: @main > Loop %8: Unpredictable backedge-taken count. > Loop %8: Unpredictable max backedge-taken count. > Loop %8: Unpredictable predicated backedge-taken count. > which means it is unable to compute iteration count. > > However, when .bc file is generated using LLVM 4.0 i am getting following; > > Determining loop execution counts for: @main > Loop %4: backedge-taken count is 512 > Loop %4: max backedge-taken count is 512 > Loop %4: Predicated backedge-taken count is 512 > Predicates: > > Loop %4: Trip multiple is 513 > > means correct computation of loop count... > Why is that happening with newer version of LLVM? > > Please help. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
hameeza ahmed via llvm-dev
2019-Jan-16 04:14 UTC
[llvm-dev] Issues with using scalar evolution with newer versions of LLVM IR
Thank You.. I used following command to generate .bc or .ll /Documents/clang+llvm-4.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang -O0 -emit-llvm -S -o vec4.ll vecsum.c /Documents/clang+llvm-7.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/clang -O0 -emit-llvm -S -o vec7.ll vecsum.c On Wed, Jan 16, 2019 at 6:49 AM Sanjoy Das <sanjoy at playingwithpointers.com> wrote:> It is hard to tell what's going on from the information you have > provided. How are you generating vec.bc? This could either be a > regression in scalar evolution or a change in some optimization pass > that is resulting in a different vec.bc. > > -- Sanjoy > > On Tue, Jan 15, 2019 at 1:42 PM hameeza ahmed via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > > > Hello, > > > > I am trying to use scalar evolution pass using following command; > > > > opt -analyze -mem2reg -indvars -loop-simplify -scalar-evolution < vec.bc > > when vec.bc is generated using newer version of LLVM i.e LLVM 6 and 7 i > get following message in the end; > > Determining loop execution counts for: @main > > Loop %8: Unpredictable backedge-taken count. > > Loop %8: Unpredictable max backedge-taken count. > > Loop %8: Unpredictable predicated backedge-taken count. > > which means it is unable to compute iteration count. > > > > However, when .bc file is generated using LLVM 4.0 i am getting > following; > > > > Determining loop execution counts for: @main > > Loop %4: backedge-taken count is 512 > > Loop %4: max backedge-taken count is 512 > > Loop %4: Predicated backedge-taken count is 512 > > Predicates: > > > > Loop %4: Trip multiple is 513 > > > > means correct computation of loop count... > > Why is that happening with newer version of LLVM? > > > > Please help. > > _______________________________________________ > > LLVM Developers mailing list > > llvm-dev at lists.llvm.org > > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190116/4e26486e/attachment-0001.html>