aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorKyle Butt <kyle+llvm@iteratee.net>2016-07-29 18:09:28 +0000
committerKyle Butt <kyle+llvm@iteratee.net>2016-07-29 18:09:28 +0000
commit02d8d054abaa2b754d3f3de5b899edc853522db6 (patch)
tree21520a8a93fcb7a995751cafe0985420e8e0a0c2 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parentaf324f76ad4ede1416d8b8103bce35a980edf60b (diff)
downloadllvm-02d8d054abaa2b754d3f3de5b899edc853522db6.zip
llvm-02d8d054abaa2b754d3f3de5b899edc853522db6.tar.gz
llvm-02d8d054abaa2b754d3f3de5b899edc853522db6.tar.bz2
Codegen: MachineBlockPlacement Improve probability layout.
The following pattern was being layed out poorly: A / \ B C / \ / \ D E ? (Doesn't matter) Where A->B is far more likely than A->C, and prob(B->D) = prob(B->E) The current algorithm gives: A,B,C,E (D goes on worklist) It does this even if C has a frequency count of 0. This patch adjusts the layout calculation so that if freq(B->E) >> freq(C->E) then we go ahead and layout E rather than C. Fallthrough half the time is better than fallthrough never, or fallthrough very rarely. The resulting layout is: A,B,E, (C and D are in a worklist) llvm-svn: 277187
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
0 files changed, 0 insertions, 0 deletions