+++ title = "Branch Prediction for Scheduling" date = "2022-05-11" author = "Yann Herklotz" tags = [] categories = [] backlinks = ["2b1d1", "1c2g"] forwardlinks = ["1c2f", "1c8", "2b1d1", "1c2h1"] zettelid = "1c2h" +++ Trace scheduling ([\#1c2f]) especially needs some heuristics to get the best performance out of your code. The best heuristics will be from profiling the binary, however, there are also some good static indicators for which branch is most likely to be taken. The following heuristics are taken from \[1\]. This is also tied to how if-conversion ([\#1c8], [\#2b1d1]) should handle these heuristics.
\[1\] T. Ball and J. R. Larus, “Branch prediction for free,” in *Proceedings of the ACM SIGPLAN 1993 conference on programming language design and implementation*, in PLDI ’93. New York, NY, USA: Association for Computing Machinery, 1993, pp. 300–313. doi: [10.1145/155090.155119].
[\#1c2f]: /zettel/1c2f [\#1c8]: /zettel/1c8 [\#2b1d1]: /zettel/2b1d1 [10.1145/155090.155119]: https://doi.org/10.1145/155090.155119