Juneyoung Lee via llvm-dev
2019-Mar-07 11:15 UTC
[llvm-dev] Printing the analysis result of lazy value info
Hello all, How can I see the result of lazy value info analysis? I ran a command `opt -lazy-value-info -correlated-propagation -print-lazy-value-info example.ll -disable-output` with a following program as the input: ``` define i32 @f(i32 %a, i32 %b) { %i = icmp eq i32 %a, 10 br i1 %i, label %A, label %B A: %c = add i32 %a, 20 ret i32 %c B: ret i32 0 } ``` However, it shows a following line only: ``` LVI for function 'f': ``` Thank you :) Juneyoung Lee -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190307/b3826be3/attachment.html>
John Regehr via llvm-dev
2019-Mar-07 15:25 UTC
[llvm-dev] Printing the analysis result of lazy value info
Juneyoung, I don't know if this meets your requirements but I have a silly little pass that I use to see what the LVI, SCEV, demanded bits, and known bits analyses think about a module: https://github.com/regehr/llvm-transformation-pass/blob/master/hello/hello.cpp John On 3/7/19 4:15 AM, Juneyoung Lee via llvm-dev wrote:> Hello all, > > How can I see the result of lazy value info analysis? > > I ran a command `opt -lazy-value-info -correlated-propagation > -print-lazy-value-info example.ll -disable-output` with a following > program as the input: > > ``` > define i32 @f(i32 %a, i32 %b) { > %i = icmp eq i32 %a, 10 > br i1 %i, label %A, label %B > A: > %c = add i32 %a, 20 > ret i32 %c > B: > ret i32 0 > } > ``` > > However, it shows a following line only: > > ``` > LVI for function 'f': > ``` > > Thank you :) > Juneyoung Lee > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >
Philip Reames via llvm-dev
2019-Mar-11 17:18 UTC
[llvm-dev] Printing the analysis result of lazy value info
I'd have expected the command you ran to work. I'm guessing there's some bug that's crept in. If you want to spend some time tracking it down, I'd be happy to review a patch. Philip On 3/7/19 3:15 AM, Juneyoung Lee via llvm-dev wrote:> Hello all, > > How can I see the result of lazy value info analysis? > > I ran a command `opt -lazy-value-info -correlated-propagation > -print-lazy-value-info example.ll -disable-output` with a following > program as the input: > > ``` > define i32 @f(i32 %a, i32 %b) { > %i = icmp eq i32 %a, 10 > br i1 %i, label %A, label %B > A: > %c = add i32 %a, 20 > ret i32 %c > B: > ret i32 0 > } > ``` > > However, it shows a following line only: > > ``` > LVI for function 'f': > ``` > > Thank you :) > Juneyoung Lee > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://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/20190311/61948bc8/attachment.html>
Juneyoung Lee via llvm-dev
2019-Mar-11 18:16 UTC
[llvm-dev] Printing the analysis result of lazy value info
Hello all, I just read mails.>https://github.com/regehr/llvm-transformation-pass/blob/master/hello/hello.cpp Thank you for the program, I'll try it.> If you want to spend some time tracking it down, I'd be happy to review apatch. Yep, I'll track it down and make a patch. Juneyoung Lee On Tue, Mar 12, 2019 at 2:18 AM Philip Reames <listmail at philipreames.com> wrote:> I'd have expected the command you ran to work. I'm guessing there's some > bug that's crept in. > > If you want to spend some time tracking it down, I'd be happy to review a > patch. > > Philip > On 3/7/19 3:15 AM, Juneyoung Lee via llvm-dev wrote: > > Hello all, > > How can I see the result of lazy value info analysis? > > I ran a command `opt -lazy-value-info -correlated-propagation > -print-lazy-value-info example.ll -disable-output` with a following program > as the input: > > ``` > define i32 @f(i32 %a, i32 %b) { > %i = icmp eq i32 %a, 10 > br i1 %i, label %A, label %B > A: > %c = add i32 %a, 20 > ret i32 %c > B: > ret i32 0 > } > ``` > > However, it shows a following line only: > > ``` > LVI for function 'f': > ``` > > Thank you :) > Juneyoung Lee > > > _______________________________________________ > LLVM Developers mailing listllvm-dev at lists.llvm.orghttps://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-- Juneyoung Lee Software Foundation Lab, Seoul National University -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190312/eb5d2612/attachment-0001.html>