The core of what I’m trying to do is a “raising” pass that will generate regions out of an operation’s block list and the basic blocks them selfs. To do so I intended to modify an operation in place using the class methods provided. However, I was unable to find a way to insert regions into an operation through such methods.
I’ve seen the MutableArrayRef
of regions that can be retrieved with getRegions()
, but this does not seem to serve the purpose of inserting new regions into an operation. The only way I’ve found to do this is by allocating a new operation while passing the existing information of the current operation into the constructor and also setting the number of regions to the desired amount. Only then I would be able to modify these regions with the MutableArrayRef<Region>
object.
It’s likely that I’ve overlooked something, but I haven’t found another method.
Is there any easier way to do this?