Files
llvm-project/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
Marek Sedláček 362c39d36d [LoopUnroll] Use branch probability in multi-exit loop unrolling (#164799)
This patch improves multi-exit loop unrolling by taking into account
branch probability and not only other exit being deopting one.

This implementation uses branch metadata directly because of unstable
state of BPI in this part of code (runtime unrolling invalidates the
state of the map and using BPI in my tests has caused errors).
If branch probability metadata are not present then the current deopt
heuristic is still used.

---------

Co-authored-by: Marek Sedlacek <msedlacek@azul.com>
2026-01-28 11:12:34 -05:00

50 KiB