| /llvm-project-15.0.7/mlir/lib/Dialect/Bufferization/Transforms/ |
| H A D | DropEquivalentBufferResults.cpp | 54 static func::FuncOp getCalledFunction(CallOpInterface callOp) { in getCalledFunction() argument 59 SymbolTable::lookupNearestSymbolFrom(callOp, sym)); in getCalledFunction() 104 module.walk([&](func::CallOp callOp) { in dropEquivalentBufferResults() argument 105 if (getCalledFunction(callOp) != funcOp) in dropEquivalentBufferResults() 108 rewriter.setInsertionPoint(callOp); in dropEquivalentBufferResults() 110 callOp.operands()); in dropEquivalentBufferResults() 113 for (int64_t i = 0; i < callOp.getNumResults(); ++i) { in dropEquivalentBufferResults() 121 Value replacement = callOp.getOperand(resultToArgs[i]); in dropEquivalentBufferResults() 122 Type expectedType = callOp.getResult(i).getType(); in dropEquivalentBufferResults() 126 callOp.getLoc(), expectedType, replacement); in dropEquivalentBufferResults() [all …]
|
| H A D | FuncBufferizableOpInterfaceImpl.cpp | 149 func::CallOp callOp = cast<func::CallOp>(op); in bufferizesToMemoryRead() local 150 FuncOp funcOp = getCalledFunction(callOp); in bufferizesToMemoryRead() 164 func::CallOp callOp = cast<func::CallOp>(op); in bufferizesToMemoryWrite() local 165 FuncOp funcOp = getCalledFunction(callOp); in bufferizesToMemoryWrite() 179 func::CallOp callOp = cast<func::CallOp>(op); in getAliasingOpResult() local 180 FuncOp funcOp = getCalledFunction(callOp); in getAliasingOpResult() 206 func::CallOp callOp = cast<func::CallOp>(op); in getAliasingOpOperand() local 207 FuncOp funcOp = getCalledFunction(callOp); in getAliasingOpOperand() 232 FuncOp funcOp = getCalledFunction(callOp); in bufferRelation() 264 FuncOp funcOp = getCalledFunction(callOp); in bufferize() [all …]
|
| H A D | OneShotModuleBufferize.cpp | 235 static func::FuncOp getCalledFunction(CallOpInterface callOp) { in getCalledFunction() argument 240 SymbolTable::lookupNearestSymbolFrom(callOp, sym)); in getCalledFunction() 251 funcOp->walk([&](func::CallOp callOp) { in equivalenceAnalysis() argument 252 func::FuncOp calledFunction = getCalledFunction(callOp); in equivalenceAnalysis() 262 if (!state.isInPlace(callOp->getOpOperand(bbargIdx))) in equivalenceAnalysis() 264 Value returnVal = callOp.getResult(returnIdx); in equivalenceAnalysis() 265 Value argVal = callOp->getOperand(bbargIdx); in equivalenceAnalysis() 299 if (!isa<func::CallOp>(callOp.getOperation())) in getFuncOpsOrderedByCalls() 300 return callOp->emitError() << "expected a CallOp"; in getFuncOpsOrderedByCalls() 301 func::FuncOp calledFunction = getCalledFunction(callOp); in getFuncOpsOrderedByCalls() [all …]
|
| /llvm-project-15.0.7/mlir/lib/Conversion/FuncToSPIRV/ |
| H A D | FuncToSPIRV.cpp | 66 matchAndRewrite(func::CallOp callOp, OpAdaptor adaptor, in matchAndRewrite() argument 69 if (callOp.getNumResults() > 1) in matchAndRewrite() 71 if (callOp.getNumResults() == 1) { in matchAndRewrite() 73 getTypeConverter()->convertType(callOp.getResult(0).getType()); in matchAndRewrite() 77 callOp, resultType, adaptor.getOperands(), callOp->getAttrs()); in matchAndRewrite() 80 callOp, TypeRange(), adaptor.getOperands(), callOp->getAttrs()); in matchAndRewrite()
|
| /llvm-project-15.0.7/flang/lib/Optimizer/Transforms/ |
| H A D | AbstractResult.cpp | 65 matchAndRewrite(fir::CallOp callOp, in matchAndRewrite() argument 67 auto loc = callOp.getLoc(); in matchAndRewrite() 68 auto result = callOp->getResult(0); in matchAndRewrite() 90 if (callOp.getCallee()) { in matchAndRewrite() 92 newOperands.append(callOp.getOperands().begin(), in matchAndRewrite() 93 callOp.getOperands().end()); in matchAndRewrite() 99 for (auto operand : callOp.getOperands().drop_front()) in matchAndRewrite() 108 newOperands.append(callOp.getOperands().begin() + 1, in matchAndRewrite() 109 callOp.getOperands().end()); in matchAndRewrite() 113 callOp->dropAllReferences(); in matchAndRewrite() [all …]
|
| /llvm-project-15.0.7/flang/unittests/Optimizer/Builder/Runtime/ |
| H A D | RuntimeCallTestBase.h | 89 auto callOp = mlir::dyn_cast<fir::CallOp>(*op); variable 90 EXPECT_TRUE(callOp.getCallee().has_value()); 91 mlir::SymbolRefAttr callee = *callOp.getCallee(); 96 EXPECT_EQ(nbArgs, callOp.getArgs().size()); 137 if (auto callOp = mlir::dyn_cast<fir::CallOp>(op)) { in checkBlockForCallOp() local 138 if (fctName == callOp.getCallee()->getRootReference().getValue()) { in checkBlockForCallOp() 139 EXPECT_EQ(nbArgs, callOp.getArgs().size()); in checkBlockForCallOp()
|
| H A D | NumericTest.cpp | 59 auto callOp = mlir::dyn_cast<fir::CallOp>(nearest.getDefiningOp()); in testGenNearest() local 60 mlir::Value select = callOp.getOperands()[1]; in testGenNearest()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/GPUToVulkan/ |
| H A D | ConvertLaunchFuncToVulkanCalls.cpp | 105 bool isVulkanLaunchCallOp(LLVM::CallOp callOp) { in isVulkanLaunchCallOp() argument 106 return (callOp.getCallee() && *callOp.getCallee() == kVulkanLaunch && in isVulkanLaunchCallOp() 107 callOp.getNumOperands() >= kVulkanLaunchNumConfigOperands); in isVulkanLaunchCallOp() 112 bool isCInterfaceVulkanLaunchCallOp(LLVM::CallOp callOp) { in isCInterfaceVulkanLaunchCallOp() argument 113 return (callOp.getCallee() && in isCInterfaceVulkanLaunchCallOp() 114 *callOp.getCallee() == kCInterfaceVulkanLaunch && in isCInterfaceVulkanLaunchCallOp() 115 callOp.getNumOperands() >= kVulkanLaunchNumConfigOperands); in isCInterfaceVulkanLaunchCallOp()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/MemRef/Transforms/ |
| H A D | NormalizeMemRefs.cpp | 132 funcOp.walk([&](func::CallOp callOp) { in setCalleesAndCallersNonNormalizable() argument 133 StringAttr callee = callOp.getCalleeAttr().getAttr(); in setCalleesAndCallersNonNormalizable() 168 .walk([&](func::CallOp callOp) -> WalkResult { in areMemRefsNormalizable() argument 170 llvm::seq<unsigned>(0, callOp.getNumResults())) { in areMemRefsNormalizable() 171 Value oldMemRef = callOp.getResult(resIndex); in areMemRefsNormalizable() 256 auto callOp = dyn_cast<func::CallOp>(userOp); in updateFunctionSignature() local 257 if (!callOp) in updateFunctionSignature() 260 builder.create<func::CallOp>(userOp->getLoc(), callOp.getCalleeAttr(), in updateFunctionSignature()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/Func/Transforms/ |
| H A D | FuncConversions.cpp | 24 matchAndRewrite(CallOp callOp, OpAdaptor adaptor, in matchAndRewrite() 28 if (failed(typeConverter->convertTypes(callOp.getResultTypes(), in matchAndRewrite() 35 callOp, callOp.getCallee(), convertedResults, adaptor.getOperands()); in matchAndRewrite()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/FuncToLLVM/ |
| H A D | FuncToLLVM.cpp | 495 matchAndRewrite(CallOpType callOp, typename CallOpType::Adaptor adaptor, in matchAndRewrite() 499 unsigned numResults = callOp.getNumResults(); in matchAndRewrite() 500 auto resultTypes = llvm::to_vector<4>(callOp.getResultTypes()); in matchAndRewrite() 509 callOp.getLoc(), /*opOperands=*/callOp->getOperands(), in matchAndRewrite() 512 callOp.getLoc(), packedResult ? TypeRange(packedResult) : TypeRange(), in matchAndRewrite() 513 promoted, callOp->getAttrs()); in matchAndRewrite() 525 this->typeConverter->convertType(callOp.getResult(i).getType()); in matchAndRewrite() 527 callOp.getLoc(), type, newOp->getResult(0), in matchAndRewrite() 538 rewriter, callOp.getLoc(), resultTypes, results); in matchAndRewrite() 539 } else if (failed(this->copyUnrankedDescriptors(rewriter, callOp.getLoc(), in matchAndRewrite() [all …]
|
| /llvm-project-15.0.7/mlir/lib/Conversion/GPUCommon/ |
| H A D | OpToFuncCallLowering.h | 63 auto callOp = rewriter.create<LLVM::CallOp>( in matchAndRewrite() local 67 rewriter.replaceOp(op, {callOp.getResult(0)}); in matchAndRewrite() 73 callOp.getResult(0)); in matchAndRewrite()
|
| /llvm-project-15.0.7/flang/lib/Optimizer/CodeGen/ |
| H A D | TargetRewrite.cpp | 190 void convertCallOp(A callOp) { in convertCallOp() argument 191 auto fnTy = callOp.getFunctionType(); in convertCallOp() 192 auto loc = callOp.getLoc(); in convertCallOp() 193 rewriter->setInsertionPoint(callOp); in convertCallOp() 202 if (!callOp.getCallee()) { in convertCallOp() 204 newOpers.push_back(callOp.getOperand(0)); in convertCallOp() 239 sret = callOp.getCallee() && in convertCallOp() 278 if (callOp.getCallee()) { in convertCallOp() 286 *callOp.getCallee()); in convertCallOp() 320 if (callOp.getCallee()) { in convertCallOp() [all …]
|
| /llvm-project-15.0.7/mlir/lib/Target/Cpp/ |
| H A D | TranslateToCpp.cpp | 315 static LogicalResult printOperation(CppEmitter &emitter, func::CallOp callOp) { in printOperation() argument 316 if (failed(emitter.emitAssignPrefix(*callOp.getOperation()))) in printOperation() 320 os << callOp.getCallee() << "("; in printOperation() 321 if (failed(emitter.emitOperands(*callOp.getOperation()))) in printOperation() 327 static LogicalResult printOperation(CppEmitter &emitter, emitc::CallOp callOp) { in printOperation() argument 329 Operation &op = *callOp.getOperation(); in printOperation() 333 os << callOp.getCallee(); in printOperation() 355 if (callOp.getTemplateArgs()) { in printOperation() 358 interleaveCommaWithError(*callOp.getTemplateArgs(), os, emitArgs))) in printOperation() 366 callOp.getArgs() in printOperation() [all …]
|
| /llvm-project-15.0.7/llvm/lib/Target/M68k/ |
| H A D | M68kInstrControl.td | 258 multiclass CallPat<MxCall callOp, Predicate pred> { 260 def : Pat<(MxCall (i32 tglobaladdr:$dst)), (callOp tglobaladdr:$dst)>; 261 def : Pat<(MxCall (i32 texternalsym:$dst)), (callOp texternalsym:$dst)>; 262 def : Pat<(MxCall (i32 imm:$dst)), (callOp imm:$dst)>;
|
| /llvm-project-15.0.7/mlir/include/mlir/Dialect/SCF/Utils/ |
| H A D | Utils.h | 87 StringRef funcName, func::CallOp *callOp = nullptr);
|
| /llvm-project-15.0.7/mlir/lib/Transforms/ |
| H A D | Inliner.cpp | 94 void dropCallUses(CallGraphNode *userNode, Operation *callOp, CallGraph &cg); 167 void CGUseList::dropCallUses(CallGraphNode *userNode, Operation *callOp, in dropCallUses() argument 178 walkReferencedSymbolNodes(callOp, cg, symbolTable, resolvedRefs, walkFn); in dropCallUses()
|
| /llvm-project-15.0.7/mlir/lib/Conversion/SPIRVToLLVM/ |
| H A D | SPIRVToLLVM.cpp | 810 matchAndRewrite(spirv::FunctionCallOp callOp, OpAdaptor adaptor, in matchAndRewrite() argument 812 if (callOp.getNumResults() == 0) { in matchAndRewrite() 814 callOp, llvm::None, adaptor.getOperands(), callOp->getAttrs()); in matchAndRewrite() 819 auto dstType = typeConverter.convertType(callOp.getType(0)); in matchAndRewrite() 821 callOp, dstType, adaptor.getOperands(), callOp->getAttrs()); in matchAndRewrite()
|
| /llvm-project-15.0.7/mlir/lib/Dialect/SCF/Utils/ |
| H A D | Utils.cpp | 143 func::CallOp *callOp) { in outlineSingleBlockRegion() argument 209 if (callOp) in outlineSingleBlockRegion() 210 *callOp = call; in outlineSingleBlockRegion()
|