forked from OSchip/llvm-project
Replace use of OperationState with builder::create in GPU Kernel Outlining (NFC)
OperationState is a low level API that is rarely indicated, the builder API convenient wrapper is preferred when possible.
This commit is contained in:
parent
e8e6817d00
commit
e1364f1068
|
@ -283,10 +283,8 @@ private:
|
|||
// and then this needs to use the OpBuilder.
|
||||
auto context = getOperation().getContext();
|
||||
OpBuilder builder(context);
|
||||
OperationState state(kernelFunc.getLoc(),
|
||||
gpu::GPUModuleOp::getOperationName());
|
||||
gpu::GPUModuleOp::build(builder, state, kernelFunc.getName());
|
||||
auto kernelModule = cast<gpu::GPUModuleOp>(Operation::create(state));
|
||||
auto kernelModule = builder.create<gpu::GPUModuleOp>(kernelFunc.getLoc(),
|
||||
kernelFunc.getName());
|
||||
SymbolTable symbolTable(kernelModule);
|
||||
symbolTable.insert(kernelFunc);
|
||||
|
||||
|
|
Loading…
Reference in New Issue