forked from OSchip/llvm-project
bb1d976feb
As we start defining more complex Ops, we increasingly see the need for Ops-with-regions to be able to construct Ops within their regions in their ::build methods. However, these methods only have access to Builder, and not OpBuilder. Creating a local instance of OpBuilder inside ::build and using it fails to trigger the operation creation hooks in derived builders (e.g., ConversionPatternRewriter). In this case, we risk breaking the logic of the derived builder. At the same time, OpBuilder::create, which is by far the largest user of ::build already passes "this" as the first argument, so an OpBuilder instance is already available. Update all ::build methods in all Ops in MLIR and Flang to take "OpBuilder &" instead of "Builder *". Note the change from pointer and to reference to comply with the common style in MLIR, this also ensures all other users must change their ::build methods. Differential Revision: https://reviews.llvm.org/D78713 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
LinalgToSPIRV.cpp | ||
LinalgToSPIRVPass.cpp |