-
Notifications
You must be signed in to change notification settings - Fork 370
[FIRRTL] Add OMIR emission pass #2010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ namespace json = llvm::json; | |
|
||
using namespace circt; | ||
using namespace firrtl; | ||
using mlir::UnitAttr; | ||
|
||
/// Split a target into a base target (including a reference if one exists) and | ||
/// an optional array of subfield/subindex tokens. | ||
|
@@ -891,6 +892,7 @@ scatterOMIR(Attribute original, unsigned &annotationID, | |
NamedAttrList fields; | ||
fields.append("id", | ||
IntegerAttr::get(IntegerType::get(ctx, 64), annotationID++)); | ||
fields.append("omir.tracker", UnitAttr::get(ctx)); | ||
fields.append("type", StringAttr::get(ctx, tpe)); | ||
|
||
return DictionaryAttr::getWithSorted(ctx, fields); | ||
}; | ||
|
@@ -916,9 +918,9 @@ scatterOMIR(Attribute original, unsigned &annotationID, | |
tpe == "OMMemberInstanceTarget" || tpe == "OMInstanceTarget" || | ||
tpe == "OMDontTouchedReferenceTarget") { | ||
NamedAttrList tracker; | ||
tracker.append("class", StringAttr::get(ctx, omirTrackerAnnoClass)); | ||
tracker.append( | ||
"id", IntegerAttr::get(IntegerType::get(ctx, 64), annotationID)); | ||
tracker.append("type", StringAttr::get(ctx, tpe)); | ||
|
||
auto canonTarget = canonicalizeTarget(value); | ||
if (!canonTarget) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pass only makes sense with an output file, yes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now there's still a
OMIRFileAnnotation
, which we probably want to get rid of in favor of command line args.