[llvm] [CFG] Avoid introducing complex phi when removing empty blocks (PR #104887)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 00:59:41 PDT 2024


https://github.com/nikic commented:

The general direction of the change makes sense to me.

I'm slightly worried that this may cause regressions for switch transforms, where it may be normal to have very large phis.

A possible alternative heuristic would not look at the number of entries in one phi, but the total number of entries across all phis in the successor, so that we would limit less for one phi and more for a large number of phis. But hard to say in abstract whether that's better...

https://github.com/llvm/llvm-project/pull/104887


More information about the llvm-commits mailing list