This is an archive of the discontinued LLVM Phabricator instance.

[MBP] Comments cleanup /NFC
ClosedPublic

Authored by SjoerdMeijer on Jul 14 2016, 9:07 AM.

Diff Detail

Event Timeline

SjoerdMeijer retitled this revision from to [MBP] Comments cleanup /NFC.
SjoerdMeijer updated this object.
SjoerdMeijer added a subscriber: llvm-commits.
davidxl added inline comments.Jul 14 2016, 11:01 PM
lib/CodeGen/MachineBlockPlacement.cpp
616

yes, it should be freq(BB->Succ) which is the same as freq(S->BB)

620

This paragraph can be changed to:

if we have profile data (i.e, branch probabilities can be trusted), the cost (number of taken branches) with layout S->BB->Succ->Pred is 2 * freq(S->Pred) while the cost of topo order is freq(S->Pred) + freq(S->BB). We know Prob(S->BB) > Prob(S->Pred), so freq(S->BB) > freq(S->Pred), which means the cost of topological order is greater ...

Thanks for reviewing David. I have addressed your comments.

davidxl accepted this revision.Jul 15 2016, 9:12 AM
davidxl edited edge metadata.

lgtm

This revision is now accepted and ready to land.Jul 15 2016, 9:12 AM
This revision was automatically updated to reflect the committed changes.