Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/unreleased/th__reduce_visibility.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
changed:
- make custom parse/print functions private
4 changes: 3 additions & 1 deletion include/llzk/Dialect/Array/IR/Ops.td
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,17 @@ def LLZK_CreateArrayOp
}];

let extraClassDeclaration = [{
private:
static ::mlir::ParseResult parseInferredArrayType(::mlir::OpAsmParser &parser,
::llvm::SmallVector<::mlir::Type,1> &elementsTypes,
::mlir::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> elements,
::mlir::Type resultType
);

static void printInferredArrayType(::mlir::OpAsmPrinter &printer, CreateArrayOp,
::mlir::TypeRange, ::mlir::OperandRange, ::mlir::Type
);
private:

static ::llvm::SmallVector<::mlir::Type> resultTypeToElementsTypes(::mlir::Type resultType);
}];

Expand Down
1 change: 1 addition & 0 deletions include/llzk/Dialect/Constrain/IR/Ops.td
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def EmitEqualityOp
}];

let extraClassDeclaration = [{
private:
static ::mlir::Type inferRHS(::mlir::Type lhsType);

static ::mlir::ParseResult parseInferredOrParsedType(::mlir::OpAsmParser &parser,
Expand Down
6 changes: 4 additions & 2 deletions include/llzk/Dialect/Global/IR/Ops.td
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@ def LLZK_GlobalDefOp
let hasVerifier = 1;

let extraClassDeclaration = [{
inline bool isConstant() { return getConstant(); }

private:
static ::mlir::ParseResult parseGlobalInitialValue(::mlir::OpAsmParser &parser,
::mlir::Attribute &initialValue, ::mlir::TypeAttr typeAttr
);

static void printGlobalInitialValue(::mlir::OpAsmPrinter &printer, GlobalDefOp op,
::mlir::Attribute initialValue, ::mlir::TypeAttr typeAttr
);

inline bool isConstant() { return getConstant(); }
}];
}

Expand Down
2 changes: 2 additions & 0 deletions include/llzk/Dialect/Include/IR/Ops.td
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ def LLZK_IncludeOp
let extraClassDeclaration = [{
static IncludeOp create(::mlir::Location, ::llvm::StringRef name, ::llvm::StringRef path);
static IncludeOp create(::mlir::Location, ::mlir::StringAttr name, ::mlir::StringAttr path);

/// Opens the module this include references but doesn't insert it into the parent module.
::mlir::FailureOr<mlir::OwningOpRef<mlir::ModuleOp>> openModule();

/// Opens the module this include references and replace this include with that module.
::mlir::FailureOr<mlir::ModuleOp> inlineAndErase();
}];
Expand Down
1 change: 1 addition & 0 deletions include/llzk/Dialect/Shared/OpsBase.td
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ include "llzk/Dialect/Polymorphic/IR/Types.td"
class NaryOpBase<Dialect dialect, string mnemonic, string defaultTypeBuilder,
list<Trait> traits = []> : Op<dialect, mnemonic, traits> {
let extraClassDeclaration = [{
private:
static ::mlir::ParseResult parseInferredOrParsedType(
::mlir::OpAsmParser &parser, ::mlir::Type &opType, bool isFirst
) {
Expand Down
Loading