[Readme] update LLVM repo url; FunctionType::get to builder.getFunctionType

This commit is contained in:
Hanchen Ye 2020-12-25 10:03:48 -06:00
parent 1b6e00b303
commit ed867403d8
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ This project aims to create a framework that ultimately converts an algorithm wr
## Quick Start
### 1. Install LLVM and MLIR
**IMPORTANT** This step assumes that you have cloned LLVM from (https://github.com/circt/llvm) to `$LLVM_DIR`. To build LLVM and MLIR, run:
**IMPORTANT** This step assumes that you have cloned LLVM from (https://github.com/circt/llvm/tree/main) to `$LLVM_DIR` and checked out the `main` branch. To build LLVM and MLIR, run:
```sh
$ mkdir $LLVM_DIR/build
$ cd $LLVM_DIR/build

View File

@ -184,8 +184,8 @@ void LegalizeOnnx::runOnOperation() {
// Construct new function type.
SmallVector<Type, 16> inputTypes(func.getArgumentTypes());
inputTypes.append(weightTypes.begin(), weightTypes.end());
auto newType = FunctionType::get(func.getContext(), inputTypes,
func.getType().getResults());
auto newType =
builder.getFunctionType(inputTypes, func.getType().getResults());
// Record the argument number of the old function.
auto oldArgNum = func.getNumArguments();