[PATCH] D10979: Update the branch weight metadata in JumpThreading pass.

Cong Hou congh at google.com
Fri Jul 17 11:32:12 PDT 2015


On Fri, Jul 17, 2015 at 11:23 AM, David <davidxl at google.com> wrote:
> davidxl added inline comments.
>
> ================
> Comment at: lib/Transforms/Scalar/JumpThreading.cpp:1543
> @@ +1542,3 @@
> +  BlockFrequency PredBBFreq(0);
> +  if (HasProfileData)
> +    for (auto Pred : Preds)
> ----------------
> Can be skipped when Preds' s size == 1
>
> ================
> Comment at: lib/Transforms/Scalar/JumpThreading.cpp:1551
> @@ +1550,3 @@
> +  // frequencies of Preds.
> +  if (HasProfileData)
> +    BFI->setBlockFreq(PredBB, PredBBFreq.getFrequency());
> ----------------
> Can be skipped if Preds's size is 1

SplitBlockPredecessors() will create a new block so I think here we
still need to set the block freq for this new block.

>
>
> http://reviews.llvm.org/D10979
>
>
>



More information about the llvm-commits mailing list