Home
last modified time | relevance | path

Searched refs:funcOp (Results 1 – 25 of 27) sorted by relevance

12

/external/llvm-project/mlir/lib/Transforms/
DNormalizeMemRefs.cpp34 void normalizeFuncOpMemRefs(FuncOp funcOp, ModuleOp moduleOp);
35 bool areMemRefsNormalizable(FuncOp funcOp);
36 void updateFunctionSignature(FuncOp funcOp, ModuleOp moduleOp);
37 void setCalleesAndCallersNonNormalizable(FuncOp funcOp, ModuleOp moduleOp,
39 Operation *createOpResultsNormalized(FuncOp funcOp, Operation *oldOp);
58 moduleOp.walk([&](FuncOp funcOp) { normalizableFuncs.insert(funcOp); }); in runOnOperation() argument
66 moduleOp.walk([&](FuncOp funcOp) { in runOnOperation() argument
67 if (normalizableFuncs.contains(funcOp)) { in runOnOperation()
68 if (!areMemRefsNormalizable(funcOp)) { in runOnOperation()
70 << "@" << funcOp.getName() in runOnOperation()
[all …]
/external/llvm-project/mlir/lib/Dialect/SPIRV/Transforms/
DLowerABIAttributesPass.cpp27 createGlobalVarForEntryPointArgument(OpBuilder &builder, spirv::FuncOp funcOp, in createGlobalVarForEntryPointArgument() argument
30 auto spirvModule = funcOp->getParentOfType<spirv::ModuleOp>(); in createGlobalVarForEntryPointArgument()
35 builder.setInsertionPoint(funcOp.getOperation()); in createGlobalVarForEntryPointArgument()
37 funcOp.getName().str() + "_arg_" + std::to_string(argIndex); in createGlobalVarForEntryPointArgument()
42 auto varType = funcOp.getType().getInput(argIndex); in createGlobalVarForEntryPointArgument()
64 funcOp.getLoc(), varType, varName, abiInfo.getDescriptorSet(), in createGlobalVarForEntryPointArgument()
71 getInterfaceVariables(spirv::FuncOp funcOp, in getInterfaceVariables() argument
73 auto module = funcOp->getParentOfType<spirv::ModuleOp>(); in getInterfaceVariables()
82 funcOp.walk([&](spirv::AddressOfOp addressOfOp) { in getInterfaceVariables()
101 cast<spirv::GlobalVariableOp>(var).sym_name(), funcOp.getContext())); in getInterfaceVariables()
[all …]
/external/llvm-project/mlir/lib/Conversion/GPUToSPIRV/
DConvertGPUToSPIRV.cpp68 matchAndRewrite(gpu::GPUFuncOp funcOp, ArrayRef<Value> operands,
166 lowerAsEntryFunction(gpu::GPUFuncOp funcOp, SPIRVTypeConverter &typeConverter, in lowerAsEntryFunction() argument
170 auto fnType = funcOp.getType(); in lowerAsEntryFunction()
172 funcOp.emitError("SPIR-V lowering only supports entry functions" in lowerAsEntryFunction()
177 funcOp.emitError( in lowerAsEntryFunction()
187 for (auto argType : enumerate(funcOp.getType().getInputs())) { in lowerAsEntryFunction()
193 funcOp.getLoc(), funcOp.getName(), in lowerAsEntryFunction()
196 for (const auto &namedAttr : funcOp.getAttrs()) { in lowerAsEntryFunction()
203 rewriter.inlineRegionBefore(funcOp.getBody(), newFuncOp.getBody(), in lowerAsEntryFunction()
208 rewriter.eraseOp(funcOp); in lowerAsEntryFunction()
[all …]
/external/llvm-project/mlir/test/lib/Transforms/
DTestLinalgTransforms.cpp85 static void applyPatterns(FuncOp funcOp) { in applyPatterns() argument
86 MLIRContext *ctx = funcOp.getContext(); in applyPatterns()
211 applyPatternsAndFoldGreedily(funcOp, std::move(patterns)); in applyPatterns()
214 funcOp.walk([](LinalgOp op) { in applyPatterns()
220 FuncOp funcOp, StringRef startMarker, in fillL1TilingAndMatmulToVectorPatterns() argument
222 MLIRContext *ctx = funcOp.getContext(); in fillL1TilingAndMatmulToVectorPatterns()
434 applyMatmulToVectorPatterns(FuncOp funcOp, in applyMatmulToVectorPatterns() argument
437 MLIRContext *ctx = funcOp.getContext(); in applyMatmulToVectorPatterns()
440 fillL1TilingAndMatmulToVectorPatterns(funcOp, Identifier::get("START", ctx), in applyMatmulToVectorPatterns()
450 fillL1TilingAndMatmulToVectorPatterns(funcOp, Identifier::get("L2", ctx), in applyMatmulToVectorPatterns()
[all …]
DTestLinalgFusionTransforms.cpp110 static void applyFusionPatterns(MLIRContext *context, FuncOp funcOp) { in applyFusionPatterns() argument
114 LinalgDependenceGraph::buildDependenceGraph(alias, funcOp); in applyFusionPatterns()
116 applyPatternsAndFoldGreedily(funcOp, std::move(fusionPatterns)); in applyFusionPatterns()
219 FuncOp funcOp = getOperation(); in runOnFunction() local
220 auto &blocks = funcOp.getBody().getBlocks(); in runOnFunction()
228 OpBuilder builder(funcOp.getContext()); in runOnFunction()
DTestAffineLoopParametricTiling.cpp36 if (FuncOp funcOp = dyn_cast<FuncOp>(topLoop->getParentOp())) in checkIfTilingParametersExist() local
37 assert(funcOp.getNumArguments() >= band.size() && "Too few tile sizes"); in checkIfTilingParametersExist()
/external/llvm-project/mlir/include/mlir/IR/
DFunctionSupport.h453 auto funcOp = cast<ConcreteType>(this->getOperation()); in verifyBody() local
455 if (funcOp.isExternal()) in verifyBody()
458 unsigned numArguments = funcOp.getNumArguments(); in verifyBody()
459 if (funcOp.front().getNumArguments() != numArguments) in verifyBody()
460 return funcOp.emitOpError("entry block must have ") in verifyBody()
469 auto funcOp = cast<ConcreteType>(op); in verifyTrait() local
471 if (!funcOp.isTypeAttrValid()) in verifyTrait()
472 return funcOp.emitOpError("requires a type attribute '") in verifyTrait()
475 if (failed(funcOp.verifyType())) in verifyTrait()
478 for (unsigned i = 0, e = funcOp.getNumArguments(); i != e; ++i) { in verifyTrait()
[all …]
/external/llvm-project/mlir/lib/Conversion/GPUCommon/
DOpToFuncCallLowering.h65 LLVMFuncOp funcOp = appendOrGetFuncOp(funcName, funcType, op); in matchAndRewrite() local
67 op->getLoc(), resultType, rewriter.getSymbolRefAttr(funcOp), in matchAndRewrite()
116 Operation *funcOp = SymbolTable::lookupNearestSymbolFrom(op, funcName); in appendOrGetFuncOp() local
117 if (funcOp) in appendOrGetFuncOp()
118 return cast<LLVMFuncOp>(*funcOp); in appendOrGetFuncOp()
/external/llvm-project/mlir/lib/Dialect/SPIRV/
DSPIRVLowering.cpp468 matchAndRewrite(FuncOp funcOp, ArrayRef<Value> operands,
474 FuncOpConversion::matchAndRewrite(FuncOp funcOp, ArrayRef<Value> operands, in matchAndRewrite() argument
476 auto fnType = funcOp.getType(); in matchAndRewrite()
482 for (auto argType : enumerate(funcOp.getType().getInputs())) { in matchAndRewrite()
491 funcOp.getLoc(), funcOp.getName(), in matchAndRewrite()
496 for (const auto &namedAttr : funcOp.getAttrs()) { in matchAndRewrite()
502 rewriter.inlineRegionBefore(funcOp.getBody(), newFuncOp.getBody(), in matchAndRewrite()
507 rewriter.eraseOp(funcOp); in matchAndRewrite()
651 mlir::spirv::setABIAttrs(spirv::FuncOp funcOp, in setABIAttrs() argument
657 funcOp.setArgAttr(argIndex, argABIAttrName, argABIInfo[argIndex]); in setABIAttrs()
[all …]
DSPIRVOps.cpp1850 auto funcOp = in verify() local
1853 if (!funcOp) { in verify()
1858 auto functionType = funcOp.getType(); in verify()
2526 auto funcOp = table.lookup<spirv::FuncOp>(entryPointOp.fn()); in verify() local
2527 if (!funcOp) { in verify()
2551 funcOp, entryPointOp.execution_model()); in verify()
2557 } else if (auto funcOp = dyn_cast<spirv::FuncOp>(op)) { in verify() local
2558 if (funcOp.isExternal()) in verify()
2562 for (auto &block : funcOp) in verify()
/external/llvm-project/mlir/test/Dialect/SPIRV/Linking/ModuleCombiner/
Dconflict_resolution.mlir77 // Test properly updating references to a renamed funcOp.
117 // Test properly updating references to a renamed funcOp if the functionCallOp
118 // preceeds the callee funcOp definition.
159 // funcOp.
235 // Resolve conflicting funcOp and globalVariableOp.
260 // Resolve conflicting funcOp and globalVariableOp and update the global variable's
297 // Resolve conflicting globalVariableOp and funcOp and update the global variable's
334 // Resolve conflicting funcOp and specConstantOp.
359 // Resolve conflicting funcOp and specConstantOp and update the spec constant's
394 // Resolve conflicting specConstantOp and funcOp and update the spec constant's
[all …]
/external/llvm-project/mlir/lib/Dialect/GPU/Transforms/
DAllReduceLowering.cpp31 : funcOp(funcOp_), reduceOp(reduceOp_), rewriter(rewriter_), in GpuAllReduceRewriter()
159 return funcOp.addWorkgroupAttribution(bufferType); in createWorkgroupBuffer()
368 gpu::GPUFuncOp funcOp; member
386 auto funcOp = cast<gpu::GPUFuncOp>(op); in matchAndRewrite() local
388 GpuAllReduceRewriter(funcOp, reduceOp, rewriter).rewrite(); in matchAndRewrite()
393 while (funcOp.walk(callback).wasInterrupted()) { in matchAndRewrite()
DKernelOutlining.cpp203 auto funcOp = outlineKernelFuncImpl(launchOp, kernelFnName, operandSet); in outlineKernelFunc() local
208 return funcOp; in outlineKernelFunc()
/external/llvm-project/mlir/test/lib/IR/
DTestSlicing.cpp60 for (auto funcOp : funcOps) { in runOnOperation() local
63 funcOp.walk([&](Operation *op) { in runOnOperation()
/external/llvm-project/mlir/lib/Conversion/LinalgToStandard/
DLinalgToStandard.cpp74 FuncOp funcOp = in getLibraryCallSymbolRef() local
79 funcOp.setAttr("llvm.emit_c_interface", UnitAttr::get(op->getContext())); in getLibraryCallSymbolRef()
80 funcOp.setPrivate(); in getLibraryCallSymbolRef()
/external/llvm-project/mlir/lib/Conversion/SPIRVToLLVM/
DConvertLaunchFuncToLLVMCalls.cpp125 auto funcOp = module.lookupSymbol<spirv::FuncOp>(funcName); in encodeKernelName() local
127 if (failed(SymbolTable::replaceAllSymbolUses(funcOp, newFuncName, module))) in encodeKernelName()
129 SymbolTable::setSymbolName(funcOp, newFuncName); in encodeKernelName()
DConvertSPIRVToLLVM.cpp1282 matchAndRewrite(spirv::FuncOp funcOp, ArrayRef<Value> operands, in matchAndRewrite() argument
1287 auto funcType = funcOp.getType(); in matchAndRewrite()
1291 funcOp.getType(), /*isVariadic=*/false, signatureConverter); in matchAndRewrite()
1296 Location loc = funcOp.getLoc(); in matchAndRewrite()
1297 StringRef name = funcOp.getName(); in matchAndRewrite()
1301 MLIRContext *context = funcOp.getContext(); in matchAndRewrite()
1302 switch (funcOp.function_control()) { in matchAndRewrite()
1325 rewriter.inlineRegionBefore(funcOp.getBody(), newFuncOp.getBody(), in matchAndRewrite()
1331 rewriter.eraseOp(funcOp); in matchAndRewrite()
/external/llvm-project/mlir/lib/Dialect/Linalg/Transforms/
DTiling.cpp591 FuncOp funcOp, in applyTilingToLoopPatterns() argument
595 MLIRContext *ctx = funcOp.getContext(); in applyTilingToLoopPatterns()
598 applyPatternsAndFoldGreedily(funcOp, std::move(patterns)); in applyTilingToLoopPatterns()
599 applyPatternsAndFoldGreedily(funcOp, in applyTilingToLoopPatterns()
602 funcOp.walk([](LinalgOp op) { in applyTilingToLoopPatterns()
DDropUnitDims.cpp511 FuncOp funcOp = getFunction(); in runOnFunction() local
512 MLIRContext *context = funcOp.getContext(); in runOnFunction()
518 applyPatternsAndFoldGreedily(funcOp.getBody(), std::move(patterns)); in runOnFunction()
DLoops.cpp573 static void lowerLinalgToLoopsImpl(FuncOp funcOp, MLIRContext *context) { in lowerLinalgToLoopsImpl() argument
580 applyPatternsAndFoldGreedily(funcOp, std::move(patterns)); in lowerLinalgToLoopsImpl()
/external/llvm-project/mlir/lib/Conversion/StandardToLLVM/
DStandardToLLVM.cpp1232 FuncOp funcOp, LLVM::LLVMFuncOp newFuncOp) { in wrapForExternalCallers() argument
1233 auto type = funcOp.getType(); in wrapForExternalCallers()
1235 filterFuncAttributes(funcOp.getAttrs(), /*filterArgAttrs=*/false, attributes); in wrapForExternalCallers()
1237 loc, llvm::formatv("_mlir_ciface_{0}", funcOp.getName()).str(), in wrapForExternalCallers()
1273 FuncOp funcOp, LLVM::LLVMFuncOp newFuncOp) { in wrapExternalFunction() argument
1277 typeConverter.convertFunctionTypeCWrapper(funcOp.getType()); in wrapExternalFunction()
1284 filterFuncAttributes(funcOp.getAttrs(), /*filterArgAttrs=*/false, attributes); in wrapExternalFunction()
1288 loc, llvm::formatv("_mlir_ciface_{0}", funcOp.getName()).str(), in wrapExternalFunction()
1294 FunctionType type = funcOp.getType(); in wrapExternalFunction()
1348 convertFuncOpToLLVMFuncOp(FuncOp funcOp, in convertFuncOpToLLVMFuncOp()
[all …]
/external/llvm-project/mlir/lib/Dialect/SPIRV/Linking/ModuleCombiner/
DModuleCombiner.cpp251 if (auto funcOp = dyn_cast<FuncOp>(op)) in combine() local
252 for (auto &blk : funcOp) in combine()
/external/llvm-project/flang/lib/Lower/
DIntrinsicCall.cpp866 auto funcOp = getRuntimeFunction(loc, builder, name, soughtFuncType); in getRuntimeCallGenerator() local
867 if (!funcOp) { in getRuntimeCallGenerator()
874 mlir::FunctionType actualFuncType = funcOp.getType(); in getRuntimeCallGenerator()
879 return [funcOp, actualFuncType, soughtFuncType]( in getRuntimeCallGenerator()
886 auto call = builder.create<mlir::CallOp>(loc, funcOp, convertedArguments); in getRuntimeCallGenerator()
899 mlir::FuncOp funcOp; in getUnrestrictedIntrinsicSymbolRefAttr() local
902 funcOp = std::visit( in getUnrestrictedIntrinsicSymbolRefAttr()
908 if (!funcOp) { in getUnrestrictedIntrinsicSymbolRefAttr()
919 funcOp = getWrapper(rtCallGenerator, name, signature, loadRefArguments); in getUnrestrictedIntrinsicSymbolRefAttr()
922 return builder.getSymbolRefAttr(funcOp.getName()); in getUnrestrictedIntrinsicSymbolRefAttr()
/external/llvm-project/mlir/include/mlir/Dialect/SPIRV/
DSPIRVLowering.h132 LogicalResult setABIAttrs(spirv::FuncOp funcOp,
/external/llvm-project/mlir/lib/Transforms/Utils/
DDialectConversion.cpp2510 matchAndRewrite(FuncOp funcOp, ArrayRef<Value> operands, in matchAndRewrite()
2512 FunctionType type = funcOp.getType(); in matchAndRewrite()
2519 failed(rewriter.convertRegionTypes(&funcOp.getBody(), *typeConverter, in matchAndRewrite()
2524 rewriter.updateRootInPlace(funcOp, [&] { in matchAndRewrite()
2525 funcOp.setType(FunctionType::get(result.getConvertedTypes(), newResults, in matchAndRewrite()
2526 funcOp.getContext())); in matchAndRewrite()

12