[mlir] Split Dialect::addOperations into two functions
authorRiver Riddle <riddleriver@gmail.com>
Thu, 1 Oct 2020 00:23:11 +0000 (17:23 -0700)
committerRiver Riddle <riddleriver@gmail.com>
Thu, 1 Oct 2020 01:03:14 +0000 (18:03 -0700)
commitf0505534900bb1fcdee368136cd733aefd20ce39
tree18d0845dc48e07b6cd83dfaf1bd654dae71d9c88
parent4fb679d3b159f0a5e4ff87f4e7ecf44fbbf331b9
[mlir] Split Dialect::addOperations into two functions

The current implementation uses a fold expression to add all of the operations at once. This is really nice, but apparently the lifetime of each of the AbstractOperation instances is for the entire expression which may lead to a stack overflow for large numbers of operations. This splits the method in two to allow for the lifetime of the AbstractOperation to be properly scoped.
mlir/include/mlir/IR/Dialect.h