[mlir] NFC: use ValueRange for BlockArgument in ConvertStandardToLLVM

When the conversion was implemented, ValueRange did not support
BlockArguments the code materialized a vector. This is no longer
necessary.
This commit is contained in:
Alex Zinenko 2020-02-19 17:15:44 +01:00
parent 461fd94f00
commit d97d409277
1 changed files with 2 additions and 7 deletions

View File

@ -826,16 +826,11 @@ static void wrapExternalFunction(OpBuilder &builder, Location loc,
builder.setInsertionPointToStart(newFuncOp.addEntryBlock());
// Get a ValueRange containing argument types. Note that ValueRange is
// currently not constructible from a pair of iterators pointing to
// BlockArgument.
// Get a ValueRange containing arguments.
FunctionType type = funcOp.getType();
SmallVector<Value, 8> args;
args.reserve(type.getNumInputs());
auto wrapperArgIters = newFuncOp.getArguments();
SmallVector<Value, 8> wrapperArgs(wrapperArgIters.begin(),
wrapperArgIters.end());
ValueRange wrapperArgsRange(wrapperArgs);
ValueRange wrapperArgsRange(newFuncOp.getArguments());
// Iterate over the inputs of the original function and pack values into
// memref descriptors if the original type is a memref.