[llvm] EarlyCSE: refactor getOrCreateResult (NFC) (PR #113339)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 04:54:34 PST 2024


artagnon wrote:

> The idea here is reasonable, but I don't think you can create a bitcast in getOrCreateResult(). This function may be called in cases where we will not actually use the result, such as
> 
> https://github.com/llvm/llvm-project/blob/c04719379e898a0159ac41999ea48c8e89b35160/llvm/lib/Transforms/Scalar/EarlyCSE.cpp#L1716
> . In this case we will be leaving behind a dead bitcast.

Makes sense. I do think that the refactoring of getOrCreateResult is a good change, so I've made this patch an NFC doing that.

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


More information about the llvm-commits mailing list