Use mlir::OpState::operator->() to get to methods of mlir::Operation.
This is a preparation step to remove those methods from OpState. PiperOrigin-RevId: 348761530 Change-Id: Ifd7dabd1c4853be635a63e2d105ba21d7afdafa4
This commit is contained in:
parent
9ec36dbb10
commit
6a16dff9a1
@ -207,7 +207,7 @@ struct RewriteKernelSignaturePass
|
||||
: RewriteKernelSignaturePassBase<RewriteKernelSignaturePass> {
|
||||
void runOnFunction() override {
|
||||
mlir::FuncOp func = getFunction();
|
||||
mlir::ModuleOp module = func.getParentOfType<mlir::ModuleOp>();
|
||||
mlir::ModuleOp module = func->getParentOfType<mlir::ModuleOp>();
|
||||
getFunction().walk([&](mlir::gpu::LaunchFuncOp launchOp) {
|
||||
mlir::gpu::GPUFuncOp kernel =
|
||||
module.lookupSymbol<mlir::gpu::GPUFuncOp>(launchOp.kernel());
|
||||
@ -250,7 +250,7 @@ struct RewriteKernelSignaturePass
|
||||
// Create a new kernel function with modified signature. It will have the
|
||||
// parameters and result types of the original funcion as its parameter
|
||||
// type and otherwise will be void.
|
||||
auto gpu_module = kernel.getParentOfType<mlir::gpu::GPUModuleOp>();
|
||||
auto gpu_module = kernel->getParentOfType<mlir::gpu::GPUModuleOp>();
|
||||
mlir::OpBuilder kernel_builder(gpu_module.body());
|
||||
auto operand_types = llvm::to_vector<4>(llvm::concat<const mlir::Type>(
|
||||
func.getType().getInputs(), func.getType().getResults()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user