GPUOpen-Drivers / llvm-dialects

LLVM Dialects Library
Apache License 2.0
22 stars 22 forks source link

Add functionality to re-create op with new variadic argument list. #101

Closed tsymalla closed 3 months ago

tsymalla commented 3 months ago

Since we cannot update varargs directly, and often need to re-create the op, add a small helper that re-creates a given op with a new variadic argument list and invalidates the current op.

tsymalla-AMD commented 3 months ago

Not using the create<> method of the dialects builder here, since we cannot directly derive the correct types for the passed arguments (we not always pass in a Value *). I thought about adding a IPGuard in the new method, but maybe that's something the caller should handle.