[llvm] r255530 - Remove the successor probabilities normalization in tail duplication pass.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 14 16:50:42 PST 2015


On Tue, Dec 15, 2015 at 6:11 AM, Cong Hou via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: conghou
> Date: Mon Dec 14 13:11:54 2015
> New Revision: 255530
>
> URL: http://llvm.org/viewvc/llvm-project?rev=255530&view=rev
> Log:
> Remove the successor probabilities normalization in tail duplication pass.
>
> The normalization may cause assertion failures on SystemZ and some
> out-of-tree
> tests.


Sounds like you have test coverage - please commit such a test to go with
this change.


> The root cause is that unknown probabilities are materialized into known
> ones by calling getSuccProbability(), which is then used to add another
> successor to the same MBB which results in mixed known and unknown
> probabilities. But currently those mixed probabilities cannot be
> normalized.
>
> I will compose another patch to fix the root issue.
>
>
>
> Modified:
>     llvm/trunk/lib/CodeGen/TailDuplication.cpp
>
> Modified: llvm/trunk/lib/CodeGen/TailDuplication.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TailDuplication.cpp?rev=255530&r1=255529&r2=255530&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/TailDuplication.cpp (original)
> +++ llvm/trunk/lib/CodeGen/TailDuplication.cpp Mon Dec 14 13:11:54 2015
> @@ -751,7 +751,6 @@ TailDuplicatePass::duplicateSimpleBB(Mac
>      assert(NumSuccessors <= 1);
>      if (NumSuccessors == 0 || *PredBB->succ_begin() != NewTarget)
>        PredBB->addSuccessor(NewTarget, Prob);
> -    PredBB->normalizeSuccProbs();
>
>      TDBBs.push_back(PredBB);
>    }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151215/40e1e6e5/attachment.html>


More information about the llvm-commits mailing list