[PATCH] D26037: Add LoopSink pass for PGO.

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 10:11:04 PDT 2016


On Fri, Oct 28, 2016 at 9:40 AM, Dehao Chen <danielcdh at gmail.com> wrote:

> danielcdh added a comment.
>
> We need this pass to remove LCSSA nodes because this will be the last loop
> pass.
>
> Another question is: shall we pin this pass to PGO only? If not, we can
> simply add it to lib/Transforms/IPO/PassManagerBuilder.cpp
>

Static branch prediction is conservative in predicting loop iterations
(loop scale). This means it is likely some blocks (if wrapped under
__builtin_expect) inside the loop will be wrongly marked as colder than
preheader  which can trigger loop sinking wrongly.   Making this pass
depending on PGO is a safer thing to do.

David


>
> https://reviews.llvm.org/D26037
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161028/6ef0a4db/attachment.html>


More information about the llvm-commits mailing list