[llvm] [EarlyCSE] Compare GEP instructions based on offset (PR #65875)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 17 03:34:07 PDT 2023


nikic wrote:

Okay, those results look reasonable. It's somewhat unfortunate that this requires duplicating a bunch of code for the separate GEP handling. I'm wondering, would we be able to achieve similar results if we add a `DenseMap<GetElementPtrInst *, APInt>` cache for the offset but otherwise keep the previous code structure? Or would the extra hash lookup make this slow again?

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


More information about the llvm-commits mailing list