[llvm] [LICM] Relax Hoistable Branch if all of the incoming node are hoistable (PR #225599)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 00:17:25 PDT 2026


aokblast wrote:

> All the control flow hoisting support in LICM is basically dead code. I'd rather delete it than invest time in it.

Ah, okay. I was looking into possible optimizations in LICM and found that this seemed like an easy TODO. However, it still took me two days to fully understand control-flow hoisting and its caveats.

I have to say, the control-flow hoisting code here is really fragile, so I can understand why you think it should be deleted or removed. But do you still have the same opinion that it is essentially dead code? From what I found, it does actually enable an optimization (at least from valid LLVM IR).


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


More information about the llvm-commits mailing list