* LLVM bump to f75c6ed93e785c09884a317ce2bfd440e7f8f573
This commit is contained in:
Prithayan Barua 2024-03-04 16:10:37 -05:00 committed by GitHub
parent 3742944585
commit 4156a7589a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 8 deletions

View File

@ -67,7 +67,7 @@ getOrInsertFunction(ModuleOp &module, ConversionPatternRewriter &rewriter,
OpBuilder moduleBuilder(module.getBodyRegion());
func = moduleBuilder.create<LLVM::LLVMFuncOp>(loc, name, signature);
if (insertBodyAndTerminator) {
func.addEntryBlock();
func.addEntryBlock(moduleBuilder);
OpBuilder b(func.getBody());
b.create<LLVM::ReturnOp>(loc, ValueRange());
}

View File

@ -133,7 +133,7 @@ public:
remove(op);
}
void notifyOperationRemoved(Operation *op) override { remove(op); }
void notifyOperationErased(Operation *op) override { remove(op); }
void notifyOperationInserted(Operation *op,
mlir::IRRewriter::InsertPoint) override {

View File

@ -328,8 +328,10 @@ struct FuncOpPattern : public OpConversionPattern<func::FuncOp> {
rewriter.startOpModification(op);
if (!op.isExternal())
if (failed(insertMergeBlocks(op.getRegion(), rewriter)))
if (failed(insertMergeBlocks(op.getRegion(), rewriter))) {
rewriter.cancelOpModification(op);
return failure();
}
rewriter.finalizeOpModification(op);
rewrittenFuncs.insert(op);

2
llvm

@ -1 +1 @@
Subproject commit 0ce01712432dd34f7e83f78af23fb444f3fd92b6
Subproject commit f75c6ed93e785c09884a317ce2bfd440e7f8f573

View File

@ -21,10 +21,10 @@ hw.module @level1(in %arg0 : i32, in %in : !Struct1, in %arg1: i32, out out0 : i
}
// BASIC-LABEL: hw.module @level2(in %in.aa.a : i1, in %in.aa.b : i2, in %in.bb.a : i1, in %in.bb.b : i2, out out.aa.a : i1, out out.aa.b : i2, out out.bb.a : i1, out out.bb.b : i2) {
// BASIC-NEXT: %0 = hw.struct_create (%in.aa.a, %in.aa.b) : !hw.struct<a: i1, b: i2>
// BASIC-NEXT: %1 = hw.struct_create (%in.bb.a, %in.bb.b) : !hw.struct<a: i1, b: i2>
// BASIC-NEXT: %2 = hw.struct_create (%0, %1) : !hw.struct<aa: !hw.struct<a: i1, b: i2>, bb: !hw.struct<a: i1, b: i2>>
// BASIC-NEXT: %aa, %bb = hw.struct_explode %2 : !hw.struct<aa: !hw.struct<a: i1, b: i2>, bb: !hw.struct<a: i1, b: i2>>
// BASIC-NEXT: %[[v1:.+]] = hw.struct_create (%in.bb.a, %in.bb.b) : !hw.struct<a: i1, b: i2>
// BASIC-NEXT: %[[v0:.+]] = hw.struct_create (%in.aa.a, %in.aa.b) : !hw.struct<a: i1, b: i2>
// BASIC-NEXT: %[[v2:.+]] = hw.struct_create (%[[v0]], %[[v1]]) : !hw.struct<aa: !hw.struct<a: i1, b: i2>, bb: !hw.struct<a: i1, b: i2>>
// BASIC-NEXT: %aa, %bb = hw.struct_explode %[[v2]] : !hw.struct<aa: !hw.struct<a: i1, b: i2>, bb: !hw.struct<a: i1, b: i2>>
// BASIC-NEXT: %a, %b = hw.struct_explode %aa : !hw.struct<a: i1, b: i2>
// BASIC-NEXT: %a_0, %b_1 = hw.struct_explode %bb : !hw.struct<a: i1, b: i2>
// BASIC-NEXT: hw.output %a, %b, %a_0, %b_1 : i1, i2, i1, i2