[PATCH] D13218: Mark BB as annotated if its weight is > 0

Dehao Chen via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 07:09:36 PDT 2015


danielcdh added a comment.

computeBlockWeights assigns weights to basic blocks that has profile data and mark them as annotated. But after this step, there will still be basic blocks that are not annotated. So the propagation step works on 3 things:

- set edge weights and mark it as annotated
- set basic block weights for those unannotated basic blocks and mark them as annotated
- adjust basic block weights for those annotated basic blocks which has apparently incorrect weights

Equivalence class is not the place to set the annotated flag, it just sets the equivalence class for each basic block. In later propagation algorithm, instead of checking "IsAnnotated(BB)", we should check "IsAnnotated(BB->equivalence_class)".

Dehao


http://reviews.llvm.org/D13218





More information about the llvm-commits mailing list