Home
last modified time | relevance | path

Searched refs:BranchOp (Results 1 – 25 of 38) sorted by relevance

12

/llvm-project-15.0.7/mlir/lib/Dialect/ControlFlow/IR/
H A DControlFlowOps.cpp105 BranchOp successorBranch = dyn_cast<BranchOp>(successor->getTerminator()); in collapseBranch()
144 simplifyBrToBlockWithSinglePred(BranchOp op, PatternRewriter &rewriter) { in simplifyBrToBlockWithSinglePred()
163 static LogicalResult simplifyPassThroughBr(BranchOp op, in simplifyPassThroughBr()
176 rewriter.replaceOpWithNewOp<BranchOp>(op, dest, destOperands); in simplifyPassThroughBr()
180 LogicalResult BranchOp::canonicalize(BranchOp op, PatternRewriter &rewriter) { in canonicalize()
185 void BranchOp::setDest(Block *block) { return setSuccessor(block); } in setDest()
189 SuccessorOperands BranchOp::getSuccessorOperands(unsigned index) { in getSuccessorOperands()
194 Block *BranchOp::getSuccessorForOperands(ArrayRef<Attribute>) { in getSuccessorForOperands()
215 rewriter.replaceOpWithNewOp<BranchOp>(condbr, condbr.getTrueDest(), in matchAndRewrite()
623 rewriter.replaceOpWithNewOp<BranchOp>(op, op.getDefaultDestination(), in simplifySwitchWithOnlyDefault()
[all …]
/llvm-project-15.0.7/mlir/lib/Conversion/ControlFlowToSPIRV/
H A DControlFlowToSPIRV.cpp36 struct BranchOpPattern final : public OpConversionPattern<cf::BranchOp> {
37 using OpConversionPattern<cf::BranchOp>::OpConversionPattern;
40 matchAndRewrite(cf::BranchOp op, OpAdaptor adaptor, in matchAndRewrite()
42 rewriter.replaceOpWithNewOp<spirv::BranchOp>(op, op.getDest(), in matchAndRewrite()
/llvm-project-15.0.7/mlir/lib/Conversion/SCFToControlFlow/
H A DSCFToControlFlow.cpp325 rewriter.create<cf::BranchOp>(loc, conditionBlock, loopCarried); in matchAndRewrite()
341 rewriter.create<cf::BranchOp>(loc, conditionBlock, destOperands); in matchAndRewrite()
374 rewriter.create<cf::BranchOp>(loc, remainingOpsBlock); in matchAndRewrite()
384 rewriter.create<cf::BranchOp>(loc, continueBlock, thenTerminatorOperands); in matchAndRewrite()
398 rewriter.create<cf::BranchOp>(loc, continueBlock, elseTerminatorOperands); in matchAndRewrite()
424 rewriter.create<cf::BranchOp>(loc, &region.front()); in matchAndRewrite()
430 rewriter.create<cf::BranchOp>(loc, remainingOpsBlock, terminatorOperands); in matchAndRewrite()
543 rewriter.create<cf::BranchOp>(loc, before, whileOp.getInits()); in matchAndRewrite()
556 rewriter.replaceOpWithNewOp<cf::BranchOp>(yieldOp, before, in matchAndRewrite()
599 rewriter.create<cf::BranchOp>(whileOp.getLoc(), before, whileOp.getInits()); in matchAndRewrite()
/llvm-project-15.0.7/mlir/lib/Conversion/SCFToSPIRV/
H A DSCFToSPIRV.cpp207 rewriter.create<spirv::BranchOp>(loc, header, args); in matchAndRewrite()
226 rewriter.create<spirv::BranchOp>(loc, header, updatedIndVar); in matchAndRewrite()
266 rewriter.create<spirv::BranchOp>(loc, mergeBlock); in matchAndRewrite()
276 rewriter.create<spirv::BranchOp>(loc, mergeBlock); in matchAndRewrite()
321 cast<spirv::BranchOp>(rewriter.getInsertionBlock()->getTerminator()); in matchAndRewrite()
325 rewriter.create<spirv::BranchOp>(terminatorOp.getLoc(), br.getTarget(), in matchAndRewrite()
379 rewriter.create<spirv::BranchOp>(loc, &beforeBlock, adaptor.getInits()); in matchAndRewrite()
419 rewriter.replaceOpWithNewOp<spirv::BranchOp>(yield, &beforeBlock, yieldArgs); in matchAndRewrite()
/llvm-project-15.0.7/flang/lib/Optimizer/Transforms/
H A DRewriteLoop.cpp89 rewriter.create<mlir::cf::BranchOp>(loc, conditionalBlock, loopOperands); in matchAndRewrite()
110 rewriter.create<mlir::cf::BranchOp>(loc, conditionalBlock, loopCarried); in matchAndRewrite()
161 rewriter.create<mlir::cf::BranchOp>(loc, remainingOpsBlock); in matchAndRewrite()
171 rewriter.create<mlir::cf::BranchOp>(loc, continueBlock, in matchAndRewrite()
186 rewriter.create<mlir::cf::BranchOp>(loc, continueBlock, in matchAndRewrite()
249 rewriter.create<mlir::cf::BranchOp>(loc, conditionBlock, loopCarried); in matchAndRewrite()
264 rewriter.create<mlir::cf::BranchOp>(loc, conditionBlock, destOperands); in matchAndRewrite()
/llvm-project-15.0.7/mlir/test/python/ir/
H A Dblocks.py46 cf.BranchOp([i16_arg], dest=middle_block)
50 cf.BranchOp([i32_arg], dest=successor_block)
/llvm-project-15.0.7/mlir/lib/Dialect/Async/Transforms/
H A DAsyncToAsyncRuntime.cpp151 builder.create<cf::BranchOp>(originalEntryBlock); in setupCoroMachinery()
163 builder.create<cf::BranchOp>(suspendBlock); in setupCoroMachinery()
190 builder.create<cf::BranchOp>(cleanupBlock); in setupCoroMachinery()
229 builder.create<cf::BranchOp>(coro.cleanup); in setupSetErrorBlock()
308 cf::BranchOp branch = cast<cf::BranchOp>(coro.entry->getTerminator()); in outlineExecuteOp()
800 func::ConstantOp, cf::BranchOp, cf::CondBranchOp>(); in runOnOperation()
H A DAsyncRuntimeRefCounting.cpp410 builder.create<cf::BranchOp>(value.getLoc(), successor); in addDropRefInDivergentLivenessSuccessor()
/llvm-project-15.0.7/mlir/lib/Dialect/GPU/Transforms/
H A DAllReduceLowering.cpp197 create<cf::BranchOp>(block, ValueRange()); in getFactory()
205 rewriter.replaceOpWithNewOp<cf::BranchOp>( in getFactory()
294 create<cf::BranchOp>(continueBlock, thenOperands); in createIf()
298 create<cf::BranchOp>(continueBlock, elseOperands); in createIf()
H A DKernelOutlining.cpp195 builder.create<cf::BranchOp>(loc, clonedLaunchOpEntry); in outlineKernelFuncImpl()
/llvm-project-15.0.7/mlir/lib/Dialect/SPIRV/IR/
H A DSPIRVCanonicalization.cpp385 dyn_cast<spirv::BranchOp>(*std::next(trueBlock->begin())); in canCanonicalizeSelection()
388 dyn_cast<spirv::BranchOp>(*std::next(falseBlock->begin())); in canCanonicalizeSelection()
H A DSPIRVDialect.cpp91 OpBuilder(op).create<spirv::BranchOp>(op->getLoc(), newDest); in handleTerminator()
/llvm-project-15.0.7/mlir/lib/Conversion/ControlFlowToLLVM/
H A DControlFlowToLLVM.cpp92 : public OneToOneLLVMTerminatorLowering<cf::BranchOp, LLVM::BrOp> {
/llvm-project-15.0.7/llvm/lib/Target/Mips/
H A DMipsSEISelLowering.h95 unsigned BranchOp) const;
/llvm-project-15.0.7/mlir/include/mlir/Dialect/ControlFlow/IR/
H A DControlFlowOps.td63 // BranchOp
66 def BranchOp : CF_Op<"br", [
/llvm-project-15.0.7/llvm/lib/Target/AVR/
H A DAVRInstrInfo.cpp542 bool AVRInstrInfo::isBranchOffsetInRange(unsigned BranchOp, in isBranchOffsetInRange() argument
545 switch (BranchOp) { in isBranchOffsetInRange()
/llvm-project-15.0.7/mlir/test/Dialect/ControlFlow/
H A Dcanonicalize.mlir3 /// Test the folding of BranchOp.
15 /// Test that pass-through successors of BranchOp get folded.
86 /// Test the compound folding of BranchOp and CondBranchOp.
/llvm-project-15.0.7/mlir/lib/Target/SPIRV/Serialization/
H A DSerializer.h263 LogicalResult processBranchOp(spirv::BranchOp branchOp);
H A DSerializer.cpp1016 if (auto branchOp = dyn_cast<spirv::BranchOp>(terminator)) { in emitPhiForBlockArguments()
1128 .Case([&](spirv::BranchOp op) { return processBranchOp(op); }) in processOperation()
H A DSerializeOps.cpp502 LogicalResult Serializer::processBranchOp(spirv::BranchOp branchOp) { in processBranchOp()
/llvm-project-15.0.7/mlir/lib/Target/SPIRV/Deserialization/
H A DDeserializer.cpp1455 opBuilder.create<spirv::BranchOp>(loc, target); in processBranch()
1813 builder.create<spirv::BranchOp>(location, mapper.lookupOrNull(headerBlock), in structurize()
1888 builder.create<spirv::BranchOp>(location, mergeBlock); in structurize()
1940 if (auto branchOp = dyn_cast<spirv::BranchOp>(op)) { in wireUpBlockArgument()
1942 opBuilder.create<spirv::BranchOp>(branchOp.getLoc(), branchOp.getTarget(), in wireUpBlockArgument()
/llvm-project-15.0.7/mlir/lib/Dialect/Func/IR/
H A DFuncOps.cpp81 builder.create<cf::BranchOp>(op->getLoc(), newDest, returnOp.getOperands()); in handleTerminator()
/llvm-project-15.0.7/mlir/lib/Conversion/SPIRVToLLVM/
H A DSPIRVToLLVM.cpp516 class BranchConversionPattern : public SPIRVToLLVMConversion<spirv::BranchOp> {
518 using SPIRVToLLVMConversion<spirv::BranchOp>::SPIRVToLLVMConversion;
521 matchAndRewrite(spirv::BranchOp branchOp, OpAdaptor adaptor, in matchAndRewrite()
1064 auto brOp = dyn_cast<spirv::BranchOp>(entryBlock->getOperations().front()); in matchAndRewrite()
/llvm-project-15.0.7/mlir/lib/Dialect/Linalg/Transforms/
H A DDetensorize.cpp262 func->walk([&](cf::BranchOp br) { in compute()
/llvm-project-15.0.7/mlir/lib/Target/Cpp/
H A DTranslateToCpp.cpp250 cf::BranchOp branchOp) { in printOperation()
934 .Case<cf::BranchOp, cf::CondBranchOp>( in emitOperation()

12