[llvm] [LoopUnroll] Use branch probability in multi-exit loop unrolling (PR #164799)
    Marek Sedláček via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Oct 23 08:43:12 PDT 2025
    
    
  
mark-sed wrote:
> High level comment - why is fixing BPIs stability here not an option? 
@mtrofin  I suppose it is an option, but a one that would take way more time (from my previous attempts downstream at using BPI). LoopUnrolling is happening cyclically and has a bunch of subcalls to other unrolling methods. Also runtime unrolling does not have access to BPI in the current state and has to be extracted and passed in from multiple parts.
In my downstream POC implementation I thought all was good when using BPI, but the incorrect state of BPI has shown itself after like a week with a random crash in BPI map lookup, so using BPI would require more thorough testing and checks and the change itself would be way bigger than the current one.
The current approach cannot really cause such crashes.
https://github.com/llvm/llvm-project/pull/164799
    
    
More information about the llvm-commits
mailing list