[llvm] [SimplifyCFG] Avoid introducing complex phi when removing empty blocks (PR #104887)
    Nikita Popov via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Aug 29 06:13:08 PDT 2024
    
    
  
nikic wrote:
> In term of the heuristic, looking at the total number of entries across all Phis in the successor also makes sense to me. But I'm considering how to determine the threshold in that case. Should the threshold be the same regardless of the number of Phis in the successor? Or the threshold should be linear to the number of Phis in the Successor?
If I'm understanding correctly, what we really want to prevent is a quadratic increase in phi entries, as we may be adding up to `#phis * #preds` new entries. So I think that is the quantity we should be limiting with a fixed limit (though it should be higher than 100 in that case -- would a limit of 1000 work?)
https://github.com/llvm/llvm-project/pull/104887
    
    
More information about the llvm-commits
mailing list