Home
last modified time | relevance | path

Searched refs:ifOp (Results 1 – 24 of 24) sorted by relevance

/external/llvm-project/mlir/lib/Dialect/Affine/Utils/
DUtils.cpp28 static void promoteIfBlock(AffineIfOp ifOp, bool elseBlock) { in promoteIfBlock() argument
30 assert(ifOp.hasElse() && "else block expected"); in promoteIfBlock()
32 Block *destBlock = ifOp->getBlock(); in promoteIfBlock()
33 Block *srcBlock = elseBlock ? ifOp.getElseBlock() : ifOp.getThenBlock(); in promoteIfBlock()
35 Block::iterator(ifOp), srcBlock->getOperations(), srcBlock->begin(), in promoteIfBlock()
37 ifOp.erase(); in promoteIfBlock()
44 static Operation *getOutermostInvariantForOp(AffineIfOp ifOp) { in getOutermostInvariantForOp() argument
46 auto ifOperands = ifOp.getOperands(); in getOutermostInvariantForOp()
47 auto *res = ifOp.getOperation(); in getOutermostInvariantForOp()
70 static AffineIfOp hoistAffineIfOp(AffineIfOp ifOp, Operation *hoistOverOp) { in hoistAffineIfOp() argument
[all …]
/external/llvm-project/mlir/lib/Dialect/SCF/Transforms/
DUtils.cpp80 void mlir::outlineIfOp(OpBuilder &b, scf::IfOp ifOp, FuncOp *thenFn, in outlineIfOp() argument
83 Location loc = ifOp.getLoc(); in outlineIfOp()
84 MLIRContext *ctx = ifOp.getContext(); in outlineIfOp()
92 b.setInsertionPoint(ifOp->getParentOfType<FuncOp>()); in outlineIfOp()
99 FunctionType::get(values.getTypes(), ifOp.getResultTypes(), ctx); in outlineIfOp()
121 if (thenFn && !ifOp.thenRegion().empty()) in outlineIfOp()
122 *thenFn = outline(ifOp.thenRegion(), thenFnName); in outlineIfOp()
123 if (elseFn && !ifOp.elseRegion().empty()) in outlineIfOp()
124 *elseFn = outline(ifOp.elseRegion(), elseFnName); in outlineIfOp()
DLoopSpecialization.cpp57 auto ifOp = b.create<scf::IfOp>(op.getLoc(), cond, /*withElseRegion=*/true); in specializeParallelLoopForUnrolling() local
58 ifOp.getThenBodyBuilder().clone(*op.getOperation(), map); in specializeParallelLoopForUnrolling()
59 ifOp.getElseBodyBuilder().clone(*op.getOperation()); in specializeParallelLoopForUnrolling()
86 auto ifOp = b.create<scf::IfOp>(op.getLoc(), cond, /*withElseRegion=*/true); in specializeForLoopForUnrolling() local
87 ifOp.getThenBodyBuilder().clone(*op.getOperation(), map); in specializeForLoopForUnrolling()
88 ifOp.getElseBodyBuilder().clone(*op.getOperation()); in specializeForLoopForUnrolling()
/external/llvm-project/mlir/lib/Dialect/SCF/EDSC/
DBuilders.cpp99 scf::IfOp *ifOp) { in conditionBuilder() argument
106 if (ifOp) in conditionBuilder()
107 *ifOp = newOp; in conditionBuilder()
123 scf::IfOp *ifOp) { in conditionBuilder() argument
132 if (ifOp) in conditionBuilder()
133 *ifOp = newOp; in conditionBuilder()
/external/llvm-project/mlir/lib/Conversion/SCFToSPIRV/
DSCFToSPIRV.cpp72 matchAndRewrite(scf::IfOp ifOp, ArrayRef<Value> operands,
208 IfOpConversion::matchAndRewrite(scf::IfOp ifOp, ArrayRef<Value> operands, in matchAndRewrite() argument
214 auto loc = ifOp.getLoc(); in matchAndRewrite()
229 auto &thenRegion = ifOp.thenRegion(); in matchAndRewrite()
238 if (!ifOp.elseRegion().empty()) { in matchAndRewrite()
239 auto &elseRegion = ifOp.elseRegion(); in matchAndRewrite()
253 for (auto result : ifOp.results()) { in matchAndRewrite()
257 replaceSCFOutputValue(ifOp, selectionOp, typeConverter, rewriter, in matchAndRewrite()
/external/llvm-project/mlir/lib/Conversion/SCFToStandard/
DSCFToStandard.cpp193 LogicalResult matchAndRewrite(IfOp ifOp,
348 LogicalResult IfLowering::matchAndRewrite(IfOp ifOp, in matchAndRewrite() argument
350 auto loc = ifOp.getLoc(); in matchAndRewrite()
359 if (ifOp.getNumResults() == 0) { in matchAndRewrite()
363 rewriter.createBlock(remainingOpsBlock, ifOp.getResultTypes()); in matchAndRewrite()
369 auto &thenRegion = ifOp.thenRegion(); in matchAndRewrite()
382 auto &elseRegion = ifOp.elseRegion(); in matchAndRewrite()
394 rewriter.create<CondBranchOp>(loc, ifOp.condition(), thenBlock, in matchAndRewrite()
399 rewriter.replaceOp(ifOp, continueBlock->getArguments()); in matchAndRewrite()
/external/llvm-project/mlir/test/lib/Transforms/
DTestSCFUtils.cpp62 func.walk([&](scf::IfOp ifOp) { in runOnFunction() argument
65 OpBuilder b(ifOp); in runOnFunction()
66 outlineIfOp(b, ifOp, &thenFn, std::string("outlined_then") + strCount, in runOnFunction()
/external/llvm-project/mlir/include/mlir/Dialect/SCF/EDSC/
DBuilders.h48 scf::IfOp *ifOp = nullptr);
51 scf::IfOp *ifOp = nullptr);
/external/llvm-project/mlir/lib/Dialect/Affine/Transforms/
DAffineLoopInvariantCodeMotion.cpp176 auto ifOp = cast<AffineIfOp>(op); in checkInvarianceOfNestedIfOps() local
178 if (!areAllOpsInTheBlockListInvariant(ifOp.thenRegion(), indVar, definedOps, in checkInvarianceOfNestedIfOps()
183 if (!areAllOpsInTheBlockListInvariant(ifOp.elseRegion(), indVar, definedOps, in checkInvarianceOfNestedIfOps()
/external/llvm-project/mlir/include/mlir/Dialect/SCF/
DUtils.h58 void outlineIfOp(OpBuilder &b, scf::IfOp ifOp, FuncOp *thenFn,
/external/llvm-project/mlir/include/mlir/Dialect/Affine/
DUtils.h37 LogicalResult hoistAffineIfOp(AffineIfOp ifOp, bool *folded = nullptr);
/external/llvm-project/mlir/lib/Conversion/AffineToStandard/
DAffineToStandard.cpp434 auto ifOp = rewriter.create<scf::IfOp>(loc, cond, hasElseRegion); in matchAndRewrite() local
435 rewriter.inlineRegionBefore(op.thenRegion(), &ifOp.thenRegion().back()); in matchAndRewrite()
436 rewriter.eraseBlock(&ifOp.thenRegion().back()); in matchAndRewrite()
438 rewriter.inlineRegionBefore(op.elseRegion(), &ifOp.elseRegion().back()); in matchAndRewrite()
439 rewriter.eraseBlock(&ifOp.elseRegion().back()); in matchAndRewrite()
/external/llvm-project/mlir/lib/Dialect/Linalg/Transforms/
DSparsification.cpp884 llvm::BitVector &conditions, scf::IfOp &ifOp) { in genIf() argument
886 if (ifOp) in genIf()
887 rewriter.setInsertionPointToStart(&ifOp.elseRegion().front()); in genIf()
904 ifOp = rewriter.create<scf::IfOp>(loc, cond, /*else*/ true); in genIf()
905 rewriter.setInsertionPointToStart(&ifOp.thenRegion().front()); in genIf()
968 scf::IfOp ifOp; in genStmt() local
978 genIf(merger, codegen, rewriter, op, idx, latj.bits, ifOp); in genStmt()
/external/llvm-project/mlir/lib/Conversion/SCFToGPU/
DSCFToGPU.cpp497 scf::IfOp ifOp = rewriter.create<scf::IfOp>(loc, pred, false); in processParallelLoop() local
498 rewriter.setInsertionPointToStart(&ifOp.thenRegion().front()); in processParallelLoop()
/external/llvm-project/mlir/include/mlir/Dialect/Vector/
DVectorTransforms.h201 scf::IfOp *ifOp = nullptr);
/external/llvm-project/mlir/lib/Conversion/ShapeToStandard/
DShapeToStandard.cpp128 auto ifOp = b.create<IfOp>( in matchAndRewrite() local
153 b.create<mlir::YieldOp>(loc, ifOp.getResult(0)); in matchAndRewrite()
/external/llvm-project/mlir/lib/Analysis/
DAffineAnalysis.cpp107 } else if (AffineIfOp ifOp = dyn_cast<AffineIfOp>(op)) { in getIndexSet() local
108 domain->addAffineIfOpDomain(ifOp); in getIndexSet()
DAffineStructures.cpp709 void FlatAffineConstraints::addAffineIfOpDomain(AffineIfOp ifOp) { in addAffineIfOpDomain() argument
711 FlatAffineConstraints cst(ifOp.getIntegerSet()); in addAffineIfOpDomain()
714 SmallVector<Value, 4> operands = ifOp.getOperands(); in addAffineIfOpDomain()
/external/llvm-project/mlir/lib/Dialect/Affine/IR/
DAffineOps.cpp1888 LogicalResult matchAndRewrite(AffineIfOp ifOp, in matchAndRewrite()
1890 if (ifOp.elseRegion().empty() || in matchAndRewrite()
1891 !llvm::hasSingleElement(*ifOp.getElseBlock()) || ifOp.getNumResults()) in matchAndRewrite()
1894 rewriter.startRootUpdate(ifOp); in matchAndRewrite()
1895 rewriter.eraseBlock(ifOp.getElseBlock()); in matchAndRewrite()
1896 rewriter.finalizeRootUpdate(ifOp); in matchAndRewrite()
/external/llvm-project/mlir/include/mlir/Analysis/
DAffineStructures.h237 void addAffineIfOpDomain(AffineIfOp ifOp);
/external/llvm-project/mlir/lib/Transforms/Utils/
DLoopUtils.cpp3091 AffineIfOp ifOp = createSeparationCondition(inputNest, b); in separateFullTiles() local
3092 if (!ifOp) { in separateFullTiles()
3100 Block *thenBlock = ifOp.getThenBlock(); in separateFullTiles()
3109 Block *elseBlock = ifOp.getElseBlock(); in separateFullTiles()
/external/javassist/src/main/javassist/compiler/
DCodeGen.java1244 private static final int ifOp[] = { EQ, IF_ICMPEQ, IF_ICMPNE, field in CodeGen
1280 int op[] = ifOp; in compareExpr()
/external/llvm-project/mlir/lib/Dialect/Vector/
DVectorTransforms.cpp2384 VectorTransformsOptions options, scf::IfOp *ifOp) { in splitFullAndPartialTransfer() argument
2444 if (ifOp) in splitFullAndPartialTransfer()
2445 *ifOp = fullPartialIfOp; in splitFullAndPartialTransfer()
/external/tensorflow/tensorflow/compiler/mlir/lite/
Dflatbuffer_export.cc1168 if (auto ifOp = dyn_cast<mlir::TF::IfOp>(inst)) { in BuildOperator() local
1169 return BuildIfOperator(ifOp, operands, results); in BuildOperator()