BlockArgListType getArguments() {
return empty() ? BlockArgListType() : front().getArguments();
}
+
+ ValueTypeRange<BlockArgListType> getArgumentTypes();
+
using args_iterator = BlockArgListType::iterator;
using reverse_args_iterator = BlockArgListType::reverse_iterator;
args_iterator args_begin() { return getArguments().begin(); }
// upon the type of the callback function.
/// Walk all of the operations nested under and including the given operation.
-/// This method is selected for callbacks that operation on Operation*.
+/// This method is selected for callbacks that operate on Operation*.
///
/// Example:
/// op->walk([](Operation *op) { ... });
return false;
using mlir::matchers::m_Val;
- auto a = m_Val(r.front().getArgument(0));
- auto b = m_Val(r.front().getArgument(1));
- auto c = m_Val(r.front().getArgument(2));
+ auto a = m_Val(r.getArgument(0));
+ auto b = m_Val(r.getArgument(1));
+ auto c = m_Val(r.getArgument(2));
// TODO: Update this detection once we have matcher support for specifying
// that any permutation of operands matches.
auto pattern1 = m_Op<YieldOp>(m_Op<AddFOp>(m_Op<MulFOp>(a, b), c));
return container->getLoc();
}
+/// Return a range containing the types of the arguments for this region.
+auto Region::getArgumentTypes() -> ValueTypeRange<BlockArgListType> {
+ return ValueTypeRange<BlockArgListType>(getArguments());
+}
+
/// Add one argument to the argument list for each type specified in the list.
iterator_range<Region::args_iterator> Region::addArguments(TypeRange types) {
return front().addArguments(types);
mapper.map(regionArg, operand);
}
- // Ensure that the resultant values of the call, match the callable.
+ // Ensure that the resultant values of the call match the callable.
castBuilder.setInsertionPointAfter(call);
for (unsigned i = 0, e = callResults.size(); i != e; ++i) {
Value callResult = callResults[i];