Skip to content

Commit

Permalink
refactor: bump llvm
Browse files Browse the repository at this point in the history
Signed-off-by: Maximilian Bartel <[email protected]>
  • Loading branch information
Maximilian Bartel committed Oct 2, 2023
1 parent ded4d47 commit d9272e5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/BuildOnLinuxOSX.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Firstly, install MLIR (as a part of LLVM-Project):
``` bash
git clone -n https://github.com/llvm/llvm-project.git
# Check out a specific branch that is known to work with ONNX-MLIR.
cd llvm-project && git checkout f66cd9e9556a53142a26a5c21a72e21f1579217c && cd ..
cd llvm-project && git checkout d13da154a7c7eff77df8686b2de1cfdfa7cc7029 && cd ..
```

[same-as-file]: <> (utils/build-mlir.sh)
Expand Down
2 changes: 1 addition & 1 deletion docs/BuildOnWindows.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Install MLIR (as a part of LLVM-Project):
```shell
git clone -n https://github.com/llvm/llvm-project.git
# Check out a specific branch that is known to work with ONNX-MLIR.
cd llvm-project && git checkout f66cd9e9556a53142a26a5c21a72e21f1579217c && cd ..
cd llvm-project && git checkout d13da154a7c7eff77df8686b2de1cfdfa7cc7029 && cd ..
```

[same-as-file]: <> (utils/build-mlir.cmd)
Expand Down
13 changes: 6 additions & 7 deletions src/Conversion/KrnlToAffine/ConvertKrnlToAffine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,12 @@ class LoopBodyMover {
// Find the forOp associated with loopRef, get ready to insert into
// forOp body.
// Cast to affine.forOp or affine.parallelOp
Block &loopBody = dyn_cast_or_null<AffineForOp>(loopRefToOp[loopRef])
? llvm::cast<AffineForOp>(loopRefToOp[loopRef])
.getLoopBody()
.front()
: llvm::cast<AffineParallelOp>(loopRefToOp[loopRef])
.getLoopBody()
.front();
Block &loopBody =
dyn_cast_or_null<AffineForOp>(loopRefToOp[loopRef])
? llvm::cast<AffineForOp>(loopRefToOp[loopRef]).getRegion().front()
: llvm::cast<AffineParallelOp>(loopRefToOp[loopRef])
.getRegion()
.front();
auto insertPt = loopBody.begin();

// Find the ops to transfer (saved into a Movable) associated with
Expand Down
4 changes: 3 additions & 1 deletion src/Dialect/Krnl/KrnlOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,9 @@ ParseResult KrnlIterateOp::parse(OpAsmParser &parser, OperationState &result) {
return success();
}

Region &KrnlIterateOp::getLoopBody() { return getBodyRegion(); }
::llvm::SmallVector<mlir::Region *> KrnlIterateOp::getLoopRegions() {
return {&getBodyRegion()};
}

LogicalResult KrnlIterateOp::verify() {
// TODO: Verify number of induction variable bounds matches the number of
Expand Down
2 changes: 1 addition & 1 deletion src/Dialect/ONNX/Rewrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ class InputOutputTransposer {

void transposeInput(MutableOperandRange operand, ArrayAttr perm) {
assert(operand.size() == 1 && "should be called with singleton range");
Value input = operand[0];
Value input = operand[0].get();
if (!input.getType().isa<NoneType>()) {
Value transposed = transpose(input, perm);
operand.assign(transposed);
Expand Down
2 changes: 1 addition & 1 deletion utils/clone-mlir.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
git clone -n https://github.com/llvm/llvm-project.git
# Check out a specific branch that is known to work with ONNX-MLIR.
cd llvm-project && git checkout f66cd9e9556a53142a26a5c21a72e21f1579217c && cd ..
cd llvm-project && git checkout d13da154a7c7eff77df8686b2de1cfdfa7cc7029 && cd ..

0 comments on commit d9272e5

Please sign in to comment.