[PATCH] D22892: Codegen: MachineBlockPlacement Improve probability layout.

David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 28 13:18:17 PDT 2016


davidxl accepted this revision.
davidxl added a comment.
This revision is now accepted and ready to land.

lgtm with the test change suggestion.


================
Comment at: test/CodeGen/X86/block-placement.ll:1334
@@ +1333,3 @@
+define void @test_forked_hot_diamond_gets_cold(i32* %a) {
+; Test that a hot-branch with probability > 80% followed by a 50/50 branch
+; will place the cold predecessor if the probability for the fallthrough
----------------
I think we probably don't need to test the exact boundary condition here to make the test more robust (say when hotprob is tuned).  I suggest making the branch at then1 block to have (60%, 40%) branch prob distribution to make the case more obvious (such that the backward branch prob of edge then2->fork1 is around 70%.


https://reviews.llvm.org/D22892





More information about the llvm-commits mailing list