[PATCH] D15489: Use getEdgeProbability() instead of getEdgeWeight() in BFI and remove getEdgeWeight() interfaces from MBPI.
Cong Hou via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 14 17:16:17 PST 2015
congh added inline comments.
================
Comment at: test/Analysis/BlockFrequencyInfo/bad_input.ll:13
@@ -14,1 +12,3 @@
+; Check that we get 1 and a huge frequency instead of 0,3.
+; CHECK-NEXT: for.body: float = 2147483647.8,
for.body:
----------------
davidxl wrote:
> I know FE does that (0->1) when creating MD_prof metadata. Where in BFI that does similar thing?
>
>
It is done in BlockFrequencyInfoImplBase::addToDist():
bool BlockFrequencyInfoImplBase::addToDist(Distribution &Dist,
const LoopData *OuterLoop,
const BlockNode &Pred,
const BlockNode &Succ,
uint64_t Weight) {
if (!Weight)
Weight = 1;
auto isLoopHeader = [&OuterLoop](const BlockNode &Node) {
return OuterLoop && OuterLoop->isHeader(Node);
};
...
http://reviews.llvm.org/D15489
More information about the llvm-commits
mailing list