Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
mlir/include/mlir/Interfaces/ControlFlowInterfaces.td
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | let methods = [ | ||||
>, | >, | ||||
InterfaceMethod<[{ | InterfaceMethod<[{ | ||||
Returns the `BlockArgument` corresponding to operand `operandIndex` in | Returns the `BlockArgument` corresponding to operand `operandIndex` in | ||||
some successor, or None if `operandIndex` isn't a successor operand | some successor, or None if `operandIndex` isn't a successor operand | ||||
index. | index. | ||||
}], | }], | ||||
"Optional<BlockArgument>", "getSuccessorBlockArgument", | "Optional<BlockArgument>", "getSuccessorBlockArgument", | ||||
(ins "unsigned":$operandIndex), [{ | (ins "unsigned":$operandIndex), [{ | ||||
Operation *opaqueOp = op; | Operation *opaqueOp = $_op; | ||||
for (unsigned i = 0, e = opaqueOp->getNumSuccessors(); i != e; ++i) { | for (unsigned i = 0, e = opaqueOp->getNumSuccessors(); i != e; ++i) { | ||||
if (Optional<BlockArgument> arg = detail::getBranchSuccessorArgument( | if (Optional<BlockArgument> arg = detail::getBranchSuccessorArgument( | ||||
op.getSuccessorOperands(i), operandIndex, | $_op.getSuccessorOperands(i), operandIndex, | ||||
opaqueOp->getSuccessor(i))) | opaqueOp->getSuccessor(i))) | ||||
return arg; | return arg; | ||||
} | } | ||||
return llvm::None; | return llvm::None; | ||||
}] | }] | ||||
>, | >, | ||||
InterfaceMethod<[{ | InterfaceMethod<[{ | ||||
Returns the successor that would be chosen with the given constant | Returns the successor that would be chosen with the given constant | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |