[Mlir-commits] [llvm] [mlir] [OMPIRBuilder][OpenMP][LLVM] Modify and use ReplaceConstant utility in convertTarget (PR #94541)

Nikita Popov llvmlistbot at llvm.org
Wed Jun 12 12:10:11 PDT 2024


nikic wrote:

> The one possible downside to this replacement is that the constant -> instruction rewriting is no longer constrained to within the kernel, it will expand the available uses of an input argument that is constant and has constant uses in the module. This hasn't lowered the correctness of the examples I have tested with (so far at least, it has only increased correctness e.g. test added in this PR), however, it may impact performance, a possibility in the future may be to optionally constrain rewrites of uses of constants in convertUsersOfConstantsToInstructions to a provided llvm::Function.

I'd feel more comfortable with this if it did not change other functions. It seems like supporting this in convertUsersOfConstantsToInstructions would just be one extra check when creating the InstructionWorklist, so maybe just go ahead and do it now?

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


More information about the Mlir-commits mailing list