Skip to content

Commit

Permalink
Bump CIRCT
Browse files Browse the repository at this point in the history
  • Loading branch information
maerhart committed Jun 1, 2023
1 parent 4423b47 commit 37f9596
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion circt
Submodule circt updated 1670 files
6 changes: 5 additions & 1 deletion src/circt-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,16 @@ fn main() {
"CIRCTMoore",
"CIRCTSV",
"CIRCTSeq",
"CIRCTSupport",
"LLVMBinaryFormat",
"LLVMBitstreamReader",
"LLVMCore",
"LLVMDemangle",
"LLVMRemarks",
"LLVMSupport",
"MLIRAnalysis",
"MLIRArithmeticDialect",
"MLIRArithDialect",
"MLIRArithValueBoundsOpInterfaceImpl",
"MLIRCAPIFunc",
"MLIRCAPIIR",
"MLIRCAPIControlFlow",
Expand All @@ -99,6 +102,7 @@ fn main() {
"MLIRFuncDialect",
"MLIRIR",
"MLIRInferTypeOpInterface",
"MLIRInferIntRangeCommon",
"MLIRInferIntRangeInterface",
"MLIRPDLToPDLInterp",
"MLIRParser",
Expand Down
1 change: 0 additions & 1 deletion src/circt-sys/wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "mlir-c/IR.h"
#include "mlir-c/IntegerSet.h"
#include "mlir-c/Pass.h"
#include "mlir-c/Registration.h"
#include "mlir-c/Support.h"
#include "mlir-c/Transforms.h"

Expand Down
9 changes: 3 additions & 6 deletions src/circt/src/cf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,10 @@ impl CondBranchOp {
state.add_operand(condition);
state.add_successor(true_dest);
state.add_successor(false_dest);
let vector_ty = unsafe {
mlirVectorTypeGet(1, [3].as_ptr(), get_integer_type(builder.cx, 32).raw())
};
let vector_attr = Attribute::from_raw(unsafe {
mlirDenseElementsAttrInt32Get(vector_ty, 3, [1, 0, 0].as_ptr())
let dense_array_attr = Attribute::from_raw(unsafe {
mlirDenseI32ArrayGet(builder.cx.raw(), 3, [1, 0, 0].as_ptr())
});
state.add_attribute("operand_segment_sizes", vector_attr);
state.add_attribute("operand_segment_sizes", dense_array_attr);
})
}
}
19 changes: 8 additions & 11 deletions src/circt/src/llhd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,14 @@ impl InstanceOp {
builder.build_with(|builder, state| {
let num_inputs = inputs.into_iter().map(|v| state.add_operand(v)).count();
let num_outputs = outputs.into_iter().map(|v| state.add_operand(v)).count();
let vector_attr = Attribute::from_raw(unsafe {
mlirDenseElementsAttrInt32Get(
mlirVectorTypeGet(1, [2].as_ptr(), get_integer_type(builder.cx, 32).raw()),
let dense_array_attr = Attribute::from_raw(unsafe {
mlirDenseI32ArrayGet(
builder.cx.raw(),
2,
[num_inputs as _, num_outputs as _].as_ptr(),
)
});
state.add_attribute("operand_segment_sizes", vector_attr);
state.add_attribute("operand_segment_sizes", dense_array_attr);
state.add_attribute("name", get_string_attr(builder.cx, name));
state.add_attribute("callee", get_flat_symbol_ref_attr(builder.cx, module));
})
Expand Down Expand Up @@ -383,17 +383,14 @@ impl WaitOp {
if let Some(time) = time {
state.add_operand(time);
}
let vector_ty = unsafe {
mlirVectorTypeGet(1, [3].as_ptr(), get_integer_type(builder.cx, 32).raw())
};
let vector_attr = Attribute::from_raw(unsafe {
mlirDenseElementsAttrInt32Get(
vector_ty,
let dense_array_attr = Attribute::from_raw(unsafe {
mlirDenseI32ArrayGet(
builder.cx.raw(),
3,
[observed.len() as _, time.is_some() as _, 0].as_ptr(),
)
});
state.add_attribute("operand_segment_sizes", vector_attr);
state.add_attribute("operand_segment_sizes", dense_array_attr);
})
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/circt/src/mlir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ pub trait OperationExt: WrapRaw<RawType = MlirOperation> {
unsafe {
let flags = mlirOpPrintingFlagsCreate();
if with_debug_info {
mlirOpPrintingFlagsEnableDebugInfo(flags, false);
mlirOpPrintingFlagsEnableDebugInfo(flags, with_debug_info, false);
}
mlirOperationPrintWithFlags(
self.raw(),
Expand Down

0 comments on commit 37f9596

Please sign in to comment.