-
Notifications
You must be signed in to change notification settings - Fork 47
Rename of operands/attributes to avoid xDSL reserved keywords #1700
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
base: main
Are you sure you want to change the base?
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 | ||||
---|---|---|---|---|---|---|
|
@@ -85,12 +85,12 @@ def DeviceInitOp : Quantum_Op<"device"> { | |||||
let arguments = (ins | ||||||
Optional<I64>:$shots, | ||||||
StrAttr:$lib, | ||||||
StrAttr:$name, | ||||||
StrAttr:$dev_name, | ||||||
StrAttr:$kwargs | ||||||
); | ||||||
|
||||||
let assemblyFormat = [{ | ||||||
(`shots` `(` $shots^ `)`)? `[` $lib `,` $name `,` $kwargs `]` attr-dict | ||||||
(`shots` `(` $shots^ `)`)? `[` $lib `,` $dev_name `,` $kwargs `]` attr-dict | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
}]; | ||||||
|
||||||
} | ||||||
|
@@ -619,11 +619,11 @@ def YieldOp : Quantum_Op<"yield", [Pure, ReturnLike, Terminator, ParentOneOf<["A | |||||
let summary = "Return results from quantum program regions"; | ||||||
|
||||||
let arguments = (ins | ||||||
Variadic<QuregType>:$results | ||||||
Variadic<QuregType>:$retvals | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wait, no one is using this? 😅 |
||||||
); | ||||||
|
||||||
let assemblyFormat = [{ | ||||||
attr-dict ($results^ `:` type($results))? | ||||||
attr-dict ($retvals ^ `:` type($retvals))? | ||||||
}]; | ||||||
|
||||||
let builders = [ | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -391,7 +391,7 @@ FlatSymbolRefAttr ZneLowering::getOrInsertFoldedCircuit(Location loc, PatternRew | |||||
|
||||||
Operation *shots = deviceInitOp.getShots().getDefiningOp(); | ||||||
StringAttr lib = deviceInitOp.getLibAttr(); | ||||||
StringAttr name = deviceInitOp.getNameAttr(); | ||||||
StringAttr name = deviceInitOp.getDevNameAttr(); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
StringAttr kwargs = deviceInitOp.getKwargsAttr(); | ||||||
|
||||||
TypeRange originalTypes = op.getArgumentTypes(); | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -196,7 +196,7 @@ struct DeviceInitOpPattern : public OpConversionPattern<DeviceInitOp> { | |||||
catalyst::ensureFunctionDeclaration(rewriter, op, qirName, qirSignature); | ||||||
|
||||||
auto rtd_lib = op.getLib().str(); | ||||||
auto rtd_name = op.getName().str(); | ||||||
auto rtd_name = op.getDevName().str(); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
auto rtd_kwargs = op.getKwargs().str(); | ||||||
|
||||||
auto rtd_lib_gs = getGlobalString(loc, rewriter, rtd_lib, | ||||||
|
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.