[PATCH] D17864: [PGO] Promote indirect calls to conditional direct calls with value-profile

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 13:25:09 PDT 2016


We intentionally drop this +1 in IR level PGO instrumentation. I thing
branch weight can handle 0 weight now.

Thanks,

-Rong

On Thu, Apr 7, 2016 at 11:05 AM, Johan Engelen <
j.b.c.engelen at alumnus.utwente.nl> wrote:

> johanengelen added a comment.
>
> (thanks for your work on this btw! ;)
>
>
> ================
> Comment at: test/Transforms/PGOProfile/icp_vararg.ll:33
> @@ +32,2 @@
> +!1 = !{!"VP", i32 0, i64 12345, i64 989055279648259519, i64 12345}
> +; ICALL-PROM: [[BRANCH_WEIGHT]] = !{!"branch_weights", i32 12345, i32 0}
> ----------------
> I think the branch_weights are calculated slightly wrong.
> branch_weights usually have an offset of 1, where 1 means there is no
> profile measurement that it was taken. See the documentation of
> scaleBranchWeight in CodeGenPGO.cpp of Clang.
>
>
> http://reviews.llvm.org/D17864
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160407/b2e97f54/attachment.html>


More information about the llvm-commits mailing list