[llvm] [SimplifyCFG] Avoid increasing too many phi entries when removing empty blocks (PR #104887)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 20 00:50:47 PDT 2024


nikic wrote:

> Hi @nikic, @dtcxzyw, @XChy, I have updated the heuristic so that it will look at the increase of the number phi entries to determine whether removing a block or not. But this change has one issue that if there are many empty blocks in the IR and removing any of them will not increase the number of phi entries greatly but removing all of them will have a large increase in the total phi entries. For this case, currently heuristic will remove all of them.

Does this patch still cover your original motivating case, or is the new version not sufficient due to this problem?

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


More information about the llvm-commits mailing list