[llvm-bugs] [Bug 25482] Debug info not maintained in AutoFDO
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Nov 12 15:45:30 PST 2015
https://llvm.org/bugs/show_bug.cgi?id=25482
Dehao Chen <danielcdh at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #6 from Dehao Chen <danielcdh at gmail.com> ---
The inline stack is still not maintained correctly in this bug. Here is how to
reproduce:
#bin/clang++ -c -fprofile-sample-use=c.txt -O2 -save-temps -v c.cc
#bin/opt -sample-profile -sample-profile-file=c.txt c.bc -S|bin/opt -analyze
-branch-prob
Printing analysis 'Branch Probability Analysis' for function '_Z3foov':
---- Branch Probabilities ----
edge entry -> if.then.i probability is 0x50000000 / 0x80000000 = 62.50%
edge entry -> if.else.i probability is 0x30000000 / 0x80000000 = 37.50%
edge if.then.i -> _ZL3barv.exit probability is 0x80000000 / 0x80000000 =
100.00% [HOT edge]
edge if.else.i -> _ZL3barv.exit probability is 0x80000000 / 0x80000000 =
100.00% [HOT edge]
Printing analysis 'Branch Probability Analysis' for function '_ZL3barv':
---- Branch Probabilities ----
edge entry -> if.then probability is 0x50000000 / 0x80000000 = 62.50%
edge entry -> if.else probability is 0x30000000 / 0x80000000 = 37.50%
edge if.then -> if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT
edge]
edge if.else -> if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT
edge]
#bin/clang++ -c -fprofile-sample-use=c.txt -O2 -save-temps -v c.cc -g
#bin/opt -sample-profile -sample-profile-file=c.txt c.bc -S|bin/opt -analyze
-branch-prob
Printing analysis 'Branch Probability Analysis' for function '_Z3foov':
---- Branch Probabilities ----
edge entry -> if.then.i probability is 0x00000000 / 0x80000000 = 0.00%
edge entry -> if.else.i probability is 0x80000000 / 0x80000000 = 100.00% [HOT
edge]
edge if.then.i -> _ZL3barv.exit probability is 0x80000000 / 0x80000000 =
100.00% [HOT edge]
edge if.else.i -> _ZL3barv.exit probability is 0x80000000 / 0x80000000 =
100.00% [HOT edge]
Printing analysis 'Branch Probability Analysis' for function '_ZL3barv':
---- Branch Probabilities ----
edge entry -> if.then probability is 0x50000000 / 0x80000000 = 62.50%
edge entry -> if.else probability is 0x30000000 / 0x80000000 = 37.50%
edge if.then -> if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT
edge]
edge if.else -> if.end probability is 0x80000000 / 0x80000000 = 100.00% [HOT
edge]
With and without "-g", branch-probability gives different branch probability
estimation for _Z3foov.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151112/7d951ebf/attachment-0001.html>
More information about the llvm-bugs
mailing list