Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mlir-adt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
ribbit
mlir-adt
Commits
c38acae3
Commit
c38acae3
authored
1 year ago
by
aymaen
Browse files
Options
Downloads
Patches
Plain Diff
Operation add, execution problem solved.
parent
16075430
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/Adt/AdtDialect.h
+2
-1
2 additions, 1 deletion
include/Adt/AdtDialect.h
include/Adt/AdtOps.td
+17
-2
17 additions, 2 deletions
include/Adt/AdtOps.td
lib/Adt/AdtDialect.cpp
+2
-2
2 additions, 2 deletions
lib/Adt/AdtDialect.cpp
with
21 additions
and
5 deletions
include/Adt/AdtDialect.h
+
2
−
1
View file @
c38acae3
...
...
@@ -13,7 +13,8 @@ namespace mlir::adt{
#define GET_OP_CLASSES
#include
"../../build/include/Adt/AdtOpsDialect.h.inc"
#include
"Adt/AdtOps.h.inc"
#include
"Adt/AdtOpsDialect.h.inc"
/// This class defines the adt source types.
...
...
This diff is collapsed.
Click to expand it.
include/Adt/AdtOps.td
+
17
−
2
View file @
c38acae3
...
...
@@ -2,7 +2,11 @@
#define ADT_OPS
include "mlir/IR/OpBase.td"
include "mlir/Interfaces/CallInterfaces.td"
include "mlir/Interfaces/CastInterfaces.td"
include "mlir/Interfaces/SideEffectInterfaces.td"
include "mlir/IR/BuiltinAttributes.td"
include "mlir/IR/BuiltinAttributeInterfaces.td"
//===----------------------------------------------------------------------------------------===//
// Adt dialect definition.
//==-----------------------------------------------------------------------------------------===//
...
...
@@ -32,5 +36,16 @@ def Adt_TypeSource :
// Provide a definition of the types that are used within the Toy dialect.
def Toy_Type : AnyTypeOf<[Adt_TypeSource]>;
// Providing a definition of the operation used with our dialect.
//===----------------------------------------------------------------------===//
// TypeConstantOp
//===----------------------------------------------------------------------===//
def TypeConstantOp : Adt_Op<"type_constant",[Pure]>{
let summary = "type constant";
let description = [{
Turning a type declaration into an instance.
}];
let arguments = (ins Builtin_StringAttr:$value);
let results = (outs Adt_TypeSource:$output);
}
#endif // ADT_OPS
\ No newline at end of file
This diff is collapsed.
Click to expand it.
lib/Adt/AdtDialect.cpp
+
2
−
2
View file @
c38acae3
...
...
@@ -80,12 +80,12 @@ class SumType : public TypeSource{
};
#define GET_OP_CLASSES
#include
"
../build/include/
Adt/AdtOps
Dialect
.cpp.inc"
#include
"Adt/AdtOps.cpp.inc"
void
AdtDialect
::
initialize
()
{
addOperations
<
#define GET_OP_LIST
#include
"
../build/include/
Adt/AdtOps.cpp.inc"
#include
"Adt/AdtOps.cpp.inc"
>
();
addTypes
<
TypeSource
>
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment