[Mlir-commits] [mlir] [MLIR][LLVM] Have LLVM::AddressOfOp implement ConstantLike (PR #90481)

Johannes de Fine Licht llvmlistbot at llvm.org
Mon Apr 29 13:39:42 PDT 2024


definelicht wrote:

> I think this change is valid but I am not sure of what it adds when CSE would already do this I assume. Out of curiosity, what is your use case?

It moves them to the entry block and deduplicates them there like other constants, and it allows folding through operations that support it (such as the select test case), and specifically for us it lets us model operations that we can copy during outlining rather than pass by value -- a case where constants are distinct from regular pure values!

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


More information about the Mlir-commits mailing list